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 Detail

      • addAsset

        Asset addAsset​(AddAssetRequest addAssetRequest)
        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

        Asset changeAsset​(ChangeAssetRequest changeAssetRequest)
        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
      • getAsset

        Asset getAsset​(UUID assetId)
        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
      • exists

        boolean exists​(UUID assetId)
        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

        void removeAsset​(UUID assetId)
        Removes an asset identified by given ID.
        Parameters:
        assetId - the id of the asset to remove
      • removeAssets

        void removeAssets​(List<UUID> assetIds)
        Removes multiple assets.
        Parameters:
        assetIds - the IDs of the assets to remove
      • setAssetTags

        List<Tag> setAssetTags​(SetAssetTagsRequest request)
        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

        List<Tag> addAssetTags​(AddAssetTagsRequest request)
        Adds tags to given asset.
        Parameters:
        request - the tags to be added to given asset
        Returns:
        the added tags
      • removeAssetTags

        void removeAssetTags​(RemoveAssetTagsRequest request)
        Remove tags from given asset.
        Parameters:
        request - the tags to be removed from given asset
      • getAssetTags

        List<Tag> getAssetTags​(UUID assetId)
        Retrieves all tags of given asset.
        Parameters:
        assetId - The id of an asset
        Returns:
        tags of given asset
      • setAssetAttributes

        List<Attribute> setAssetAttributes​(SetAssetAttributesRequest request)
        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

        List<Relation> setAssetRelations​(SetAssetRelationsRequest request)
        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

        List<Responsibility> setAssetResponsibilities​(SetAssetResponsibilitiesRequest request)
        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