fr.paris.lutece.plugins.rss.business
Class RssFeedHome

java.lang.Object
  extended by fr.paris.lutece.plugins.rss.business.RssFeedHome

public final class RssFeedHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for RssFeed objects


Method Summary
static boolean checkUrlNotUsed(java.lang.String strUrl)
          Checks whether the a url is found in one of the external feeds
static RssFeed create(RssFeed rssFeed)
          Creation of an instance of rssFeed
static RssFeed findByPrimaryKey(int nKey, boolean bActive)
          Returns an instance of a rssFeed whose identifier is specified in parameter
static java.util.List<RssFeed> getRssFeeds()
          Returns a list of rss feeds
static java.util.List<RssFeed> getRssFeeds(boolean bActive)
          Returns a list of rss feeds
static fr.paris.lutece.util.ReferenceList getRssFeedsReferenceList()
          Returns a list of rssFeeds objects
static fr.paris.lutece.util.ReferenceList getRssFeedsReferenceList(boolean bActive)
          Returns a list of rssFeeds objects
static void remove(RssFeed rssFeed)
          Remove the RssFeed
static RssFeed setActive(RssFeed rssFeed, boolean bActive)
          De/activate a feed
static RssFeed update(RssFeed rssFeed)
          Update of the rssFeed which is specified in parameter
static RssFeed updateLastFetchInfos(RssFeed rssFeed)
          Update of the rssFeed which is specified in parameter
static RssFeed updateOrder(RssFeed rssFeed, int nNewOrder)
          Updates an active feed to a new order and shifts in-between feeds consequently.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static RssFeed create(RssFeed rssFeed)
Creation of an instance of rssFeed

Parameters:
rssFeed - The instance of the rssFeed which contains the informations to store
Returns:
The instance of rssFeed which has been created with its primary key.

update

public static RssFeed update(RssFeed rssFeed)
Update of the rssFeed which is specified in parameter

Parameters:
rssFeed - The instance of the rssFeed which contains the data to store
Returns:
The instance of the rssFeed which has been updated

updateLastFetchInfos

public static RssFeed updateLastFetchInfos(RssFeed rssFeed)
Update of the rssFeed which is specified in parameter

Parameters:
rssFeed - The instance of the rssFeed which contains the data to store
Returns:
The instance of the rssFeed which has been updated

remove

public static void remove(RssFeed rssFeed)
Remove the RssFeed

Parameters:
rssFeed - The rssFeed to remove

findByPrimaryKey

public static RssFeed findByPrimaryKey(int nKey,
                                       boolean bActive)
Returns an instance of a rssFeed whose identifier is specified in parameter

Parameters:
nKey - The Primary key of the rssFeed
bActive - true if the rssFeed is active, false otherwise
Returns:
An instance of rssFeed

getRssFeeds

public static java.util.List<RssFeed> getRssFeeds()
Returns a list of rss feeds

Returns:
A List of rssFeeds

getRssFeeds

public static java.util.List<RssFeed> getRssFeeds(boolean bActive)
Returns a list of rss feeds

Parameters:
bActive - true for active feeds
Returns:
A List of rssFeeds

getRssFeedsReferenceList

public static fr.paris.lutece.util.ReferenceList getRssFeedsReferenceList()
Returns a list of rssFeeds objects

Returns:
A list of rssFeeds

getRssFeedsReferenceList

public static fr.paris.lutece.util.ReferenceList getRssFeedsReferenceList(boolean bActive)
Returns a list of rssFeeds objects

Parameters:
bActive - true for active feeds
Returns:
A list of rssFeeds

checkUrlNotUsed

public static boolean checkUrlNotUsed(java.lang.String strUrl)
Checks whether the a url is found in one of the external feeds

Parameters:
strUrl - The url to be tested
Returns:
The boolean result

updateOrder

public static RssFeed updateOrder(RssFeed rssFeed,
                                  int nNewOrder)
                           throws java.lang.IndexOutOfBoundsException
Updates an active feed to a new order and shifts in-between feeds consequently. Linked portlets get updated as well.

Parameters:
rssFeed - The feed to update order
nNewOrder - the new order for the feed
Returns:
the feed updated to the new order or null if the feed is inactive
Throws:
java.lang.IndexOutOfBoundsException - if the new order parameter is less than 1 or greater than the current max order

setActive

public static RssFeed setActive(RssFeed rssFeed,
                                boolean bActive)
De/activate a feed

Parameters:
rssFeed - the feed to de/activate
bActive - true to activate the feed, false otherwise
Returns:
the updated feed


Copyright © 2011 Mairie de Paris. All Rights Reserved.