Interface AssetApi
public interface AssetApi
Contains all api operations for handling assets.
An asset is the fundamental building block or resource for which you want to capture information. An asset belongs to exactly one domain and has a unique name within that domain. An asset is the instance of exactly one asset type.
-
Method Summary
Modifier and TypeMethodDescriptionaddAsset
(AddAssetRequest addAssetRequest) Adds a new asset into a domain.addAssets
(List<AddAssetRequest> addAssetRequests) Adds multiple assets.addAssetsWithValidation
(List<AddAssetRequest> addAssetRequests) addAssetTags
(AddAssetTagsRequest request) Adds tags to given asset.addAssetWithValidation
(AddAssetRequest addAssetRequest) changeAsset
(ChangeAssetRequest changeAssetRequest) Changes the asset with the information that is present in the request.changeAssets
(List<ChangeAssetRequest> changeAssetRequests) Changes multiple assets.boolean
Returns true if an asset with given ID exists.findAssets
(FindAssetsRequest findAssetsRequest) Returns assets matching the given search criteria.findAssetsByIds
(Collection<UUID> assetIds) Get list of assets identified by given IDs, silently ignore non-existing IDs.Returns an asset identified by given ID.getAssetTags
(UUID assetId) Retrieves all tags of given asset.void
removeAsset
(UUID assetId) Removes an asset identified by given ID.void
removeAssets
(List<UUID> assetIds) Removes multiple assets.void
removeAssetTags
(RemoveAssetTagsRequest request) Remove tags from given asset.Sets attributes of given type for given asset.Sets relations of given type for given asset.Sets responsibilities with given role for given asset.setAssetTags
(SetAssetTagsRequest request) Sets tags for given asset.
-
Method Details
-
addAsset
Adds a new asset into a domain.- Parameters:
addAssetRequest
- the properties of the asset to be added- Returns:
- the newly added asset
-
addAssets
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<Asset> addAssets(List<AddAssetRequest> addAssetRequests) Adds multiple assets.- Parameters:
addAssetRequests
- the properties of the assets to be added- Returns:
- the added assets
-
changeAsset
Changes the asset with the information that is present in the request.- Parameters:
changeAssetRequest
- changes that to be performed on the asset- Returns:
- the changed asset
-
changeAssets
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<Asset> changeAssets(List<ChangeAssetRequest> changeAssetRequests) Changes multiple assets.- Parameters:
changeAssetRequests
- the properties of the assets to be changed- Returns:
- the changed assets
-
addAssetWithValidation
-
getAsset
Returns an asset identified by given ID.- Parameters:
assetId
- the ID of the asset- Returns:
- the asset
-
findAssetsByIds
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionCountFormatter.class) List<Asset> findAssetsByIds(Collection<UUID> assetIds) Get list of assets identified by given IDs, silently ignore non-existing IDs.- Parameters:
assetIds
- The list of asset ids.- Returns:
- The list of
Asset
. - Throws:
IllegalArgumentException
- if the number if given ids is greater than 1000
-
addAssetsWithValidation
-
findAssets
@SecurityAuditMethod(resultFormatter=com.collibra.dgc.core.api.internal.security.audit.formatter.PagedResponseCountFormatter.class) CursorPagedResponse<Asset> findAssets(FindAssetsRequest findAssetsRequest) Returns assets matching the given search criteria.- Parameters:
findAssetsRequest
- the search criteria for assets- Returns:
- the found assets
-
exists
Returns true if an asset with given ID exists.- Parameters:
assetId
- the ID of the asset- Returns:
- true if an asset with given ID exists,
false
otherwise
-
removeAsset
Removes an asset identified by given ID.- Parameters:
assetId
- theid
of the asset to remove
-
removeAssets
Removes multiple assets.- Parameters:
assetIds
- the IDs of the assets to remove
-
setAssetTags
Sets tags for given asset. Given asset will contain only tags that are present in this request after the request is performed.- Parameters:
request
- the tags to be set on given asset- Returns:
- the tags that were set
-
addAssetTags
Adds tags to given asset.- Parameters:
request
- the tags to be added to given asset- Returns:
- the added tags
-
removeAssetTags
Remove tags from given asset.- Parameters:
request
- the tags to be removed from given asset
-
getAssetTags
Retrieves all tags of given asset.- Parameters:
assetId
- Theid
of an asset- Returns:
- tags of given asset
-
setAssetAttributes
Sets attributes of given type for given asset. Given asset will contain only attribute values (for given type) that are present in this request after the request is performed.- Parameters:
request
- the attributes to be set on given asset (for given type)- Returns:
- the attributes that were set
-
setAssetRelations
Sets relations of given type for given asset. Given asset will contain only relations (for given type) that are present in this request after the request is performed.- Parameters:
request
- the relations to be set on given asset (for given type)- Returns:
- the relations that were set
-
setAssetResponsibilities
Sets responsibilities with given role for given asset. Given asset will contain only responsibilities (with given role) that are present in this request after the request is performed.- Parameters:
request
- the responsibilities to be set on given asset (with given role)- Returns:
- the responsibilities that were set
-