|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.cocoon.ant.CocoonTask
Ant task for running Cocoon.
Nested Class Summary | |
static class |
CocoonTask.CocoonFactory
A factory creating Cocoon objects. |
static class |
CocoonTask.LogLevelOption
Enumerated attribute with the values "DEBUG", "INFO", "WARN", "ERROR", and "FATAL_ERROR" |
Field Summary | |
protected static String |
DEFAULT_ACCEPT
Accept header used in the Cocoon processing stage |
protected static String |
DEFAULT_USER_AGENT
User-agent header used in the Cocoon processing stage |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
CocoonTask()
Creates a new instance of CocoonTask |
Method Summary | |
protected void |
checkValidity()
Check if all parameters for running Cocoon are set properly |
org.apache.tools.ant.types.Path |
createClasspath()
Deprecated. no need for creating an additional classloader |
void |
execute()
Execute the ant task launching Cocoon |
protected File |
getContextDirFile(File contextDir,
String name)
Gets the contextDirFile attribute of the CocoonTask object. |
protected File |
getDir(String dir,
boolean create,
String type)
Get a File representing a directory.
|
void |
setAcceptHeader(String acceptHeader)
Sets the acceptHeader attribute of the CocoonTask object |
void |
setAgentHeader(String agentHeader)
Sets the agentHeader attribute of the CocoonTask object |
void |
setClasspathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a CLASSPATH defined elsewhere. |
void |
setConfigFile(File configFile)
Sets the configFile attribute of the CocoonTask object |
void |
setContextDir(File contextDir)
Sets the contextDir attribute of the CocoonTask object |
void |
setDestDir(File destDir)
Sets the destDir attribute of the CocoonTask object |
void |
setFollowLinks(boolean followLinks)
Sets the followLinks attribute of the CocoonTask object |
void |
setLogger(String logger)
Sets the logger attribute of the CocoonTask object |
void |
setLogkitXconf(File logkitXconf)
Sets the logkitXconf attribute of the CocoonTask object |
void |
setLogLevel(CocoonTask.LogLevelOption logLevelOption)
Sets the logLevel attribute of the CocoonTask object |
void |
setPrecompileOnly(boolean preCompileOnly)
Sets the precompileOnly attribute of the CocoonTask object |
void |
setTargets(String targets)
Sets the targets attribute of the CocoonTask object |
void |
setWorkDir(File workDir)
Sets the workDir attribute of the CocoonTask object |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final String DEFAULT_USER_AGENT
protected static final String DEFAULT_ACCEPT
Constructor Detail |
public CocoonTask()
Method Detail |
public void setLogkitXconf(File logkitXconf)
logkitXconf
- The new logkitXconf valuepublic void setLogger(String logger)
logger
- The new logger valuepublic void setLogLevel(CocoonTask.LogLevelOption logLevelOption)
logLevelOption
- The new logLevel valuepublic void setAcceptHeader(String acceptHeader)
acceptHeader
- The new acceptHeader valuepublic void setAgentHeader(String agentHeader)
agentHeader
- The new agentHeader valuepublic void setPrecompileOnly(boolean preCompileOnly)
preCompileOnly
- The new precompileOnly valuepublic void setFollowLinks(boolean followLinks)
followLinks
- The new followLinks valuepublic void setTargets(String targets)
targets
- The new targets valuepublic void setDestDir(File destDir)
destDir
- The new destDir valuepublic void setWorkDir(File workDir)
workDir
- The new workDir valuepublic void setContextDir(File contextDir)
contextDir
- The new contextDir valuepublic void setConfigFile(File configFile)
configFile
- The new configFile valuepublic void setClasspathRef(org.apache.tools.ant.types.Reference r)
r
- The new classpathRef valuepublic org.apache.tools.ant.types.Path createClasspath()
public void execute() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- thrown if Cocoon processing failsprotected File getContextDirFile(File contextDir, String name)
contextDir
- Cocoon's context directoryname
- a pure file name
protected File getDir(String dir, boolean create, String type) throws org.apache.tools.ant.BuildException
File
representing a directory.
Create, and check existance, read- writeability of a directory.
dir
- a String
with a directory nametype
- a String
describing the type of directorycreate
- true if directory should be created
File
value
org.apache.tools.ant.BuildException
- throw if checks failsprotected void checkValidity() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- is thrown if at least one parameter is invalid
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |