cuba.util.ddgen
Class AbstractDDGenerator
java.lang.Object
cuba.util.ddgen.AbstractDDGenerator
- Direct Known Subclasses:
- AbstractWSDDGenerator, EJB2DDGenerator, WiredDDGenerator
public abstract class AbstractDDGenerator
- extends java.lang.Object
AbstractDDGenerator
Abstract Generator Class that should be used as the superclass for all DDGenerators.
- Author:
- Jan Wegener
Method Summary |
protected org.w3c.dom.Element |
createTextElement(java.lang.String tagValue,
java.lang.String textValue,
org.w3c.dom.Document document)
Convenience Method to create an element containing atextnode |
abstract GeneratorResult |
generate(GeneratorResult result)
Abstract Method that is called by the DDGenerator main-Method |
GeneratedFile |
serializeDocument(org.w3c.dom.Document document,
java.lang.String fileName)
Serializes the given Document to the file specified in the filename
in the outputdirectory set in the constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
components
protected java.util.ArrayList components
options
protected DDGeneratorOptions options
AbstractDDGenerator
public AbstractDDGenerator(java.util.ArrayList components,
DDGeneratorOptions options)
throws GeneratorException
- Parameters:
components
- list of component descriptions in form of CUBAComponent
s
- Throws:
GeneratorException
generate
public abstract GeneratorResult generate(GeneratorResult result)
throws GeneratorException
- Abstract Method that is called by the DDGenerator main-Method
- Throws:
DDGeneratorException
GeneratorException
createTextElement
protected org.w3c.dom.Element createTextElement(java.lang.String tagValue,
java.lang.String textValue,
org.w3c.dom.Document document)
- Convenience Method to create an element containing atextnode
- Parameters:
tagValue
- Name of the tag being createdtextValue
- text inside the tagdocument
- document to wich the tag shall be added
- Returns:
- Element with name of tagValue containing text of textValue
serializeDocument
public GeneratedFile serializeDocument(org.w3c.dom.Document document,
java.lang.String fileName)
throws GeneratorException
- Serializes the given Document to the file specified in the filename
in the outputdirectory set in the constructor
- Parameters:
document
- Document to serializefileName
- Filename to use for serialization
- Throws:
GeneratorException