public class CacheControlTestPortlet
extends javax.portlet.GenericPortlet
GenericPortlet intended to mimic the validation
CacheControl example in the Portlet 2.0 specification (section PLT.22.2).
This portlet demonstrates the cache control behavior by exposing a simple message service.
The view displays a form where a visitor can send a message. If there are no new messages,
the portlet tells the portal to use the cached content (see CacheControl.setUseCachedContent(boolean).
This portlet is separate from the CacheControlTestController for 2 purposes:
| Constructor and Description |
|---|
CacheControlTestPortlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Example copied from Portlet version 2.0 Specification, section PLT.22.2, with
minor modifications.
|
protected boolean |
markupIsStillValid()
Implemented by inverse of
MessageService#hasNewMessages(). |
void |
processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
Add a new message, if the "message" request parameter is not empty.
|
destroy, doDispatch, doEdit, doHeaders, doHelp, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, init, processEvent, render, serveResourceprotected void doView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
throws javax.portlet.PortletException,
IOException
doView in class javax.portlet.GenericPortletjavax.portlet.PortletExceptionIOExceptionGenericPortlet.doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)public void processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
throws javax.portlet.PortletException,
IOException
processAction in interface javax.portlet.PortletprocessAction in class javax.portlet.GenericPortletjavax.portlet.PortletExceptionIOExceptionGenericPortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)protected boolean markupIsStillValid()
MessageService#hasNewMessages().Copyright © 2016 Jasig. All Rights Reserved.