Package com.collibra.dgc.core.api.component.meta

# Interface AssetTypeApi

public interface AssetTypeApi
Contains all api operations for handling Asset Types.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AssetType`
  `addAssetType(AddAssetTypeRequest addAssetTypeRequest)`
  Adds an AssetType.
  `List<AssetType>`
  `addAssetTypes(List<AddAssetTypeRequest> addAssetTypeRequests)`
  Adds multiple Asset Types.
  `AssetType`
  `changeAssetType(ChangeAssetTypeRequest changeAssetTypeRequest)`
  Updates an existing Asset Type.
  `List<AssetType>`
  `changeAssetTypes(List<ChangeAssetTypeRequest> changeAssetTypeRequests)`
  Change multiple Asset Types.
  `boolean`
  `exists(UUID assetTypeId)`
  Returns true if an Asset Type with given `id` exists.
  `PagedResponse<AssetType>`
  `findAssetTypes(FindAssetTypesRequest request)`
  Finds the Asset Types matching the given criteria.
  `List<AssetType>`
  `findParentTypes(UUID assetTypeId)`
  Finds the parent Asset Types of the given Asset Type.
  `List<AssetType>`
  `findSubTypes(FindSubAssetTypesRequest request)`
  Finds all the subtypes of an Asset Type as described in the request object.
  `AssetType`
  `getAssetType(UUID assetTypeId)`
  Get the Asset Type with the given id.
  `AssetType`
  `getAssetTypeByPublicId(String publicId)`
  Returns the asset type identified by the given public id.
  `void`
  `removeAssetType(UUID assetTypeId)`
  Remove the Asset Type with the given id.
  `Job`
  `removeAssetTypeInJob(UUID assetTypeId)`
  Remove the Asset Type with the given id asynchronously.
  `void`
  `removeAssetTypes(List<UUID> assetTypeIds)`
  Remove multiple Asset Types with the given ids.
  `Job`
  `removeAssetTypesInJob(List<UUID> assetTypeIds)`
  Remove multiple Asset Types with the given ids asynchronously.

- ## Method Details

  - ### getAssetType

    AssetType getAssetType(UUID assetTypeId)
    Get the Asset Type with the given id.
    Parameters:
      `assetTypeId` - the id of the Asset Type
    Returns:
      the found Asset Type

  - ### getAssetTypeByPublicId

    AssetType getAssetTypeByPublicId(String publicId)
    Returns the asset type identified by the given public id.
    Parameters:
      `publicId` - the public id of the asset type
    Returns:
      the found asset type

  - ### exists

    boolean exists(UUID assetTypeId)
    Returns true if an Asset Type with given `id` exists.
    Parameters:
      `assetTypeId` - the `id` of the Asset Type
    Returns:
      true if an Asset Type with given `id` exists, `false` otherwise

  - ### addAssetType

    AssetType addAssetType(AddAssetTypeRequest addAssetTypeRequest)
    Adds an AssetType.
    Parameters:
      `addAssetTypeRequest` - information required to create the Asset Type
    Returns:
      the created Asset Type

  - ### changeAssetType

    AssetType changeAssetType(ChangeAssetTypeRequest changeAssetTypeRequest)
    Updates an existing Asset Type.
    Parameters:
      `changeAssetTypeRequest` - information required to change the Asset type
    Returns:
      the changed Asset Type

  - ### findAssetTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.dgc.core.api.internal.security.audit.formatter.PagedResponseFormatter.class) PagedResponse<AssetType> findAssetTypes(FindAssetTypesRequest request)
    Finds the Asset Types matching the given criteria.
    Parameters:
      `request` - the request object containing the criteria
    Returns:
      a pagedResponse of Asset Types

  - ### removeAssetType

    void removeAssetType(UUID assetTypeId)
    Remove the Asset Type with the given id.
    Parameters:
      `assetTypeId` - id of the Asset Type to remove

  - ### removeAssetTypeInJob

    Job removeAssetTypeInJob(UUID assetTypeId)
    Remove the Asset Type with the given id asynchronously.
    Parameters:
      `assetTypeId` - id of the Asset Type to remove

  - ### addAssetTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<AssetType> addAssetTypes(List<AddAssetTypeRequest> addAssetTypeRequests)
    Adds multiple Asset Types.
    Parameters:
      `addAssetTypeRequests` - information about the Asset Types to add
    Returns:
      the created Asset Types

  - ### removeAssetTypes

    void removeAssetTypes(List<UUID> assetTypeIds)
    Remove multiple Asset Types with the given ids. If one id does not correspond to an existing Asset Type, the process does not stop and goes on with next id.
    Parameters:
      `assetTypeIds` - the ids of the Asset Types to remove

  - ### removeAssetTypesInJob

    Job removeAssetTypesInJob(List<UUID> assetTypeIds)
    Remove multiple Asset Types with the given ids asynchronously. If one id does not correspond to an existing Asset Type, the process does not stop and goes on with next id.
    Parameters:
      `assetTypeIds` - the ids of the Asset Types to remove

  - ### changeAssetTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<AssetType> changeAssetTypes(List<ChangeAssetTypeRequest> changeAssetTypeRequests)
    Change multiple Asset Types.
    Parameters:
      `changeAssetTypeRequests` - list of information about changes to existing Asset Types
    Returns:
      changed Asset Types

  - ### findSubTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<AssetType> findSubTypes(FindSubAssetTypesRequest request)
    Finds all the subtypes of an Asset Type as described in the request object.
    Parameters:
      `request` - the request object
    Returns:
      List of Asset Types

  - ### findParentTypes

    @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<AssetType> findParentTypes(UUID assetTypeId)
    Finds the parent Asset Types of the given Asset Type. The order of the parent Asset Types is the order in which they are encountered while going up in the current type’s hierarchy.
    Parameters:
      `assetTypeId` - the unique identifier of the AssetType for which we want to find the parents
    Returns:
      the list of parent Asset Types