|
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 oracle.portal.provider.v2.render.http.AbstractResourceRenderer oracle.portal.provider.v2.render.http.ResourceRenderer
public class ResourceRenderer
When maintained by a RenderManager
,
a ResourceRenderer
renders a single page's contents from
resource known to the servlet container. Examples of such resources include
JSPs, servlets and static HTML files. Any resource can be used as long as
the servlet container can return a valid
javax.servlet.RequestDispatcher
for it. The resource can be
located in the same servlet context as the current provider or a different
one. The resource path is defined by a call to setResourcePath
.
Constructor Summary | |
---|---|
ResourceRenderer()
Null Constructor. |
|
ResourceRenderer(RenderManager parent,
java.lang.String path)
Creates and initializes a ResourceRenderer owned by the
given RenderManager , to render from the resource at the
given path. |
Method Summary | |
---|---|
java.lang.String |
getRequestResourcePath(PortletRenderRequest prr)
This method returns the path of the resource to be rendered as set by setResourcePath . |
java.lang.String |
getResourcePath()
Gets the path to the resource used for rendering. |
void |
postInitialize()
Performs the extra steps required to initialize and validate a ResourceRenderer object once its properties have been set
with the appropriate accessor methods. |
void |
setContext(java.lang.String context)
Sets the context root of the javax.servlet.ServletContext
containing the resource. |
void |
setResourcePath(java.lang.String path)
Sets the path of the resource used for rendering. |
void |
validate(java.lang.String context,
ValidationError errors)
Validates the internal state of this ResourceRenderer
instance. |
Methods inherited from class oracle.portal.provider.v2.render.http.AbstractResourceRenderer |
---|
getCharSet, getContext, prepareResponse, renderBody, setCharSet |
Methods inherited from class oracle.portal.provider.v2.render.http.BaseManagedRenderer |
---|
addParameter, getContentType, getGeneratesESI, preInitialize, setContentType, setGeneratesESI, setGeneratesESI, setPageExpires, setPageExpires, setUseInvalidationCaching, setUseInvalidationCaching |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceRenderer()
BaseManagedRenderer.preInitialize(Object)
method should be called after creating an object with this constructor
and the BaseManagedRenderer.postInitialize()
method should be
called after setting up page properties with the various accessor
methods. Normally a
DefaultNodeHandler
takes care of these
details.
public ResourceRenderer(RenderManager parent, java.lang.String path) throws PortletException
ResourceRenderer
owned by the
given RenderManager
, to render from the resource at the
given path. This constructor is called by RenderManager
when no renderer has been specified in the provider definition and
ResourceRenderer
is used by default to render page content.
parent
- RenderManager
that owns this pagepath
- the path to the resource.
PortletException
- if an error occurs while initializing the
objectMethod Detail |
---|
public java.lang.String getResourcePath()
public void setResourcePath(java.lang.String path)
path
- resource location.public void postInitialize() throws NodeHandlerException
ResourceRenderer
object once its properties have been set
with the appropriate accessor methods. A ResourceRenderer
object must be supplied with a non null resource path.
postInitialize
in interface InitializableXMLObject
postInitialize
in class BaseManagedRenderer
NodeHandlerException
- if a resource path has not been
specified.public void validate(java.lang.String context, ValidationError errors)
ResourceRenderer
instance. Errors found are reported using the supplied ValidationError
instance.
validate
in interface Validateable
validate
in class BaseManagedRenderer
context
- The context of the calling instance.errors
- The current list of errors.public java.lang.String getRequestResourcePath(PortletRenderRequest prr)
setResourcePath
.
getRequestResourcePath
in class AbstractResourceRenderer
prr
- the request object
PortletException
public void setContext(java.lang.String context)
javax.servlet.ServletContext
containing the resource. This should only be set if the resource is
located in a different servlet context than the current
provider.
context
- context root known to the server.
|
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 |