net.sourceforge.java.feednread.backend.archive
Interface IArchivable

All Known Implementing Classes:
NewsFeed

public interface IArchivable

Interface to control the read/write access to a NewsFeedArchive. Use synchronizeWithArchive(NewsFeedArchive) to read from and addToArchive(NewsFeedArchive) to write to the archive.

Author:
Sebastian Machhausen

Method Summary
 void addToArchive(NewsFeedArchive archive)
           Adds a NewsFeed to the specified NewsFeedArchive.
 void synchronizeWithArchive(NewsFeedArchive archive)
           Synchronizes a NewsFeed with the specified NewsFeedArchive.
 

Method Detail

addToArchive

public void addToArchive(NewsFeedArchive archive)

Adds a NewsFeed to the specified NewsFeedArchive. This is done by querying a potential existing ArchivedNewsFeed and adding all NewsFeedEntry objects to it. If no ArchivedNewsFeed yet exists in the specified NewsFeedArchive a new one has to be created and filled with the NewsFeed's entries.

Parameters:
archive - the NewsFeedArchive to use for synchronization
See Also:
NewsFeedArchive

synchronizeWithArchive

public void synchronizeWithArchive(NewsFeedArchive archive)

Synchronizes a NewsFeed with the specified NewsFeedArchive. This is done by reconciling each embedded NewsFeedEntry with the entries in an archived ArchivedNewsFeed.

Parameters:
archive - the NewsFeedArchive to use for synchronization
See Also:
NewsFeedArchive