com.atlassian.gadgets.directory.internal
Class GadgetFeedsSpecProvider

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

public class GadgetFeedsSpecProvider
extends Object
implements com.atlassian.gadgets.GadgetSpecProvider


Nested Class Summary
static class GadgetFeedsSpecProvider.FeedSpecProvider
           
 
Constructor Summary
GadgetFeedsSpecProvider(org.codehaus.httpcache4j.cache.HTTPCache http, SubscribedGadgetFeedStore store, TransactionRunner transactionRunner, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
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)
           
 boolean containsFeed(String feedId)
          Returns true if there is a subscribed feed with the given ID, false otherwise.
 Iterable<URI> entries()
           
 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,
                               com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

contains

public boolean contains(URI gadgetSpecUri)
Specified by:
contains in interface com.atlassian.gadgets.GadgetSpecProvider

entries

public Iterable<URI> entries()
Specified by:
entries in interface com.atlassian.gadgets.GadgetSpecProvider

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 © 2012 Atlassian. All Rights Reserved.