| org.apache.cocoon.portlet.CocoonPortlet
CocoonPortlet | public class CocoonPortlet extends GenericPortlet (Code) | | This is the entry point for Cocoon execution as an JSR-168 Portlet.
version: CVS $Id: CocoonPortlet.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
protected void | addClassLoaderDirectory(String dir) Adds a directory to the classloader. | protected void | addClassLoaderURL(URL URL) Adds an URL to the classloader. | public void | destroy() | protected String | getClassPath() This builds the important ClassPath used by this Portlet. | protected Environment | getEnvironment(String servletPath, String pathInfo, String uri, ActionRequest req, ActionResponse res) | protected Environment | getEnvironment(String servletPath, String pathInfo, String uri, RenderRequest req, RenderResponse res) | protected String | getExtraClassPath() Retreives the "extra-classpath" attribute, that needs to be
added to the class path. | public String | getInitParameter(String name) Get an initialisation parameter. | protected String | getInitParameter(String name, String defaultValue) | protected boolean | getInitParameterAsBoolean(String name, boolean defaultValue) | protected int | getInitParameterAsInteger(String name, int defaultValue) | protected Logger | getLogger() | protected LoggerManager | getLoggerManager() | protected synchronized ComponentManager | getParentComponentManager() Instatiates the parent component manager, as specified in the
parent-component-manager init parameter. | public void | init(PortletConfig conf) Initialize this CocoonPortlet instance. | protected void | initLogger() Set up the log level and path. | protected void | manageException(ActionRequest req, ActionResponse res, Environment env, String uri, String title, String message, String description, Exception e) | protected void | manageException(RenderRequest req, RenderResponse res, Environment env, String uri, String title, String message, String description, Exception e) | public void | processAction(ActionRequest req, ActionResponse res) Process the specified ActionRequest producing output
on the specified ActionResponse . | public void | render(RenderRequest req, RenderResponse res) Process the specified RenderRequest producing output
on the specified RenderResponse . | protected void | updateEnvironment() Method to update the environment before Cocoon instances are created.
This is also useful if you wish to customize any of the 'protected'
variables from this class before a Cocoon instance is built in a derivative
of this class (eg. |
CONTEXT_PORTLET_CONFIG | final public static String CONTEXT_PORTLET_CONFIG(Code) | | Application Context Key for the portlet configuration
since: 2.1.3 |
HOUR | final static float HOUR(Code) | | |
MINUTE | final static float MINUTE(Code) | | |
PROCESSED_BY | final protected static String PROCESSED_BY(Code) | | |
SECOND | final static float SECOND(Code) | | |
allowReload | protected boolean allowReload(Code) | | Allow reloading of cocoon by specifying the cocoon-reload=true parameter with a request
|
appContext | protected DefaultContext appContext(Code) | | Avalon application context
|
classLoader | protected ClassLoader classLoader(Code) | | The classloader that will be set as the context classloader if init-classloader is true
|
creationTime | protected long creationTime(Code) | | The time the cocoon instance was created
|
defaultSessionScope | protected int defaultSessionScope(Code) | | Default scope for the session attributes, either
javax.portlet.PortletSession.PORTLET_SCOPE or
javax.portlet.PortletSession.APPLICATION_SCOPE .
This corresponds to default-session-scope
parameter, with default value portlet .
See Also: org.apache.cocoon.environment.portlet.PortletSession |
exception | protected Exception exception(Code) | | Holds exception happened during initialization (if any)
|
forceSystemProperty | protected String forceSystemProperty(Code) | | |
hiddenShowTime | protected boolean hiddenShowTime(Code) | | If true, processing time will be added as an HTML comment
|
initClassLoader | protected boolean initClassLoader(Code) | | |
portletContext | protected javax.portlet.PortletContext portletContext(Code) | | |
portletContextPath | protected String portletContextPath(Code) | | This is the path to the portlet context (or the result
of calling getRealPath('/') on the PortletContext.
Note, that this can be null.
|
portletContextURL | protected String portletContextURL(Code) | | This is the url to the portlet context directory
|
requestFactory | protected RequestFactory requestFactory(Code) | | The RequestFactory is responsible for wrapping multipart-encoded
forms and for handing the file payload of incoming requests
|
servletPath | protected String servletPath(Code) | | Value to be used as servletPath in the request.
Provided via configuration parameter, if missing, defaults to the
'/portlets/' + portletName.
|
showTime | protected boolean showTime(Code) | | Allow adding processing time to the response
|
storeSessionPath | protected boolean storeSessionPath(Code) | | Store pathInfo in session
|
addClassLoaderDirectory | protected void addClassLoaderDirectory(String dir)(Code) | | Adds a directory to the classloader. Does nothing here, but can
be overriden.
|
addClassLoaderURL | protected void addClassLoaderURL(URL URL)(Code) | | Adds an URL to the classloader. Does nothing here, but can
be overriden.
|
destroy | public void destroy()(Code) | | Dispose Cocoon when portlet is destroyed
|
getClassPath | protected String getClassPath() throws PortletException(Code) | | This builds the important ClassPath used by this Portlet. It
does so in a Portlet Engine neutral way. It uses the
PortletContext 's getRealPath method
to get the Portlet identified classes and lib directories.
It iterates in alphabetical order through every file in the
lib directory and adds it to the classpath.
Also, we add the files to the ClassLoader for the Cocoon system.
In order to protect ourselves from skitzofrantic classloaders,
we need to work with a known one.
We need to get this to work properly when Cocoon is in a war.
throws: PortletException - |
getExtraClassPath | protected String getExtraClassPath() throws PortletException(Code) | | Retreives the "extra-classpath" attribute, that needs to be
added to the class path.
throws: PortletException - |
getInitParameter | public String getInitParameter(String name)(Code) | | Get an initialisation parameter. The value is trimmed, and null is returned if the trimmed value
is empty.
|
getInitParameter | protected String getInitParameter(String name, String defaultValue)(Code) | | Convenience method to access portlet parameters
|
getInitParameterAsBoolean | protected boolean getInitParameterAsBoolean(String name, boolean defaultValue)(Code) | | Convenience method to access boolean portlet parameters
|
getInitParameterAsInteger | protected int getInitParameterAsInteger(String name, int defaultValue)(Code) | | |
getLogger | protected Logger getLogger()(Code) | | |
getLoggerManager | protected LoggerManager getLoggerManager()(Code) | | |
getParentComponentManager | protected synchronized ComponentManager getParentComponentManager()(Code) | | Instatiates the parent component manager, as specified in the
parent-component-manager init parameter.
If none is specified, the method returns null .
the parent component manager, or null . |
init | public void init(PortletConfig conf) throws PortletException(Code) | | Initialize this CocoonPortlet instance.
Uses the following parameters:
portlet-logger
enable-uploads
autosave-uploads
overwrite-uploads
upload-max-size
show-time
container-encoding
form-encoding
manage-exceptions
servlet-path
Parameters: conf - The PortletConfig object from the portlet container. throws: PortletException - |
initLogger | protected void initLogger()(Code) | | Set up the log level and path. The default log level is
Priority.ERROR, although it can be overwritten by the parameter
"log-level". The log system goes to both a file and the Portlet
container's log system. Only messages that are Priority.ERROR
and above go to the portlet context. The log messages can
be as restrictive (Priority.FATAL_ERROR and above) or as liberal
(Priority.DEBUG and above) as you want that get routed to the
file.
|
processAction | public void processAction(ActionRequest req, ActionResponse res) throws PortletException, IOException(Code) | | Process the specified ActionRequest producing output
on the specified ActionResponse .
|
render | public void render(RenderRequest req, RenderResponse res) throws PortletException, IOException(Code) | | Process the specified RenderRequest producing output
on the specified RenderResponse .
|
updateEnvironment | protected void updateEnvironment() throws PortletException(Code) | | Method to update the environment before Cocoon instances are created.
This is also useful if you wish to customize any of the 'protected'
variables from this class before a Cocoon instance is built in a derivative
of this class (eg. Cocoon Context).
|
|
|