|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.portal.provider.v2.render.ManagedRenderer oracle.portal.provider.v2.render.http.BaseManagedRenderer
public abstract class BaseManagedRenderer
BaseManagedRenderer is the JPDK's base implementation of the ManagedRenderer
interface. BaseManagedRenderer maintains information about the page's
content type (MIME type) and cache expiry time. These may be set via calls
to the appropriate methods or declared at page level in
provider.xml
using the <contentType>
and
<pageExpires>
tags.
BaseManagedRenderer also maintains a reference to its parent RenderManager
object so that page level
attributes can be defaulted at RenderManager
level.
Implementations needing to set HTTP headers other than content type and page
expiry should subclass BaseManagedRenderer and override the prepareResponse(PortletRenderRequest)
method, taking care to call
super.prepareResponse(pr)
as a first step.
Constructor Summary | |
---|---|
BaseManagedRenderer()
|
Method Summary | |
---|---|
void |
addParameter(java.lang.Object o)
Adds entries from a NameValue object
to a parameter list stored by this BaseManagedRenderer . |
java.lang.String |
getContentType()
Gets the default MIME type to be used as the content type for this renderer's pages. |
boolean |
getGeneratesESI()
Returns a flag indicating whether or not ESI processing should be performed on the rendered output. |
void |
postInitialize()
Performs the extra steps required to initialize and validate a BaseManagedRenderer object once its properties have been set with the appropriate accessor methods. |
void |
preInitialize(java.lang.Object o)
Performs the steps required to initialize a BaseManagedRenderer object after it has been constructed. |
boolean |
prepareResponse(PortletRenderRequest pr)
Sets default HTTP headers for the response. |
void |
setContentType(java.lang.String contentType)
Sets the default MIME type to be used as the content type for this renderer's pages. |
void |
setGeneratesESI(boolean generatesESI)
Sets a flag to indicate whether or not ESI processing should be performed on the rendered output. |
void |
setGeneratesESI(java.lang.String generatesESI)
Sets a flag to indicate whether or not ESI processing should be performed on the rendered output. |
void |
setPageExpires(int expires)
Sets the expiration time (in minutes) of the page cache. |
void |
setPageExpires(java.lang.String expires)
Sets the expiration time (in minutes) of the page cache. |
void |
setUseInvalidationCaching(boolean useInvalidation)
Sets a flag to indicate whether or not to use invalidation caching |
void |
setUseInvalidationCaching(java.lang.String useInvalidation)
Sets a flag to indicate whether or not to use invalidation caching |
void |
validate(java.lang.String context,
ValidationError errors)
Validates the internal state of this BaseManagedRenderer
instance. |
Methods inherited from class oracle.portal.provider.v2.render.ManagedRenderer |
---|
renderBody |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseManagedRenderer()
Method Detail |
---|
public void preInitialize(java.lang.Object o) throws NodeHandlerException
preInitialize
in interface InitializableXMLObject
o
- the object that will become this object's parent
NodeHandlerException
- if an error occurs while initializing
this objectpublic void postInitialize() throws NodeHandlerException
postInitialize
in interface InitializableXMLObject
NodeHandlerException
- if not all properties have been set
correctlypublic void addParameter(java.lang.Object o) throws PortletException
NameValue
object
to a parameter list stored by this BaseManagedRenderer
.
o
- Object representing the name-value pair (a NameValue
).
PortletException
- if the given Object is not a valid NameValue
public void setContentType(java.lang.String contentType)
contentType
- MIME type to be used as the content type for this
renderer's pages.public java.lang.String getContentType()
BaseManagedRenderer
, then the value returned by calling
the RenderManager.getContentType()
method on the parent
RenderManager
is returned.
getContentType
in class ManagedRenderer
public void setPageExpires(int expires)
expires
- the number of minutes a page should be cached by
the Portal.public void setPageExpires(java.lang.String expires)
expires
- String representation of the integer number of minutes a
page should be cached by the Portal.public void setUseInvalidationCaching(boolean useInvalidation)
useInvalidation
- if true use invalidation caching, otherwise don'tpublic void setUseInvalidationCaching(java.lang.String useInvalidation)
useInvalidation
- if true use invalidation caching, otherwise don'tpublic boolean getGeneratesESI()
public void setGeneratesESI(boolean generatesESI)
generatesESI
- true if ESI processing should be performed
on the rendered output. Otherwise false.public void setGeneratesESI(java.lang.String generatesESI)
generatesESI
- "true" if ESI processing should be performed
on the rendered output. Otherwise "false".public boolean prepareResponse(PortletRenderRequest pr) throws PortletException, PortletNotFoundException
content type
and page expiry time, both of which may be
set programatically via calls to setContentType(String)
and
setPageExpires(String)
or declaritivley in
provider.xml
with the <contentType>
and
<pageExpires>
tags.
prepareResponse
in class ManagedRenderer
pr
- a PortletRenderRequest
PortletException
PortletNotFoundException
public void validate(java.lang.String context, ValidationError errors)
BaseManagedRenderer
instance. Errors found are reported using the supplied ValidationError
instance.
validate
in interface Validateable
context
- The context of the calling instance.errors
- The current list of errors.
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |