|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.curn.AbstractPersistentDataClient
public class AbstractPersistentDataClient
Abstract class that implements the PersistentDataClient
interface, providing stubs or simple versions of the methods. This class
makes it easier for a class to declare itself as a
PersistentDataClient, even if it doesn't need to implement all
the PersistentDataClient methods.
| Constructor Summary | |
|---|---|
protected |
AbstractPersistentDataClient()
Creates a new instance of AbstractPersistentDataClient |
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getExtraFeedMetadata()
Get any extra metadata (i.e., data that is not associated with a feed or an item) that is to be saved. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadataForFeed(FeedCacheEntry feedData)
Get the metadata that is to be saved with a particular feed or channel. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadataForItem(FeedCacheEntry itemData,
FeedCacheEntry feedData)
Get the metadata that is to be saved with a particular item within a feed. |
java.lang.String |
getMetatdataNamespace()
Get the namespace for this object's metadata. |
void |
parseExtraMetadata(java.lang.String name,
java.lang.String value)
Process an "extra" data item that is not associated with a feed or an item. |
void |
parseFeedMetadata(java.lang.String name,
java.lang.String value,
FeedCacheEntry feedData)
Process a data item that has been read from the metadata store and is associated with a feed (or channel). |
void |
parseItemMetadata(java.lang.String name,
java.lang.String value,
FeedCacheEntry itemData)
Process a data item that has been read from the metadata store and is associated with a cached item. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractPersistentDataClient()
| Method Detail |
|---|
public void parseFeedMetadata(java.lang.String name,
java.lang.String value,
FeedCacheEntry feedData)
throws CurnException
Process a data item that has been read from the metadata store and is associated with a feed (or channel). This method is called when the metadata store is being loaded into memory at the beginning of a curn run. This method is only called for data items within this object's name space.
This stub implementation does nothing.
parseFeedMetadata in interface PersistentDataClientname - the name associated with the data itemvalue - the (string) value of the datafeedData - the FeedCacheEntry record for the feed
CurnException - on errorgetMetatdataNamespace()
public void parseItemMetadata(java.lang.String name,
java.lang.String value,
FeedCacheEntry itemData)
throws CurnException
Process a data item that has been read from the metadata store and is associated with a cached item. This method is called when the metadata store is being loaded into memory at the beginning of a curn run. This method is only called for data items within this object's name space.
This stub implementation does nothing.
parseItemMetadata in interface PersistentDataClientname - the name associated with the data itemvalue - the (string) value of the dataitemData - The FeedCacheEntry data for the item
CurnException - on errorgetMetatdataNamespace()
public void parseExtraMetadata(java.lang.String name,
java.lang.String value)
throws CurnException
Process an "extra" data item that is not associated with a feed or an item. This method is called when the metadata store is being loaded into memory at the beginning of a curn run. This method is only called for data items within this object's name space.
parseExtraMetadata in interface PersistentDataClientname - the name of the data itemvalue - its value
CurnException - on errorgetMetatdataNamespace()
public java.util.Map<java.lang.String,java.lang.String> getMetadataForFeed(FeedCacheEntry feedData)
throws CurnException
Get the metadata that is to be saved with a particular feed or channel.
This stub implementation does nothing and returns an empty map.
getMetadataForFeed in interface PersistentDataClientfeedData - the FeedCacheEntry record for the feed
CurnException - on error
public java.util.Map<java.lang.String,java.lang.String> getMetadataForItem(FeedCacheEntry itemData,
FeedCacheEntry feedData)
throws CurnException
Get the metadata that is to be saved with a particular item within a feed.
This stub implementation does nothing and returns an empty map.
getMetadataForItem in interface PersistentDataClientitemData - the FeedCacheEntry record for the itemfeedData - the FeedCacheEntry record for the parent feed
CurnException - on error
public java.util.Map<java.lang.String,java.lang.String> getExtraFeedMetadata()
throws CurnException
Get any extra metadata (i.e., data that is not associated with a feed or an item) that is to be saved.
This stub implementation does nothing and returns an empty map.
getExtraFeedMetadata in interface PersistentDataClientCurnException - on errorpublic java.lang.String getMetatdataNamespace()
Get the namespace for this object's metadata. The namespace must be unique. Think of it as a package name for the data. Recommendation: Use the fully-qualified class name.
This implementation returns the fully-qualified class name of the subclass.
getMetatdataNamespace in interface PersistentDataClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||