Class 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 :

    • Constructor Detail

      • NotificationQuery

        public NotificationQuery​(int period)
        Create a new NotificationQuery for the specified period.

        Immediately retrieve the visible publications published, updated or modified during this period.

        Parameters:
        period - the period as returned by NotificationManager.getAvailablePeriods()
      • NotificationQuery

        protected NotificationQuery​(int period,
                                    java.util.Date executionDate)
        Create a new NotificationQuery for the specified period, indicating the time at which it is being run (for simulation/unittest purpose).
        Parameters:
        period - the period as returned by NotificationManager.getAvailablePeriods()
        executionDate - the Date at which this NotificationQuery is being executed to retrieve the result from the period right before, must not be null
        Since:
        10.0.8 / JCMS-10487
    • Method Detail

      • getMemberToPublicationSetMap

        @Deprecated
        public java.util.Map<Member,​java.util.Set<? extends Publication>> getMemberToPublicationSetMap​(java.util.Set<Member> memberSet)
        Deprecated.
        since JCMS-10131, use getMemberPublicationSet(Member)
        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.