Class ViewableFilter

  • All Implemented Interfaces:
    Filter

    public class ViewableFilter
    extends Object
    implements Filter
    Allows some basic functions on announcements. Due to limitations of EntityBroker the internal URLs of the announcements service can't be exposed directly, so we have to map them, with assumptions about characters used in IDs. Basically we pack together the {siteId}:{channelId}:{announcementId} into the ID.
    • Constructor Detail

      • ViewableFilter

        public ViewableFilter​(Filter filter,
                              Time t,
                              int numberOfAnnouncements,
                              AnnouncementService announcementService)
        Show viewable announcements and limit the result
        Parameters:
        filter - The other filter we check with.
        t - Min Time to be showed
        numberOfAnnouncements - Limited to latest numberOfAnnouncements
    • Method Detail

      • accept

        public boolean accept​(Object o)
        Does this object satisfy the criteria of the filter?
        Specified by:
        accept in interface Filter
        Parameters:
        o - The object
        Returns:
        true if the object is accepted by the filter, false if not.