Package com.jalios.jcms.rss
Class RssManager
- java.lang.Object
-
- com.jalios.jcms.rss.RssManager
-
public class RssManager extends java.lang.Object
RSS manager- Since:
- JCMS 6.3
- Author:
- Ludovic SMADJA
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PUBLICATION_DATE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDefaultListener(RssEventListener listener)
AddRssEventListener
void
addDefaultListeners(java.util.Set<RssEventListener> listeners)
AddRssEventListener
set to existing listenersvoid
cleanRssTracker(Member member, java.lang.String channelSource, java.util.List<java.lang.String> itemIdList)
Clean rssTracker tablejava.util.Set<RssEventListener>
getDefaultListeners()
returns theRssEventListener
setstatic RssManager
getInstance()
RssEventListener
getRssTrackerListener()
Get Rss tracker listenerjava.util.Set<RssTracker>
getSessionRssTrackerSet(Member member)
ReturnsRssTracker
set for a memberstatic java.util.List<RssItem>
getSortItemList(java.util.List<RssItem> itemList, java.lang.String sortAttribute)
generated a sortedList
of the providedList
.RssTracker
isRead(Member member, java.lang.String channelSource, java.lang.String itemId, java.util.Set<RssTracker> trackersSet)
Indicates if a rss is already readvoid
processRssTrackingEvent(Member currentLoggedMember, java.lang.String channelSource, java.lang.String itemId, boolean articleRead)
Process tracking eventvoid
removeDefaultListener(RssEventListener listener)
RemoveRssEventListener
from existing listenervoid
removeDefaultListeners(java.util.List<RssEventListener> listeners)
RemoveRssEventListener
from listener listvoid
setDefaultListeners(java.util.Set<RssEventListener> listeners)
-
-
-
Method Detail
-
getInstance
public static RssManager getInstance()
-
getDefaultListeners
public java.util.Set<RssEventListener> getDefaultListeners()
returns theRssEventListener
set- Returns:
- the set
-
setDefaultListeners
public void setDefaultListeners(java.util.Set<RssEventListener> listeners)
- Parameters:
listeners
- theRssEventListener
set to set
-
addDefaultListeners
public void addDefaultListeners(java.util.Set<RssEventListener> listeners)
AddRssEventListener
set to existing listeners- Parameters:
listeners
- the set
-
removeDefaultListeners
public void removeDefaultListeners(java.util.List<RssEventListener> listeners)
RemoveRssEventListener
from listener list- Parameters:
listeners
- theRssEventListener
to remove
-
addDefaultListener
public void addDefaultListener(RssEventListener listener)
AddRssEventListener
- Parameters:
listener
- theRssEventListener
-
removeDefaultListener
public void removeDefaultListener(RssEventListener listener)
RemoveRssEventListener
from existing listener- Parameters:
listener
- theRssEventListener
-
getRssTrackerListener
public RssEventListener getRssTrackerListener()
Get Rss tracker listener
-
processRssTrackingEvent
public void processRssTrackingEvent(Member currentLoggedMember, java.lang.String channelSource, java.lang.String itemId, boolean articleRead)
Process tracking event- Parameters:
currentLoggedMember
- the currentMember
channelSource
- the channel sourceitemId
- the item id
-
getSessionRssTrackerSet
public java.util.Set<RssTracker> getSessionRssTrackerSet(Member member)
ReturnsRssTracker
set for a member- Parameters:
member
- theMember
- Returns:
- the
Set
ofRssTracker
-
isRead
public RssTracker isRead(Member member, java.lang.String channelSource, java.lang.String itemId, java.util.Set<RssTracker> trackersSet)
Indicates if a rss is already read- Parameters:
member
- the currentMember
channelSource
- the channel sourceitemId
- the item idtrackersSet
-Set
of existingRssTracker
- Returns:
- the RssTracker instance if exists, null otherwise
-
cleanRssTracker
public void cleanRssTracker(Member member, java.lang.String channelSource, java.util.List<java.lang.String> itemIdList)
Clean rssTracker table- Parameters:
member
- theMember
objectchannelSource
- the channel sourceitemIdList
-List
of item id to clean
-
getSortItemList
public static java.util.List<RssItem> getSortItemList(java.util.List<RssItem> itemList, java.lang.String sortAttribute)
- Parameters:
itemList
- theList
ofRssItem
to sortsortAttribute
- the sort attribute (null for no sort, available element is publicationDate)- Returns:
- the sorted
List
if any sort should be done (in this case, the list is cloned)
-
-