com.atlassian.gadgets.directory.internal
Class GadgetFeedsSpecProvider

java.lang.Object
  extended by com.atlassian.gadgets.directory.internal.GadgetFeedsSpecProvider
All Implemented Interfaces:
GadgetSpecProvider

public class GadgetFeedsSpecProvider
extends Object
implements GadgetSpecProvider


Nested Class Summary
static class GadgetFeedsSpecProvider.FeedSpecProvider
           
 
Constructor Summary
GadgetFeedsSpecProvider(org.codehaus.httpcache4j.cache.HTTPCache http, SubscribedGadgetFeedStore store, TransactionRunner transactionRunner)
           
 
Method Summary
 GadgetFeedsSpecProvider.FeedSpecProvider addFeed(URI feedUri)
          Add a new gadget feed to the list of feeds to get gadget specs from.
 boolean contains(URI gadgetSpecUri)
          Returns true if the URI is in the store, false otherwise.
 boolean containsFeed(String feedId)
          Returns true if there is a subscribed feed with the given ID, false otherwise.
 Iterable<URI> entries()
          Returns all the gadget URIs contained by this store.
 GadgetFeedsSpecProvider.FeedSpecProvider getFeedProvider(String feedId)
          Returns the feed provider for the subscribed feed if it exists, null otherwise.
 Iterable<GadgetFeedsSpecProvider.FeedSpecProvider> getFeedProviders()
           
 Iterable<SubscribedGadgetFeed> getFeeds()
          Returns the feeds that have been subscribed to.
 void removeFeed(String feedId)
          Remove a feed from the list of feeds subscribed to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GadgetFeedsSpecProvider

public GadgetFeedsSpecProvider(org.codehaus.httpcache4j.cache.HTTPCache http,
                               SubscribedGadgetFeedStore store,
                               TransactionRunner transactionRunner)
Method Detail

contains

public boolean contains(URI gadgetSpecUri)
Description copied from interface: GadgetSpecProvider
Returns true if the URI is in the store, false otherwise.

Specified by:
contains in interface GadgetSpecProvider
Parameters:
gadgetSpecUri - URI to check is in the store
Returns:
true if the URI is in the store, false otherwise

entries

public Iterable<URI> entries()
Description copied from interface: GadgetSpecProvider
Returns all the gadget URIs contained by this store.

Specified by:
entries in interface GadgetSpecProvider
Returns:
all the gadget URIs contained by this store.

addFeed

public GadgetFeedsSpecProvider.FeedSpecProvider addFeed(URI feedUri)
Add a new gadget feed to the list of feeds to get gadget specs from.

Parameters:
feedUri - absolute URI of the gadget spec feed
Throws:
GadgetFeedParsingException
NonAtomGadgetSpecFeedException

getFeeds

public Iterable<SubscribedGadgetFeed> getFeeds()
Returns the feeds that have been subscribed to.

Returns:
the feeds that have been subscribed to

containsFeed

public boolean containsFeed(String feedId)
Returns true if there is a subscribed feed with the given ID, false otherwise.

Parameters:
feedId - ID of the feed to check for
Returns:
true if there is a subscribed feed with the given ID, false otherwise

getFeedProvider

public GadgetFeedsSpecProvider.FeedSpecProvider getFeedProvider(String feedId)
Returns the feed provider for the subscribed feed if it exists, null otherwise.

Parameters:
feedId - ID of the feed to get the provider for
Returns:
feed provider for the subscribed feed if it exists, null otherwise.

removeFeed

public void removeFeed(String feedId)
Remove a feed from the list of feeds subscribed to.

Parameters:
feedId - URI of the feed to remove

getFeedProviders

public Iterable<GadgetFeedsSpecProvider.FeedSpecProvider> getFeedProviders()


Copyright © 2009 Atlassian. All Rights Reserved.