org.clapper.curn
Class PersistentFeedData

java.lang.Object
  extended by org.clapper.curn.PersistentFeedData

public class PersistentFeedData
extends java.lang.Object

A PersistentFeedData object contains feed cache data and related metadata for a single feed (or channel), in a form suitable for saving to and restoring from an external store. The data are organized to make persistence operations easier. At runtime, the data are reorganized: The cache-specific data is stored in the feed cache (see FeedCache) and other metadata items are parceled out to various plug-ins.

There are three categories of persistent feed data:

WARNING: This class is not thread-safe.

Version:
$Revision: 6547 $
See Also:
FeedCache, DataPersister, PersistentFeedItemData

Constructor Summary
PersistentFeedData()
          Allocate a new empty PersistentFeedData object.
PersistentFeedData(FeedCacheEntry feedCacheEntry)
          Creates a new instance of PersistentFeedData.
 
Method Summary
 void addFeedMetadata(java.util.Collection<PersistentMetadataGroup> metadata)
          Add a metadata group (i.e., all the metadata within a given namespace) to this object.
 void addFeedMetadataGroup(PersistentMetadataGroup metadataGroup)
          Add a metadata group (i.e., all the metadata within a given namespace) to this object.
 void addPersistentFeedItem(PersistentFeedItemData itemData)
          Add persistent data for a feed item to this object.
 FeedCacheEntry getFeedCacheEntry()
          Get the FeedCacheEntry for the feed
 java.util.Collection<PersistentMetadataGroup> getFeedMetadata()
          Get the extra metadata associated with the feed.
 java.util.Collection<PersistentFeedItemData> getPersistentFeedItems()
          Get the list of PersistentFeedItemData entries associated with this feed.
 void setFeedCacheEntry(FeedCacheEntry feedCacheEntry)
          Set the FeedCacheEntry field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentFeedData

public PersistentFeedData(FeedCacheEntry feedCacheEntry)
Creates a new instance of PersistentFeedData.

Parameters:
feedCacheEntry - the FeedCacheEntry for the channel/feed

PersistentFeedData

public PersistentFeedData()
Allocate a new empty PersistentFeedData object.

Method Detail

getFeedCacheEntry

public FeedCacheEntry getFeedCacheEntry()
Get the FeedCacheEntry for the feed

Returns:
the FeedCacheEntry

setFeedCacheEntry

public final void setFeedCacheEntry(FeedCacheEntry feedCacheEntry)
Set the FeedCacheEntry field.

Parameters:
feedCacheEntry - the FeedCacheEntry object for the channel/feed

addPersistentFeedItem

public void addPersistentFeedItem(PersistentFeedItemData itemData)
Add persistent data for a feed item to this object.

Parameters:
itemData - the PersistentFeedItemData object to add

getPersistentFeedItems

public java.util.Collection<PersistentFeedItemData> getPersistentFeedItems()
Get the list of PersistentFeedItemData entries associated with this feed.

Returns:
a read-only collection of PersistentFeedItemData objects and empty collection if there are none.
See Also:
addPersistentFeedItem(org.clapper.curn.PersistentFeedItemData)

addFeedMetadataGroup

public void addFeedMetadataGroup(PersistentMetadataGroup metadataGroup)
Add a metadata group (i.e., all the metadata within a given namespace) to this object.

Parameters:
metadataGroup - the group of metadata

addFeedMetadata

public void addFeedMetadata(java.util.Collection<PersistentMetadataGroup> metadata)
Add a metadata group (i.e., all the metadata within a given namespace) to this object.

Parameters:
metadata - the metadata

getFeedMetadata

public java.util.Collection<PersistentMetadataGroup> getFeedMetadata()
Get the extra metadata associated with the feed. The returned data is aggregated into individual namespaces.

Returns:
a Collection of PersistentMetadataGroup objects, each one containing the data for one namespace. The collection will be empty if there is no feed metadata.


Copyright © 2004-2006 Brian M. Clapper. All Rights Reserved.