Package com.collibra.catalog.api.component.classification

# Interface ClassificationApi

public interface ClassificationApi

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Classification`
  `addClassification(AddClassificationRequest request)`
  Adds new `Classification`.
  `Classification`
  `changeClassification(ChangeClassificationRequest request)`
  Changes given `Classification`.
  `Job`
  `classificationJob(ClassifyRequest classifyRequest)`
  Deprecated.
  `Job`
  `classify(UUID id)`
  Deprecated.
  `UUID`
  `classifyAsset(UUID id)`
  Starts a job that classifies assets by external service based on sample data.
  `UUID`
  `classifyAssets(ClassifyRequest classifyRequest)`
  Starts a job that classifies assets by external service based on sample data.
  `PagedResponse<Classification>`
  `findClassifications(FindClassificationsRequest request)`
  Finds all the `Classification`s matching given search criteria.
  `Classification`
  `getClassification(UUID classificationId)`
  Finds the `Classification` with given id.
  `List<Classification>`
  `getClassifications(GetDataClassesRequestParams requestParams)`
  Finds all the `Classification`s with given ids.
  `List<ClassificationMatch>`
  `mergeClassifications(String targetClassificationName, List<UUID> classificationIds)`
  Searches for all the relations between classifications mentioned in classificationIds and changes the assets to be related to targetClassification instead.
  `void`
  `removeClassification(UUID classificationId)`
  Removes `Classification` with given id.
  `void`
  `removeClassifications(List<UUID> classificationsIds)`
  Removes all `Classification`s with given ids.

- ## Method Details

  - ### findClassifications

    PagedResponse<Classification> findClassifications(FindClassificationsRequest request)
    Finds all the `Classification`s matching given search criteria.
    Parameters:
      `request` - search criteria specifying what classifications to search for
    Returns:
      classifications matching given criteria.

  - ### getClassification

    Classification getClassification(UUID classificationId)
    Finds the `Classification` with given id.
    Parameters:
      `classificationId` - id of classification
    Returns:
      classification with given id.

  - ### getClassifications

    List<Classification> getClassifications(GetDataClassesRequestParams requestParams)
    Finds all the `Classification`s with given ids.
    Parameters:
      `requestParams` - request object used to filter classifications
    Returns:
      classifications with given ids.

  - ### addClassification

    Classification addClassification(AddClassificationRequest request)
    Adds new `Classification`.
    Parameters:
      `request` - parameters to create new `Classification`
    Returns:
      newly created `Classification`

  - ### changeClassification

    Classification changeClassification(ChangeClassificationRequest request)
    Changes given `Classification`.
    Parameters:
      `request` - parameters to change `Classification`
    Returns:
      changed `Classification` or null if couldn't fulfill the request

  - ### removeClassification

    void removeClassification(UUID classificationId)
    Removes `Classification` with given id.

    WARNING: This will also remove all ClassificationMatches that are joined with this Classification!

    Parameters:
      `classificationId` - ID of `Classification` to remove

  - ### removeClassifications

    void removeClassifications(List<UUID> classificationsIds)
    Removes all `Classification`s with given ids.

    WARNING: This will also remove all ClassificationMatches that are joined with these Classifications!

    Parameters:
      `classificationsIds` - IDs of `Classification`s to remove

  - ### classify

    @Deprecated(since="2025.01") Job classify(UUID id)
    Deprecated.
    Starts a job that classifies assets by external service based on sample data. The assets that can be classified must be of type : Column, Table, Schema or Data Set. In all cases columns are the ones being classified (all columns related to given assets).
    Parameters:
      `id` - UUID of asset
    Returns:
      started job

  - ### classifyAsset

    UUID classifyAsset(UUID id)
    Starts a job that classifies assets by external service based on sample data. The assets that can be classified must be of type : Column, Table, Schema or Data Set. In all cases columns are the ones being classified (all columns related to given assets).
    Parameters:
      `id` - UUID of asset
    Returns:
      UUID of started job

  - ### classificationJob

    @Deprecated(since="2025.01") Job classificationJob(ClassifyRequest classifyRequest)
    Deprecated.
    Starts a job that classifies assets by external service based on sample data. The assets that can be classified must be of type : Column, Table, Schema or Data Set. In all cases columns are the ones being classified (all columns related to given assets).
    Parameters:
      `classifyRequest` - request containing data of assets to classify
    Returns:
      classification job that is running the classification process.
    Throws:
      `ApiIllegalArgumentException` - when no assetIds provided

  - ### classifyAssets

    UUID classifyAssets(ClassifyRequest classifyRequest)
    Starts a job that classifies assets by external service based on sample data. The assets that can be classified must be of type : Column, Table, Schema or Data Set. In all cases columns are the ones being classified (all columns related to given assets).
    Parameters:
      `classifyRequest` - request containing data of assets to classify
    Returns:
      classification job that is running the classification process.
    Throws:
      `ApiIllegalArgumentException` - when no assetIds provided

  - ### mergeClassifications

    List<ClassificationMatch> mergeClassifications(String targetClassificationName, List<UUID> classificationIds)
    Searches for all the relations between classifications mentioned in classificationIds and changes the assets to be related to targetClassification instead. After that, it removes all the classes from classificationIds list. Only UserDefinedClassifications can be part of classifications which are going to be merged. It is related to the fact that CollibrainClassification cannot be deleted.
    Parameters:
      `targetClassificationName` - - the name of the target classification, which all the assets will be related to. If classification does not exist yet, it will be created. Can be either UserDefined or Collibrain.
      `classificationIds` - - the list of the classifications which will be merged into target classification and removed. Only UserDefined classifications are allowed.
    Returns:
      The list of all the ClassificationMatch objects which are assigned to the target classification of the merge.