com.fatwire.assetapi.data
Interface TagManager


public interface TagManager


Method Summary
 void addTag(java.lang.String tagname, AssetId asset)
          Adds a tag to given asset.
 void addTag(java.lang.String category, java.lang.String tagName, java.lang.String tagValue, AssetId asset)
          Adds a tag to given asset.
 void deleteVoids()
          Delete all voided tags
 java.util.List<Tag> getAllTags(java.lang.String category, boolean excludeVoided)
          Return list of tags given parameters.
 java.util.List<AssetId> getAssets(java.lang.String category, java.lang.String tagName)
          Return list of asset ids given category and tag name.
 java.util.List<AssetId> getAssets(java.lang.String category, java.lang.String tagName, java.lang.String tagValue, java.lang.String owner)
          Return list of asset ids given parameters.
 java.util.List<Tag> getTags(java.lang.String category, AssetId asset)
          Return non-voided tags given category and asset id.
 void removeTag(java.lang.String category, java.lang.String tagName, AssetId asset)
          Removes tag from asset.
 void saveTag(java.util.List<Tag> tags)
          Saves given list of tags.
 

Method Detail

addTag

void addTag(java.lang.String tagname,
            AssetId asset)
            throws AssetAccessException
Adds a tag to given asset. If the tag already exists, it'll be replaced.

Parameters:
tagname - tag name
Throws:
AssetAccessException

addTag

void addTag(java.lang.String category,
            java.lang.String tagName,
            java.lang.String tagValue,
            AssetId asset)
            throws AssetAccessException
Adds a tag to given asset. If the tag already exists, it'll be replaced. Similar to #addTag(String).

Parameters:
category - tag category. A value of empty string is equivalent to null.
tagName - tag name
tagValue - tag value
asset - asset identifier
Throws:
AssetAccessException

saveTag

void saveTag(java.util.List<Tag> tags)
             throws AssetAccessException
Saves given list of tags. Similar to TagManager.addTag(String, String, String, AssetId).

Parameters:
tags - list of tags
Throws:
AssetAccessException

getTags

java.util.List<Tag> getTags(java.lang.String category,
                            AssetId asset)
Return non-voided tags given category and asset id. A render dependency is logged against the asset.

Parameters:
category - tag category. If set to null or empty String, this method will return tags of any category
asset - asset identifier
Returns:
list of tags

getAssets

java.util.List<AssetId> getAssets(java.lang.String category,
                                  java.lang.String tagName)
Return list of asset ids given category and tag name. A render dependency is logged against the tag name.

Parameters:
category - tag category. If set to null or empty String, this method will ignore category
tagName - tag name
Returns:
list of asset ids

getAssets

java.util.List<AssetId> getAssets(java.lang.String category,
                                  java.lang.String tagName,
                                  java.lang.String tagValue,
                                  java.lang.String owner)
Return list of asset ids given parameters. A render dependency is logged against the tag name.

Parameters:
category - tag category. If set to null or empty String, this method will ignore category
tagName - tag name
tagValue - tag value
owner - owner of tag
Returns:
list of asset ids

getAllTags

java.util.List<Tag> getAllTags(java.lang.String category,
                               boolean excludeVoided)
Return list of tags given parameters.

Parameters:
category - tag category. If set to null or empty String, this method will ignore category
excludeVoided - false includes voided tags.
Returns:
list of tag

removeTag

void removeTag(java.lang.String category,
               java.lang.String tagName,
               AssetId asset)
               throws AssetAccessException
Removes tag from asset. This method only voids the tag.

Parameters:
category - tag category. If set to null or empty String, this method will ignore category
tagName - tag name
asset - asset identifier
Throws:
AssetAccessException

deleteVoids

void deleteVoids()
                 throws AssetAccessException
Delete all voided tags

Throws:
AssetAccessException


Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.