|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.language.generator.ProgramGeneratorImpl
public class ProgramGeneratorImpl
The default implementation of ProgramGenerator
Field Summary | |
---|---|
protected boolean |
autoReload
The auto-reloading option |
protected GeneratorSelector |
cache
The ComponentSelector for programs. |
protected ClassLoaderManager |
classManager
The ClassLoaderManager |
protected String |
contextDir
Servlet Context Directory |
protected ComponentSelector |
languageSelector
The programming language component selector |
protected ComponentManager |
manager
The component manager |
protected ComponentSelector |
markupSelector
The markup language component selector |
protected boolean |
preload
The pre-loading option |
protected String |
rootPackage
The root package |
protected boolean |
watchSource
The check for manual source changes in the repository |
protected File |
workDir
The working directory |
Fields inherited from interface org.apache.cocoon.components.language.generator.ProgramGenerator |
---|
ROLE |
Constructor Summary | |
---|---|
ProgramGeneratorImpl()
|
Method Summary | |
---|---|
void |
compose(ComponentManager manager)
Set the global component manager. |
void |
contextualize(Context context)
Contextualize this class |
void |
dispose()
dispose |
CompiledComponent |
load(ComponentManager newManager,
Source source,
String markupLanguageName,
String programmingLanguageName,
SourceResolver resolver)
Load a program built from an XML document written in a MarkupLanguage . |
CompiledComponent |
load(ComponentManager newManager,
String fileName,
String markupLanguageName,
String programmingLanguageName,
SourceResolver resolver)
Deprecated. Pass Source object instead of file name. |
void |
parameterize(Parameters params)
Set the sitemap-provided configuration. |
void |
release(CompiledComponent component)
Releases the program instance. |
void |
remove(Source source)
Removes named program from the program generator's cache. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean autoReload
protected boolean preload
protected boolean watchSource
protected GeneratorSelector cache
protected ComponentManager manager
protected ComponentSelector markupSelector
protected ComponentSelector languageSelector
protected File workDir
protected ClassLoaderManager classManager
protected String rootPackage
protected String contextDir
Constructor Detail |
---|
public ProgramGeneratorImpl()
Method Detail |
---|
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void compose(ComponentManager manager) throws ComponentException
ComponentSelector
used as language factory for both markup
and programming languages.
compose
in interface Composable
manager
- The global component manager
ComponentException
public void parameterize(Parameters params) throws ParameterException
parameterize
in interface Parameterizable
params
- The configuration information
ParameterException
- Not thrown herepublic CompiledComponent load(ComponentManager newManager, String fileName, String markupLanguageName, String programmingLanguageName, SourceResolver resolver) throws Exception
MarkupLanguage
load
in interface ProgramGenerator
fileName
- The input document's File
markupLanguageName
- The MarkupLanguage
in which the input document is writtenprogrammingLanguageName
- The ProgrammingLanguage
in which the program must be writtennewManager
- The ComponentManager that it will be loaded with
Exception
- If an error occurs during generation or loadingpublic CompiledComponent load(ComponentManager newManager, Source source, String markupLanguageName, String programmingLanguageName, SourceResolver resolver) throws Exception
MarkupLanguage
.
This method does not releases passed source object. Caller of the method must release
source when needed.
load
in interface ProgramGenerator
source
- The input document's File
markupLanguageName
- The MarkupLanguage
in which the input document is writtenprogrammingLanguageName
- The ProgrammingLanguage
in which the program must be writtennewManager
- The ComponentManager that it will be loaded with
Exception
- If an error occurs during generation or loadingpublic void release(CompiledComponent component)
release
in interface ProgramGenerator
component
- program instance to be releasedpublic void remove(Source source)
remove
in interface ProgramGenerator
source
- of the program to be removedpublic void dispose()
dispose
in interface Disposable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |