org.apache.cocoon.components.language.generator
Interface ProgramGenerator

All Superinterfaces:
Component
All Known Implementing Classes:
ProgramGeneratorImpl

public interface ProgramGenerator
extends Component

This interface defines a loader for programs automatically built from XML documents written in a MarkupLanguage

Version:
CVS $Id: ProgramGenerator.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Ricardo Rocha

Field Summary
static String ROLE
           
 
Method Summary
 CompiledComponent load(ComponentManager newManager, Source source, String markupLanguage, String programmingLanguage, SourceResolver resolver)
          Load a program built from an XML document written in a MarkupLanguage
 CompiledComponent load(ComponentManager newManager, String fileName, String markupLanguage, String programmingLanguage, SourceResolver resolver)
          Deprecated. Pass Source object instead of file name.
 void release(CompiledComponent component)
          Release a program instance built from an XML document written in a MarkupLanguage.
 void remove(Source source)
          Remove a program from the generator's cache and dipose all instances of this program.
 

Field Detail

ROLE

static final String ROLE
Method Detail

load

CompiledComponent load(ComponentManager newManager,
                       String fileName,
                       String markupLanguage,
                       String programmingLanguage,
                       SourceResolver resolver)
                       throws Exception
Deprecated. Pass Source object instead of file name.

Load a program built from an XML document written in a MarkupLanguage

Parameters:
newManager - The ComponentManager that it will be loaded with
fileName - The input document's File name
markupLanguage - The MarkupLanguage in which the input document is written
programmingLanguage - The ProgrammingLanguage in which the program must be written
Returns:
The loaded object
Throws:
Exception - If an error occurs during generation or loading

load

CompiledComponent load(ComponentManager newManager,
                       Source source,
                       String markupLanguage,
                       String programmingLanguage,
                       SourceResolver resolver)
                       throws Exception
Load a program built from an XML document written in a MarkupLanguage

Parameters:
newManager - The ComponentManager that it will be loaded with
source - The input document's File name
markupLanguage - The MarkupLanguage in which the input document is written
programmingLanguage - The ProgrammingLanguage in which the program must be written
Returns:
The loaded object
Throws:
Exception - If an error occurs during generation or loading

release

void release(CompiledComponent component)
Release a program instance built from an XML document written in a MarkupLanguage.

Parameters:
component - to be released.

remove

void remove(Source source)
Remove a program from the generator's cache and dipose all instances of this program.

Parameters:
source - of the program to be removed.


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