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

All Known Implementing Classes:
ProgramGeneratorImpl

public interface ProgramGenerator

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

Version:
CVS $Id: ProgramGenerator.java 55391 2004-10-23 18:15:02Z cziegeler $
Author:
Ricardo Rocha

Field Summary
static String ROLE
           
 
Method Summary
 CompiledComponent load(ServiceManager newManager, Source source, String markupLanguage, String programmingLanguage, SourceResolver resolver)
          Load a program built from an XML document written in a MarkupLanguage
 CompiledComponent load(ServiceManager 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

public static final String ROLE
Method Detail

load

public CompiledComponent load(ServiceManager 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 ServiceManager 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

public CompiledComponent load(ServiceManager 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 ServiceManager 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

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

Parameters:
component - to be released.

remove

public 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-2005 The Apache Software Foundation. All Rights Reserved.