org.apache.cocoon.bean
Class XSPPrecompileWrapper

java.lang.Object
  extended by org.apache.cocoon.bean.CocoonWrapper
      extended by org.apache.cocoon.bean.XSPPrecompileWrapper

public class XSPPrecompileWrapper
extends CocoonWrapper

This is simple Wrapper like CocoonWrapper and can only precompile all XSP in the context-directory.

Version:
$Id: XSPPrecompileWrapper.html 1304258 2012-03-23 10:09:27Z ilgrosso $ $Date: 2012-03-23 11:09:27 +0100 (Fri, 23 Mar 2012) $

Field Summary
protected static String CONFIG_FILE_LONG
           
protected static String CONFIG_FILE_OPT
           
protected static String CONTEXT_DIR_LONG
           
protected static String CONTEXT_DIR_OPT
           
protected static String HELP_LONG
           
protected static String HELP_OPT
           
protected static String LOG_KIT_LONG
           
protected static String LOG_KIT_OPT
           
protected static String WORK_DIR_LONG
           
protected static String WORK_DIR_OPT
           
 
Fields inherited from class org.apache.cocoon.bean.CocoonWrapper
accept, cliContext, cocoon, context, DEFAULT_ACCEPT, DEFAULT_USER_AGENT, log, logger, logLevel, userAgent
 
Constructor Summary
XSPPrecompileWrapper()
           
 
Method Summary
 void initialize()
           
static void main(String[] args)
           
 void precompile()
          Allow subclasses to recursively precompile XSPs.
 void precompile(String fileName, Environment environment, String markupLanguage, String programmingLanguage)
          Process the given Environment to generate Java code for specified XSP files.
protected  void processXMAP(String uri)
          Process a single XMAP file
protected  void processXSP(String uri)
          Process a single XSP file
 
Methods inherited from class org.apache.cocoon.bean.CocoonWrapper
addLoadedClass, addLoadedClasses, dispose, finalize, getClassPath, getComponentManager, getLinks, getLoggerName, getPage, getPage, getType, loadClasses, processURI, processURI, setAcceptOptions, setAgentOptions, setConfigFile, setContextDir, setLogger, setLogKit, setLogLevel, setUseExistingCocoon, setWorkDir
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HELP_OPT

protected static final String HELP_OPT
See Also:
Constant Field Values

LOG_KIT_OPT

protected static final String LOG_KIT_OPT
See Also:
Constant Field Values

CONTEXT_DIR_OPT

protected static final String CONTEXT_DIR_OPT
See Also:
Constant Field Values

WORK_DIR_OPT

protected static final String WORK_DIR_OPT
See Also:
Constant Field Values

CONFIG_FILE_OPT

protected static final String CONFIG_FILE_OPT
See Also:
Constant Field Values

LOG_KIT_LONG

protected static final String LOG_KIT_LONG
See Also:
Constant Field Values

CONTEXT_DIR_LONG

protected static final String CONTEXT_DIR_LONG
See Also:
Constant Field Values

WORK_DIR_LONG

protected static final String WORK_DIR_LONG
See Also:
Constant Field Values

HELP_LONG

protected static final String HELP_LONG
See Also:
Constant Field Values

CONFIG_FILE_LONG

protected static final String CONFIG_FILE_LONG
See Also:
Constant Field Values
Constructor Detail

XSPPrecompileWrapper

public XSPPrecompileWrapper()
Method Detail

precompile

public void precompile()
                throws Exception
Allow subclasses to recursively precompile XSPs.

Throws:
Exception

processXSP

protected void processXSP(String uri)
                   throws Exception
Process a single XSP file

Parameters:
uri - a String pointing to an xsp URI
Throws:
Exception - if an error occurs

processXMAP

protected void processXMAP(String uri)
                    throws Exception
Process a single XMAP file

Parameters:
uri - a String pointing to an xmap URI
Throws:
Exception - if an error occurs

precompile

public void precompile(String fileName,
                       Environment environment,
                       String markupLanguage,
                       String programmingLanguage)
                throws Exception
Process the given Environment to generate Java code for specified XSP files.

Parameters:
fileName - a String value
environment - an Environment value
Throws:
Exception - if an error occurs

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

initialize

public void initialize()
                throws Exception
Overrides:
initialize in class CocoonWrapper
Throws:
Exception


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.