Class ViewableFilter
- java.lang.Object
-
- org.sakaiproject.announcement.api.ViewableFilter
-
- All Implemented Interfaces:
org.sakaiproject.javax.Filter
public class ViewableFilter extends Object implements org.sakaiproject.javax.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 Summary
Constructors Constructor Description ViewableFilter(org.sakaiproject.javax.Filter filter, org.sakaiproject.time.api.Time t, int numberOfAnnouncements, AnnouncementService announcementService)Show viewable announcements and limit the result
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(Object o)Does this object satisfy the criteria of the filter?
-
-
-
Constructor Detail
-
ViewableFilter
public ViewableFilter(org.sakaiproject.javax.Filter filter, org.sakaiproject.time.api.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 showednumberOfAnnouncements- Limited to latest numberOfAnnouncements
-
-
Method Detail
-
accept
public boolean accept(Object o)
Does this object satisfy the criteria of the filter?- Specified by:
acceptin interfaceorg.sakaiproject.javax.Filter- Parameters:
o- The object- Returns:
- true if the object is accepted by the filter, false if not.
-
-