|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.bean.CocoonWrapper
public class CocoonWrapper
The Cocoon Wrapper simplifies usage of the Cocoon object. Allows to create, configure Cocoon instance and process single requests.
Field Summary | |
---|---|
protected String |
accept
|
protected CommandLineContext |
cliContext
|
protected Cocoon |
cocoon
|
protected File |
context
|
protected static String |
DEFAULT_ACCEPT
|
protected static String |
DEFAULT_USER_AGENT
|
protected Logger |
log
|
protected String |
logger
|
protected String |
logLevel
|
protected String |
userAgent
|
Constructor Summary | |
---|---|
CocoonWrapper()
|
Method Summary | |
---|---|
void |
addLoadedClass(String className)
|
void |
addLoadedClasses(List classList)
|
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. |
String |
getLoggerName()
|
protected int |
getPage(String deparameterizedURI,
long lastModified,
Map parameters,
Map headers,
Map links,
List gatheredLinks,
ContentHandler handler)
Processes an URI for its content. |
protected int |
getPage(String deparameterizedURI,
long lastModified,
Map parameters,
Map headers,
Map links,
List gatheredLinks,
OutputStream stream)
Processes an URI for its content. |
protected String |
getType(String deparameterizedURI,
Map parameters)
Analyze the type of content for an URI. |
void |
initialize()
|
protected void |
loadClasses(List classList)
|
void |
processURI(String uri,
ContentHandler handler)
Process single URI into given content handler, skipping final serializer |
void |
processURI(String uri,
OutputStream outputStream)
Process single URI into given output stream. |
void |
setAcceptOptions(String accept)
|
void |
setAgentOptions(String userAgent)
|
void |
setConfigFile(String configFile)
|
void |
setContextDir(String contextDir)
Set context directory |
void |
setLogger(String logger)
Set logger category as default logger for the Cocoon engine |
void |
setLogKit(String logKit)
Set LogKit configuration file name |
void |
setLogLevel(String logLevel)
Set log level. |
void |
setUseExistingCocoon(boolean useExistingCocoon)
|
void |
setWorkDir(String workDir)
Set working directory |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String DEFAULT_USER_AGENT
protected static final String DEFAULT_ACCEPT
protected String logger
protected String logLevel
protected String userAgent
protected String accept
protected File context
protected CommandLineContext cliContext
protected Cocoon cocoon
protected Logger log
Constructor Detail |
---|
public CocoonWrapper()
Method Detail |
---|
public void initialize() throws Exception
Exception
protected ExcaliburComponentManager getComponentManager()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
protected void loadClasses(List classList)
public void setLogKit(String logKit)
logKit
- LogKit configuration filepublic void setLogLevel(String logLevel)
logLevel
- log levelpublic void setLogger(String logger)
logger
- logger categorypublic String getLoggerName()
public void setContextDir(String contextDir)
contextDir
- context directorypublic void setWorkDir(String workDir)
workDir
- working directorypublic void setConfigFile(String configFile)
public void setAgentOptions(String userAgent)
public void setAcceptOptions(String accept)
public void addLoadedClass(String className)
public void addLoadedClasses(List classList)
public void setUseExistingCocoon(boolean useExistingCocoon)
public void processURI(String uri, OutputStream outputStream) throws Exception
uri
- to processoutputStream
- to write generated contents into
Exception
public void processURI(String uri, ContentHandler handler) throws Exception
uri
- to processhandler
- to write generated contents into
Exception
public void dispose()
protected Collection getLinks(String deparameterizedURI, Map parameters) throws Exception
deparameterizedURI
- a String
value of an URI to start sampling fromparameters
- a Map
value containing request parameters
Collection
of links
Exception
- if an error occursprotected int getPage(String deparameterizedURI, long lastModified, Map parameters, Map headers, Map links, List gatheredLinks, OutputStream stream) throws Exception
deparameterizedURI
- a String
value of an URI to start sampling fromparameters
- a Map
value containing request parameterslinks
- a Map
valuestream
- an OutputStream
to write the content to
String
value for the content
Exception
- if an error occursprotected int getPage(String deparameterizedURI, long lastModified, Map parameters, Map headers, Map links, List gatheredLinks, ContentHandler handler) throws Exception
deparameterizedURI
- a String
value of an URI to start sampling fromparameters
- a Map
value containing request parameterslinks
- a Map
valuehandler
- an ContentHandler
to send the content to
String
value for the content
Exception
- if an error occursprotected String getType(String deparameterizedURI, Map parameters) throws Exception
deparameterizedURI
- a String
value to analyzeparameters
- a Map
value for the request
String
value denoting the type of content
Exception
- if an error occursprotected String getClassPath(String context)
context
- The context path
String
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |