public class HideNotificationServiceDecorator extends Object implements INotificationService
| Modifier and Type | Field and Description |
|---|---|
static Integer |
DEFAULT_HIDE_DURATION |
static String |
HIDE_DURATION_HOURS_PREFERENCE |
| Constructor and Description |
|---|
HideNotificationServiceDecorator() |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(javax.portlet.EventRequest req,
javax.portlet.EventResponse res)
This method allows
INotificationService implementations that
receive portlet events to collect notifications from other portlets in
the portal. |
NotificationResponse |
fetch(javax.portlet.PortletRequest req)
Provide the current collection of Notifications information for the user
represented by the
PortletRequest. |
String |
getName()
Returns the name of the service, which should be unique in the portlet app.
|
void |
invoke(javax.portlet.ActionRequest req,
javax.portlet.ActionResponse res,
boolean refresh)
This method 'primes the pump' for
INotificationService
implementations. |
boolean |
isValid(javax.portlet.PortletRequest req,
NotificationResponse previousResponse)
Indicates whether a previous (presumably cached)
NotificationResponse
is still valid. |
void |
setEnclosedNotificationService(INotificationService enclosedNotificationService) |
public static final String HIDE_DURATION_HOURS_PREFERENCE
public static final Integer DEFAULT_HIDE_DURATION
public void setEnclosedNotificationService(INotificationService enclosedNotificationService)
public String getName()
INotificationServicegetName in interface INotificationServicepublic void invoke(javax.portlet.ActionRequest req,
javax.portlet.ActionResponse res,
boolean refresh)
INotificationServiceINotificationService
implementations. Not all concrete services will need this method, and
those that don't can safely make it a no-op. But those that do need it
can rely on receiving a call to invoke() before receiving a
call to fetch().invoke in interface INotificationServicereq - The current ActionRequestres - The current ActionResponserefresh - If true, the service should expire any cached datapublic void collect(javax.portlet.EventRequest req,
javax.portlet.EventResponse res)
INotificationServiceINotificationService implementations that
receive portlet events to collect notifications from other portlets in
the portal. Not all concrete services will need this method, and those
that don't can safely make it a no-op.collect in interface INotificationServicereq - The current EventRequestres - The current EventResponsepublic NotificationResponse fetch(javax.portlet.PortletRequest req)
INotificationServicePortletRequest.fetch in interface INotificationServicereq - The PortletRequestpublic boolean isValid(javax.portlet.PortletRequest req,
NotificationResponse previousResponse)
INotificationServiceNotificationResponse
is still valid. A few service implementations will be able to make this
determination without contacting a remote service or doing anything
computationally expensive. Those that can't should just return
true; they will have the chance to update their responses
when the cached version expires or when the user clicks refresh.isValid in interface INotificationServicereq - The current requestpreviousResponse - A response provided by this service at an earlier
pointtrue if the earlier response is still acceptable for
the presentCopyright © 2017 Jasig. All Rights Reserved.