|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.cocoon.Main
Command line entry point.
Field Summary | |
protected static int |
ACCEPT_OPT
|
protected static int |
AGENT_OPT
|
protected static int |
BROKEN_LINK_FILE
|
protected static int |
CONFIG_FILE
|
protected static int |
CONTEXT_DIR_OPT
|
protected static java.lang.String |
DEFAULT_ACCEPT
|
protected static java.lang.String |
DEFAULT_USER_AGENT
|
protected static int |
DEST_DIR_OPT
|
protected static int |
FOLLOW_LINKS_OPT
|
protected static int |
HELP_OPT
|
protected static int |
LOG_KIT_OPT
|
protected static int |
LOG_LEVEL_OPT
|
protected static int |
LOGGER_OPT
|
protected static org.apache.avalon.excalibur.cli.CLOptionDescriptor[] |
OPTIONS
|
protected static int |
PRECOMPILE_OPT
|
protected static int |
URI_FILE
|
protected static int |
VERSION_OPT
|
protected static int |
WORK_DIR_OPT
|
Constructor Summary | |
Main(Cocoon cocoon,
java.io.File context,
java.io.File destDir,
java.io.File brokenLinks)
Creates the Main class |
Method Summary | |
protected static java.lang.String |
getClassPath(java.lang.String context)
This builds the important ClassPath used by this class. |
protected java.util.Collection |
getLinks(java.lang.String deparameterizedURI,
java.util.Map parameters)
Samples an URI for its links. |
protected java.lang.String |
getPage(java.lang.String deparameterizedURI,
java.util.Map parameters,
java.util.Map links,
java.io.OutputStream stream)
Processes an URI for its content. |
protected java.lang.String |
getType(java.lang.String deparameterizedURI,
java.util.Map parameters)
Analyze the type of content for an URI. |
static void |
main(java.lang.String[] args)
The main method. |
int |
process(java.util.Collection uris,
boolean precompileOnly)
Process the URI list and process them all independently. |
static void |
processFile(java.lang.String filename,
java.util.List uris)
processFile method. |
java.util.Collection |
processURI(java.lang.String uri)
Processes the given URI and return all links. |
void |
processXMAP(java.lang.String uri)
Process a single XMAP file |
void |
processXSP(java.lang.String uri)
Process a single XSP file |
void |
recursivelyPrecompile(java.io.File contextDir,
java.io.File file)
Recurse the directory hierarchy and process the XSP's. |
java.lang.String |
translateURI(java.lang.String uri)
Translate an URI into a file name. |
protected java.lang.String |
tree(int level)
Generate the string for a tree in ascii art for a tree view log output. |
void |
warmup()
Warms up the engine by accessing the root. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int HELP_OPT
protected static final int VERSION_OPT
protected static final int LOG_KIT_OPT
protected static final int LOGGER_OPT
protected static final int LOG_LEVEL_OPT
protected static final int CONTEXT_DIR_OPT
protected static final int DEST_DIR_OPT
protected static final int WORK_DIR_OPT
protected static final int AGENT_OPT
protected static final int ACCEPT_OPT
protected static final int URI_FILE
protected static final int FOLLOW_LINKS_OPT
protected static final int CONFIG_FILE
protected static final int BROKEN_LINK_FILE
protected static final int PRECOMPILE_OPT
protected static final java.lang.String DEFAULT_USER_AGENT
protected static final java.lang.String DEFAULT_ACCEPT
protected static final org.apache.avalon.excalibur.cli.CLOptionDescriptor[] OPTIONS
Constructor Detail |
public Main(Cocoon cocoon, java.io.File context, java.io.File destDir, java.io.File brokenLinks)
cocoon
- a Cocoon
instancecontext
- a File
for the context directorydestDir
- a File
for the destination directoryMethod Detail |
public static void processFile(java.lang.String filename, java.util.List uris)
processFile
method.filename
- a String
valueuris
- a List
of URIspublic static void main(java.lang.String[] args) throws java.lang.Exception
main
method.args
- a String[]
of argumentsjava.lang.Exception
- if an error occurspublic void warmup() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic int process(java.util.Collection uris, boolean precompileOnly) throws java.lang.Exception
uris
- a Collection
of URIsprecompileOnly
- a boolean
denoting to process XSP onlyint
value with the number of links processedjava.lang.Exception
- if an error occurspublic void recursivelyPrecompile(java.io.File contextDir, java.io.File file)
contextDir
- a File
value for the context directoryfile
- a File
value for a single XSP file or a directory to scan recursivelypublic void processXSP(java.lang.String uri) throws java.lang.Exception
uri
- a String
pointing to an xsp URIjava.lang.Exception
- if an error occurspublic void processXMAP(java.lang.String uri) throws java.lang.Exception
uri
- a String
pointing to an xmap URIjava.lang.Exception
- if an error occurspublic java.util.Collection processURI(java.lang.String uri) throws java.lang.Exception
uri
- a String
URI to processCollection
containing all links foundjava.lang.Exception
- if an error occurspublic java.lang.String translateURI(java.lang.String uri) throws java.lang.Exception
uri
- a String
value to mapString
vlaue for the filejava.lang.Exception
- if an error occursprotected java.lang.String tree(int level)
level
- of nestingString
value to print the levels requestedprotected java.util.Collection getLinks(java.lang.String deparameterizedURI, java.util.Map parameters) throws java.lang.Exception
deparameterizedURI
- a String
value of an URI to start sampling fromparameters
- a Map
value containing request parametersCollection
of linksjava.lang.Exception
- if an error occursprotected java.lang.String getPage(java.lang.String deparameterizedURI, java.util.Map parameters, java.util.Map links, java.io.OutputStream stream) throws java.lang.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 toString
value for the contentjava.lang.Exception
- if an error occursprotected java.lang.String getType(java.lang.String deparameterizedURI, java.util.Map parameters) throws java.lang.Exception
deparameterizedURI
- a String
value to analyzeparameters
- a Map
value for the requestString
value denoting the type of contentjava.lang.Exception
- if an error occursprotected static java.lang.String getClassPath(java.lang.String context)
context
- The context pathString
value
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |