Interface AssignmentApi
public interface AssignmentApi
Contains all api operations for retrieving assignments.
Assignment is a collection of rules and statuses which apply to given scope which is represented by the reference to the asset type it refers and might be limited to some subset of communities and/or domains.
-
Method Summary
Modifier and TypeMethodDescriptionaddAssignment
(AddAssignmentRequest assignmentRequest) Add a new assignment.changeAssignment
(ChangeAssignmentRequest changeAssignmentRequest) Update the assignment, only non-null values will be changed.findAssignmentsForResource
(FindAssignmentsForResourceRequest findAssignmentsForResourceRequest) Returns all the assignments where a given resource is assigned.getAssignmentForAsset
(UUID assetId) Returns the assignment that defines the types that can be used with given asset.getAssignmentsForAssetType
(UUID assetTypeId) Returns all assignments of given asset type.getAvailableAssetTypesForDomain
(UUID domainId) Returns all the asset types that are available in the given domain.getAvailableAttributeTypes
(UUID assetId) Returns attribute types available for the asset.getAvailableComplexRelationTypes
(UUID assetId) Returns complex relation types available for the asset.getAvailableRelationTypes
(UUID assetId) Returns relation types available for the asset.void
removeAssignment
(UUID id) Remove assignment or throw an exception if it doesn't exist already.
-
Method Details
-
getAssignmentForAsset
Returns the assignment that defines the types that can be used with given asset. If the type of an asset has no direct assignment it will return inherited assignment.- Parameters:
assetId
- the ID of the asset- Returns:
- the found assignment
-
getAssignmentsForAssetType
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionCountFormatter.class) List<Assignment> getAssignmentsForAssetType(UUID assetTypeId) Returns all assignments of given asset type.- Parameters:
assetTypeId
- the ID of the asset type- Returns:
- the list of assignments
-
getAvailableAssetTypesForDomain
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionCountFormatter.class) List<AssetType> getAvailableAssetTypesForDomain(UUID domainId) Returns all the asset types that are available in the given domain.- Parameters:
domainId
- the ID of the domain to search in- Returns:
- the list of asset types
-
getAvailableAttributeTypes
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionCountFormatter.class) List<AttributeType> getAvailableAttributeTypes(UUID assetId) Returns attribute types available for the asset.- Parameters:
assetId
- the ID of the asset- Returns:
- the list of attribute types
-
getAvailableRelationTypes
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionCountFormatter.class) List<RelationType> getAvailableRelationTypes(UUID assetId) Returns relation types available for the asset.- Parameters:
assetId
- the ID of the asset- Returns:
- the list of relation types
-
getAvailableComplexRelationTypes
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionCountFormatter.class) List<ComplexRelationType> getAvailableComplexRelationTypes(UUID assetId) Returns complex relation types available for the asset.- Parameters:
assetId
- the ID of the asset- Returns:
- the list of complex relation types
-
addAssignment
Add a new assignment.- Parameters:
assignmentRequest
- parameters describing the new assignment- Returns:
- added assignment
-
removeAssignment
Remove assignment or throw an exception if it doesn't exist already.- Parameters:
id
- uuid of an assignment to be removed
-
changeAssignment
Update the assignment, only non-null values will be changed.- Parameters:
changeAssignmentRequest
- with assignmentId equal to the id of an existing assignment.- Returns:
- updated assignment
-
findAssignmentsForResource
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionCountFormatter.class) List<Assignment> findAssignmentsForResource(FindAssignmentsForResourceRequest findAssignmentsForResourceRequest) Returns all the assignments where a given resource is assigned.- Parameters:
findAssignmentsForResourceRequest
- parameters describing the resource.- Returns:
- the assignments where the resource is assigned.
-