Package com.jalios.jcms
Class NotificationQuery
- java.lang.Object
-
- com.jalios.jcms.NotificationQuery
-
public class NotificationQuery extends java.lang.Object
This class retrieves all the publication published, updated or modified for a specified notification period.It provides two methods to retrieve the publication corresponding to one or several members' notification criteria :
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Constructor Summary
Constructors Constructor Description NotificationQuery(int period)
Create a new NotificationQuery for the specified period and immediately retrieve the visible publications published, updated or modified during this period.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Publication>
getMemberPublicationSet(Member mbr)
This methods finds publications matching notification criterias of query period for the specified member.java.util.Map<Member,java.util.Set<? extends Publication>>
getMemberToPublicationSetMap(java.util.Set<Member> memberSet)
This methods finds for each members to be notified the publications matching notification criterias of given period.
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NotificationQuery
public NotificationQuery(int period)
Create a new NotificationQuery for the specified period and immediately retrieve the visible publications published, updated or modified during this period.- Parameters:
period
- the period as returned byNotificationManager.getAvailablePeriods()
-
-
Method Detail
-
getMemberToPublicationSetMap
public java.util.Map<Member,java.util.Set<? extends Publication>> getMemberToPublicationSetMap(java.util.Set<Member> memberSet)
This methods finds for each members to be notified the publications matching notification criterias of given period.- Parameters:
memberSet
- The Set of Member for which to retrieve the Publication- Returns:
- a Map with Member as the key and the Set of Publication to notify as the value. never return null.
-
getMemberPublicationSet
public java.util.Set<Publication> getMemberPublicationSet(Member mbr)
This methods finds publications matching notification criterias of query period for the specified member.- Parameters:
mbr
- the member for which publicaiton are being retrieved- Returns:
- a Set of Publication (sorted by mdate), never return null.
-
-