com.fatwire.gst.foundation.tagging.db
Class TableTaggingServiceImpl

java.lang.Object
  extended by com.fatwire.gst.foundation.tagging.db.TableTaggingServiceImpl
All Implemented Interfaces:
AssetTaggingService

public final class TableTaggingServiceImpl
extends Object
implements AssetTaggingService

Database-backed implementation of AsseTaggingService

Since:
Jul 28, 2010
Author:
Tony Field

Field Summary
static String TABLE_ACL_LIST
           
static String TAGREGISTRY_TABLE
           
 
Constructor Summary
TableTaggingServiceImpl(COM.FutureTense.Interfaces.ICS ics)
           
 
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.
 void install()
           
 boolean isInstalled()
           
 boolean isTagged(com.fatwire.assetapi.data.AssetId id)
          Returns true if an asset is tagged, false otherwise
 boolean isTagged(com.fatwire.gst.foundation.tagging.db.TableTaggingServiceImpl.TaggedAsset ta)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAGREGISTRY_TABLE

public static String TAGREGISTRY_TABLE

TABLE_ACL_LIST

public static String TABLE_ACL_LIST
Constructor Detail

TableTaggingServiceImpl

public TableTaggingServiceImpl(COM.FutureTense.Interfaces.ICS ics)
Method Detail

install

public void install()

isInstalled

public boolean isInstalled()

recordCacheDependency

public void recordCacheDependency(Tag tag)
Description copied from interface: AssetTaggingService
Record the specified tag as a dependency on the current pagelet

Specified by:
recordCacheDependency in interface AssetTaggingService
Parameters:
tag - tag

clearCacheForTag

public void clearCacheForTag(Collection<Tag> tags)
Description copied from interface: AssetTaggingService
Clear any pagelets containing the specified tags.

Specified by:
clearCacheForTag in interface AssetTaggingService
Parameters:
tags - tags

addAsset

public void addAsset(com.fatwire.assetapi.data.AssetId id)
Description copied from interface: AssetTaggingService
Handle adding a tagged asset. If the asset is not tagged, nothing happens.

Specified by:
addAsset in interface AssetTaggingService
Parameters:
id - asset with tag

updateAsset

public void updateAsset(com.fatwire.assetapi.data.AssetId id)
Description copied from interface: AssetTaggingService
Handle updating tagged asset. If the asset is not tagged, nothing happens.

Specified by:
updateAsset in interface AssetTaggingService
Parameters:
id - asset with tag

deleteAsset

public void deleteAsset(com.fatwire.assetapi.data.AssetId id)
Description copied from interface: AssetTaggingService
Handle deleting tagged asset. If the asset is not tagged, nothing happens.

Specified by:
deleteAsset in interface AssetTaggingService
Parameters:
id - tagged asset

getTags

public Collection<Tag> getTags(com.fatwire.assetapi.data.AssetId id)
Description copied from interface: AssetTaggingService
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

Specified by:
getTags in interface AssetTaggingService
Parameters:
id - asset id
Returns:
collection of tags. Never null

getTags

public Collection<Tag> getTags(Collection<com.fatwire.assetapi.data.AssetId> ids)
Description copied from interface: AssetTaggingService
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.

Specified by:
getTags in interface AssetTaggingService
Parameters:
ids - asset ids, some of which may be tagged
Returns:
tags, never null

lookupTaggedAssets

public Collection<com.fatwire.assetapi.data.AssetId> lookupTaggedAssets(Tag tag)
Description copied from interface: AssetTaggingService
Return a collection of assets that are tagged with the specified tag.

Specified by:
lookupTaggedAssets in interface AssetTaggingService
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

public boolean isTagged(com.fatwire.assetapi.data.AssetId id)
Description copied from interface: AssetTaggingService
Returns true if an asset is tagged, false otherwise

Specified by:
isTagged in interface AssetTaggingService
Parameters:
id - id of asset
Returns:
true if it's tagged, false otherwise

isTagged

public boolean isTagged(com.fatwire.gst.foundation.tagging.db.TableTaggingServiceImpl.TaggedAsset ta)


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