public interface TagManager
Modifier and Type | Method and Description |
---|---|
void |
addTag(String tagname, AssetId asset)
Adds a tag to given asset.
|
void |
addTag(String category, String tagName, String tagValue, AssetId asset)
Adds a tag to given asset.
|
void |
addTag(String type, String tagName, String tagValue, AssetId asset, boolean isAssetSave, boolean isAfterPublish)
Add a tag to the give asset.
|
void |
deleteTags(AssetId asset, boolean isAssetSave, boolean isPublish)
Completely delete all tags for given asset
|
void |
deleteVoids()
Delete all voided tags
|
List<String> |
getAllTags(List<AssetId> assetIds)
Get all the tags assigned to the give list of assets
|
List<Tag> |
getAllTags(String category, boolean excludeVoided)
Return list of tags given parameters.
|
List<AssetId> |
getAssets(String category, String tagName)
Return list of asset ids given category and tag name.
|
List<AssetId> |
getAssets(String category, String tagName, String tagValue, String owner)
Return list of asset ids given parameters.
|
List<String> |
getCommonTags(List<AssetId> assetIds)
Get all the tags common to the give list of assets
|
List<String> |
getSystemTags()
Get all available tags in the system
|
List<TagNode> |
getSystemTagTree()
Get all available tags in the system as TagNodes.
|
List<TagNode> |
getSystemTagTree(List<String> tagNames) |
List<Tag> |
getTags(String category, AssetId asset)
Return non-voided tags given category and asset id.
|
List<Tag> |
getTags(String type, AssetId asset, boolean excludeVoid)
Get all tags of given type and asset.
|
void |
removeTag(String category, String tagName, AssetId asset)
Removes tag from asset.
|
void |
saveTags(List<AssetId> assetIds, String[] newTags, String[] deleteTags)
Save and delete tags for multiple assets.
|
void |
saveTags(List<Tag> tags)
Saves given list of tags.
|
List<Tag> |
saveTags(List<Tag> tags, boolean isAssetSave, boolean isAfterPublish)
Saves given list of tags.
|
void addTag(String tagname, AssetId asset) throws AssetAccessException
tagname
- tag nameasset
- asset idAssetAccessException
- an AssetAccessExceptionvoid addTag(String category, String tagName, String tagValue, AssetId asset) throws AssetAccessException
#addTag(String)
.category
- tag category. A value of empty string is equivalent to null.tagName
- tag nametagValue
- tag valueasset
- asset identifierAssetAccessException
- an AssetAccessExceptionvoid saveTags(List<Tag> tags) throws AssetAccessException
TagManager.addTag(String, String, String, AssetId)
.tags
- list of tagsAssetAccessException
- an AssetAccessExceptionList<Tag> getTags(String category, AssetId asset)
category
- tag category. If set to null or empty String, this method will return tags of any categoryasset
- asset identifierList<AssetId> getAssets(String category, String tagName)
category
- tag category. If set to null or empty String, this method will ignore categorytagName
- tag nameList<AssetId> getAssets(String category, String tagName, String tagValue, String owner)
category
- tag category. If set to null or empty String, this method will ignore categorytagName
- tag nametagValue
- tag valueowner
- owner of tagList<Tag> getAllTags(String category, boolean excludeVoided)
category
- tag category. If set to null or empty String, this method will ignore categoryexcludeVoided
- false includes voided tags.void removeTag(String category, String tagName, AssetId asset) throws AssetAccessException
category
- tag category. If set to null or empty String, this method will ignore categorytagName
- tag nameasset
- asset identifierAssetAccessException
- an AssetAccessExceptionvoid deleteVoids() throws AssetAccessException
AssetAccessException
- an AssetAccessExceptionList<String> getAllTags(List<AssetId> assetIds)
assetIds
- of unique asset idsList<String> getCommonTags(List<AssetId> assetIds)
assetIds
- of unique asset idsList<String> getSystemTags()
void saveTags(List<AssetId> assetIds, String[] newTags, String[] deleteTags) throws AssetAccessException
assetIds
- the asset idsnewTags
- a list of new tags to assign to the assetsdeleteTags
- a list of tags to delete from the assetsAssetAccessException
- an AssetAccessExceptionList<TagNode> getSystemTagTree()
List<Tag> getTags(String type, AssetId asset, boolean excludeVoid)
type
- asset typeasset
- asset idexcludeVoid
- false includes voided tags.List<Tag> saveTags(List<Tag> tags, boolean isAssetSave, boolean isAfterPublish) throws AssetAccessException
tags
- a list of tags to saveisAssetSave
- a booleanisAfterPublish
- a booleanAssetAccessException
- an AssetAccessExceptionvoid addTag(String type, String tagName, String tagValue, AssetId asset, boolean isAssetSave, boolean isAfterPublish) throws AssetAccessException
type
- asset typetagName
- tag nametagValue
- tag valueasset
- asset idisAssetSave
- a booleanisAfterPublish
- a booleanAssetAccessException
- an AssetAccessExceptionvoid deleteTags(AssetId asset, boolean isAssetSave, boolean isPublish) throws AssetAccessException
asset
- asset idisAssetSave
- a booleanisPublish
- a booleanAssetAccessException
- an AssetAccessException