Package com.sas.lsaf.core.type

## Interface TypeService

-     public interface TypeService

  The service to retrieve object type information for objects stored in the system.

  `Type` instances represent object metadata information for objects within the system. This service allows retrieval of `Type` instances so information about the object and the `AttributeDefinition` details that describe what information is stored with the object. The `AttributeDefinition` details include attribute definitions that are system-defined and user-defined extended attributes.

  The primary use case for this service is to retrieve information that is related to user-defined extended attributes. Because of this fact, the types that are surfaced through this service are the object types that can be extended with custom attribute definitions. All other types are suppressed. This is the identical behavior that is surfaced through the application.

  Currently, the type information is immutable. So, the information provided by this service is read-only.

  Since:
    1.7
  See Also:
    `Type`, `AttributeDefinition`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.List<Type>` | `getAuditableTypes()` | Gets all the type definitions that are audited in the system.
    `java.util.List<Type>` | `getContextTypes()` | Gets all of the type definitions that are repository contexts in the system.
    `java.util.List<Type>` | `getSearchableTypes()` | Gets all the type definitions that can be searched in the system.
    `java.util.List<TypeDescriptor>` | `getTopLevelTypes()` | Retrieve all type definitions that are repository contexts that have `Type.Capability.TOP` in the system.
    `Type` | `getTypeById​(java.lang.String id)` | Gets the `Type` with the specified unique identifier.
    `java.util.List<Type>` | `getTypes()` | Gets all the type definitions in the system.
    `java.util.List<Type>` | `getTypesByCapability​(Type.Capability capability)` | Retrieve all type definitions that have the specified capability `Type.Capability` in the system.
    `boolean` | `isTypeCapable​(java.lang.String id, Type.Capability capability)` | Indicates whether the capability is available at the specified type.
    `boolean` | `typeExists​(java.lang.String id)` | Indicates whether a `Type` with the specified unique identifier exists within the system.

- - ### Method Detail

    - #### typeExists

          boolean typeExists​(java.lang.String id)

      Indicates whether a `Type` with the specified unique identifier exists within the system.
      Parameters:
        `id` - the unique identifier to search for.
      Returns:
        `True`, if the type definition exists, `False` otherwise.

    - #### getTypeById

          Type getTypeById​(java.lang.String id)
                    throws TypeNotFoundException

      Gets the `Type` with the specified unique identifier. If the `Type` does not exist, a `TypeNotFoundException` is thrown.
      Parameters:
        `id` - the unique identifier to search for.
      Returns:
        The type, if it exists.
      Throws:
        `TypeNotFoundException` - thrown when the type definition does not exist.

    - #### getTypes

          java.util.List<Type> getTypes()

      Gets all the type definitions in the system.
      Returns:
        A list of all of the type definitions in the system.
      Since:
        1.7

    - #### getSearchableTypes

          java.util.List<Type> getSearchableTypes()

      Gets all the type definitions that can be searched in the system.
      Returns:
        A list of all of the type definitions that can be searched in the system.
      Since:
        2.2

    - #### getAuditableTypes

          java.util.List<Type> getAuditableTypes()

      Gets all the type definitions that are audited in the system.
      Returns:
        A list of all of the type definitions that are audited in the system.
      Since:
        2.2

    - #### getContextTypes

          java.util.List<Type> getContextTypes()

      Gets all of the type definitions that are repository contexts in the system.
      Returns:
        A list of all of the type definitions that are repository contexts in the system.
      Since:
        2.1

    - #### getTopLevelTypes

          java.util.List<TypeDescriptor> getTopLevelTypes()

      Retrieve all type definitions that are repository contexts that have `Type.Capability.TOP` in the system.
      Returns:
        the list of all type definitions that are repository contexts that have `Type.Capability.TOP` in the system.
      Since:
        2.1

    - #### getTypesByCapability

          java.util.List<Type> getTypesByCapability​(Type.Capability capability)

      Retrieve all type definitions that have the specified capability `Type.Capability` in the system.
      Parameters:
        `capability` - the capability of the type definition.
      Returns:
        the list of all type definitions that have the specified capability `Type.Capability` in the system.
      Since:
        2.3

    - #### isTypeCapable

          boolean isTypeCapable​(java.lang.String id,
                                Type.Capability capability)

      Indicates whether the capability is available at the specified type.
      Parameters:
        `id` - the unique identifier to search for.
        `capability` - the capability of the type definition.
      Returns:
        A `boolean` value that indicates whether the type has the capability.
      Since:
        2.3