cuba.util.ddgen
Class AbstractDDGenerator

java.lang.Object
  extended by 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

Field Summary
protected  java.util.ArrayList components
           
protected  DDGeneratorOptions options
           
 
Constructor Summary
AbstractDDGenerator(java.util.ArrayList components, DDGeneratorOptions options)
           
 
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
 

Field Detail

components

protected java.util.ArrayList components

options

protected DDGeneratorOptions options
Constructor Detail

AbstractDDGenerator

public AbstractDDGenerator(java.util.ArrayList components,
                           DDGeneratorOptions options)
                    throws GeneratorException
Parameters:
components - list of component descriptions in form of CUBAComponents
Throws:
GeneratorException
Method Detail

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 created
textValue - text inside the tag
document - 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 serialize
fileName - Filename to use for serialization
Throws:
GeneratorException