oracle.portal.provider.v1.http
Class JspValidateRenderer
java.lang.Object
|
+--oracle.portal.provider.v1.http.BaseManagedRenderer
|
+--oracle.portal.provider.v1.http.Page
|
+--oracle.portal.provider.v1.http.JspRenderer
|
+--oracle.portal.provider.v1.http.JspValidateRenderer
- public abstract class JspValidateRenderer
- extends JspRenderer
JspValidateRenderer is an abstract class which should be used as the basis
for a ManagedRenderer which has responsibility for rendering a
single mode from a JSP page, using validation based caching. Since this
requires control over the HTTP headers of the renderer's response, this must
be achieved by overriding the ManagedRenderer.prepareResponse(PortletRenderRequest) method.
Users should provide their own implementations of isValid(PortletRenderRequest,String) and getNewVersion(PortletRenderRequest) in order to enforce their own
validation criteria.
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
JspValidateRenderer
public JspValidateRenderer()
prepareResponse
public boolean prepareResponse(PortletRenderRequest pr)
throws PortletException,
PortletNotFoundException
- Performs any protocol specific preparation that is needed before the
page is generated. If the request contains a cached version string for
the current page, the
isValid(PortletRenderRequest,String)
method is called in order to decide whether the cached page with this
version is still valid. If so, the page is marked as valid, and
false is returned to indicate that the page need not be
generated. Otherwise, getNewVersion(PortletRenderRequest) is
called in order to derive a new version string the page, and
true is returned to indicate that the page body should be
generated.
- Overrides:
- prepareResponse in class JspRenderer
- Parameters:
pr - a PortletRenderRequest- Returns:
- boolean flag indicating whether or not to render the portlet's
contents
isValid
public abstract boolean isValid(PortletRenderRequest pr,
java.lang.String oldVersion)
- Determine whether the given version of the page to be generated is still
valid. Users implementing this method may want to compare the given
version string with the one returned by
getNewVersion(PortletRenderRequest).
- Parameters:
pr - the request object containing the current request details.oldVersion - String identifying the cached version of the page to
be generated.- Returns:
true if the given version is still valid.
getNewVersion
public abstract java.lang.String getNewVersion(PortletRenderRequest pr)
- Decide the current version of the page to be generated.
- Parameters:
pr - the request object containing the current request details.- Returns:
- the current version of the page to be generated.