| java.lang.Object org.apache.cocoon.bean.CocoonWrapper
All known Subclasses: org.apache.cocoon.bean.XSPPrecompileWrapper, org.apache.cocoon.bean.CocoonBean,
CocoonWrapper | public class CocoonWrapper (Code) | | The Cocoon Wrapper simplifies usage of the Cocoon object. Allows to create,
configure Cocoon instance and process single requests.
author: Stefano Mazzocchi author: Nicola Ken Barozzi author: Vadim Gritsenko author: Upayavira version: $Id: CocoonWrapper.java 433543 2006-08-22 06:22:54Z crossley $ |
Inner Class :static class NullOutputStream extends OutputStream | |
Method Summary | |
public void | addLoadedClass(String className) | public void | addLoadedClasses(List classList) | public void | dispose() | protected void | finalize() | protected String | getClassPath(String context) This builds the important ClassPath used by this class. | protected ExcaliburComponentManager | getComponentManager() | protected Collection | getLinks(String deparameterizedURI, Map parameters) Samples an URI for its links. | public String | getLoggerName() | protected int | getPage(String deparameterizedURI, long lastModified, Map parameters, Map headers, Map links, List gatheredLinks, OutputStream stream) Processes an URI for its content. | protected int | getPage(String deparameterizedURI, long lastModified, Map parameters, Map headers, Map links, List gatheredLinks, ContentHandler handler) Processes an URI for its content. | protected String | getType(String deparameterizedURI, Map parameters) Analyze the type of content for an URI. | public void | initialize() | protected void | loadClasses(List classList) | public void | processURI(String uri, OutputStream outputStream) Process single URI into given output stream. | public void | processURI(String uri, ContentHandler handler) | public void | setAcceptOptions(String accept) | public void | setAgentOptions(String userAgent) | public void | setConfigFile(String configFile) | public void | setContextDir(String contextDir) | public void | setLogKit(String logKit) | public void | setLogLevel(String logLevel) Set log level. | public void | setLogger(String logger) | public void | setUseExistingCocoon(boolean useExistingCocoon) | public void | setWorkDir(String workDir) |
DEFAULT_ACCEPT | final protected static String DEFAULT_ACCEPT(Code) | | |
DEFAULT_USER_AGENT | final protected static String DEFAULT_USER_AGENT(Code) | | |
addLoadedClass | public void addLoadedClass(String className)(Code) | | |
addLoadedClasses | public void addLoadedClasses(List classList)(Code) | | |
dispose | public void dispose()(Code) | | |
getClassPath | protected String getClassPath(String context)(Code) | | This builds the important ClassPath used by this class. It
does so in a neutral way.
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.
Parameters: context - The context path a String value |
getComponentManager | protected ExcaliburComponentManager getComponentManager()(Code) | | |
getLinks | protected Collection getLinks(String deparameterizedURI, Map parameters) throws Exception(Code) | | Samples an URI for its links.
Parameters: deparameterizedURI - a String value of an URI to start sampling from Parameters: parameters - a Map value containing request parameters a Collection of links exception: Exception - if an error occurs |
getPage | protected int getPage(String deparameterizedURI, long lastModified, Map parameters, Map headers, Map links, List gatheredLinks, OutputStream stream) throws Exception(Code) | | Processes an URI for its content.
Parameters: deparameterizedURI - a String value of an URI to start sampling from Parameters: parameters - a Map value containing request parameters Parameters: links - a Map value Parameters: stream - an OutputStream to write the content to a String value for the content exception: Exception - if an error occurs |
getPage | protected int getPage(String deparameterizedURI, long lastModified, Map parameters, Map headers, Map links, List gatheredLinks, ContentHandler handler) throws Exception(Code) | | Processes an URI for its content.
Parameters: deparameterizedURI - a String value of an URI to start sampling from Parameters: parameters - a Map value containing request parameters Parameters: links - a Map value Parameters: handler - an ContentHandler to send the content to a String value for the content exception: Exception - if an error occurs |
getType | protected String getType(String deparameterizedURI, Map parameters) throws Exception(Code) | | Analyze the type of content for an URI.
Parameters: deparameterizedURI - a String value to analyze Parameters: parameters - a Map value for the request a String value denoting the type of content exception: Exception - if an error occurs |
loadClasses | protected void loadClasses(List classList)(Code) | | |
processURI | public void processURI(String uri, OutputStream outputStream) throws Exception(Code) | | Process single URI into given output stream.
Parameters: uri - to process Parameters: outputStream - to write generated contents into |
processURI | public void processURI(String uri, ContentHandler handler) throws Exception(Code) | | Process single URI into given content handler, skipping final
serializer
Parameters: uri - to process Parameters: handler - to write generated contents into |
setAcceptOptions | public void setAcceptOptions(String accept)(Code) | | |
setAgentOptions | public void setAgentOptions(String userAgent)(Code) | | |
setConfigFile | public void setConfigFile(String configFile)(Code) | | |
setContextDir | public void setContextDir(String contextDir)(Code) | | Set context directory
Parameters: contextDir - context directory |
setLogKit | public void setLogKit(String logKit)(Code) | | Set LogKit configuration file name
Parameters: logKit - LogKit configuration file |
setLogLevel | public void setLogLevel(String logLevel)(Code) | | Set log level. Default is DEBUG.
Parameters: logLevel - log level |
setLogger | public void setLogger(String logger)(Code) | | Set logger category as default logger for the Cocoon engine
Parameters: logger - logger category |
setUseExistingCocoon | public void setUseExistingCocoon(boolean useExistingCocoon)(Code) | | |
setWorkDir | public void setWorkDir(String workDir)(Code) | | Set working directory
Parameters: workDir - working directory |
|
|