com.fatwire.gst.foundation.tagging
Interface AssetTaggingService

All Known Implementing Classes:
TableTaggingServiceImpl

public interface AssetTaggingService

Provides core tagging support systems. Note that add, update, and delete methods are smart enough to not fail if passed a non-tagged asset.

Since:
Jul 28, 2010
Author:
Tony Field

Method Summary
 void addAsset(com.fatwire.assetapi.data.AssetId id)
          Handle adding a tagged asset.
 void clearCacheForTag(Collection<Tag> tags)
          Clear any pagelets containing the specified tags.
 void deleteAsset(com.fatwire.assetapi.data.AssetId id)
          Handle deleting tagged asset.
 Collection<Tag> getTags(com.fatwire.assetapi.data.AssetId id)
          Look up the tags for an asset.
 Collection<Tag> getTags(Collection<com.fatwire.assetapi.data.AssetId> ids)
          Get the tags corresponding to a whole collection of AssetIds.
 boolean isTagged(com.fatwire.assetapi.data.AssetId id)
          Returns true if an asset is tagged, false otherwise
 Collection<com.fatwire.assetapi.data.AssetId> lookupTaggedAssets(Tag tag)
          Return a collection of assets that are tagged with the specified tag.
 void recordCacheDependency(Tag tag)
          Record the specified tag as a dependency on the current pagelet
 void updateAsset(com.fatwire.assetapi.data.AssetId id)
          Handle updating tagged asset.
 

Method Detail

getTags

Collection<Tag> getTags(com.fatwire.assetapi.data.AssetId id)
Look up the tags for an asset. Returns an empty list if none or set or if the asset does not have a tag attribute or field

Parameters:
id - asset id
Returns:
collection of tags. Never null

getTags

Collection<Tag> getTags(Collection<com.fatwire.assetapi.data.AssetId> ids)
Get the tags corresponding to a whole collection of AssetIds. There is no way to determine which tags correspond to each of the input asset.

Parameters:
ids - asset ids, some of which may be tagged
Returns:
tags, never null

clearCacheForTag

void clearCacheForTag(Collection<Tag> tags)
Clear any pagelets containing the specified tags.

Parameters:
tags - tags

recordCacheDependency

void recordCacheDependency(Tag tag)
Record the specified tag as a dependency on the current pagelet

Parameters:
tag - tag

addAsset

void addAsset(com.fatwire.assetapi.data.AssetId id)
Handle adding a tagged asset. If the asset is not tagged, nothing happens.

Parameters:
id - asset with tag

updateAsset

void updateAsset(com.fatwire.assetapi.data.AssetId id)
Handle updating tagged asset. If the asset is not tagged, nothing happens.

Parameters:
id - asset with tag

deleteAsset

void deleteAsset(com.fatwire.assetapi.data.AssetId id)
Handle deleting tagged asset. If the asset is not tagged, nothing happens.

Parameters:
id - tagged asset

lookupTaggedAssets

Collection<com.fatwire.assetapi.data.AssetId> lookupTaggedAssets(Tag tag)
Return a collection of assets that are tagged with the specified tag.

Parameters:
tag - tag to use to look up assets
Returns:
collection of assets that have the specified tag set. May return an empty list; never returns null.

isTagged

boolean isTagged(com.fatwire.assetapi.data.AssetId id)
Returns true if an asset is tagged, false otherwise

Parameters:
id - id of asset
Returns:
true if it's tagged, false otherwise


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.