|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.generic.description.DescriptionObjectImpl
org.openbp.common.generic.description.DisplayObjectImpl
org.openbp.cockpit.generator.Generator
public class Generator
A template-based generation process for a particular item or item file.
The generation process consists of
1. A check for the requirements of the generation (i. e. if particular item properties are set)
2. An option pre-processing step
3. The actual template-based generation
4. An option post-processing step
| Field Summary |
|---|
| Fields inherited from interface org.openbp.common.generic.Copyable |
|---|
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW |
| Constructor Summary | |
|---|---|
Generator()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addCustomPage(GeneratorPageDescriptor customPage)
Adds a custom page. |
void |
addInitialProperty(GeneratorProperty initialProperty)
Adds an initial property. |
void |
addRequiredItemProperty(java.lang.String requiredItemProperty)
Adds a required property. |
boolean |
checkPrecondition()
Checks the preconditions of this generator. |
void |
checkRequirements(GeneratorContext context)
Checks the requirements of the generation process for the current item. |
void |
clearCustomPages()
Clears the custom page list. |
void |
clearRequiredItemPropertys()
Clears the list of required properties of the item. |
int |
compareTo(java.lang.Object o)
Compares this object to another object. |
void |
copyFrom(java.lang.Object source,
int copyMode)
Copies the values of the source object to this object. |
void |
copyInitialPropertiesToContext(GeneratorContext context)
Copies the initial properties to the property table of the generator context. |
protected void |
createCustomizer()
Creates a new instance of the customizer class if specified. |
void |
createSettings(GeneratorContext context)
Creates a settings object for the customizer if it requires one. |
java.lang.ClassLoader |
getClassLoader()
Gets the class loader used to load template and setting classes. |
java.lang.String |
getCondition()
Gets the condition. |
GeneratorCustomizer |
getCustomizer()
Gets the generator customizer class. |
java.util.List |
getCustomPageList()
Gets the custom page list. |
java.util.Iterator |
getCustomPages()
Gets the custom page list. |
java.lang.String |
getDefaultStartPageName()
Gets the name of the default start page. |
java.lang.String |
getFunctionalGroup()
Gets the a functional group specification that can be used as desired.. |
java.lang.String |
getGeneratorCustomizerClassName()
Gets the name of the process customizer class (must implement the GeneratorCustomizer interface). |
GeneratorMgr |
getGeneratorMgr()
Gets the generator manager that loaded this generator. |
java.lang.String |
getItemType()
Gets the item type this generation step is suitable for. |
java.util.List |
getRequiredItemPropertyList()
Gets the list of required properties of the item. |
java.util.Iterator |
getRequiredItemPropertys()
Gets the list of required properties of the item. |
int |
getSequenceNr()
Gets the sequence number that determines the order of displayed generator options in the context menu. |
java.lang.String |
getTemplateName()
Gets the name of the template class. |
XMLDriver |
getXmlDriver()
Gets the xML driver for generator settings. |
int |
getXmlLoaderSequenceNr()
Gets the sequence number that determines the load order for the setting and depandant XML files. |
boolean |
isItemGenerator()
Gets the flag: Generator generators an item. |
boolean |
isShowOpenResultCheckBox()
Gets the flag if the 'Open generated file' check box in the result page should be displayed. |
void |
loadSettings(GeneratorContext context)
Loads the settings from persistent storage into the newly created settings object. |
void |
performProcess(GeneratorContext context)
Performs the generation process. |
void |
postProcess(GeneratorContext context)
Performs the generation post-process. |
void |
preProcess(GeneratorContext context)
Performs the generation pre-processing. |
void |
removeInitialPropertiesToContext(GeneratorContext context)
Removes the initial property values from the property table of the generator context. |
void |
runTemplateEngine(GeneratorContext context)
Runs the template engine. |
void |
saveSettings(GeneratorContext context)
Saves the settings from the settings object to persistent storage. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the class loader used to load template and setting classes. |
void |
setCondition(java.lang.String condition)
Sets the condition. |
void |
setCustomPageList(java.util.List customPageList)
Sets the custom page list. |
void |
setDefaultStartPageName(java.lang.String defaultStartPageName)
Sets the name of the default start page. |
void |
setFunctionalGroup(java.lang.String functionalGroup)
Sets the a functional group specification that can be used as desired.. |
void |
setGeneratorCustomizerClassName(java.lang.String generatorCustomizerClassName)
Sets the name of the process customizer class (must implement the GeneratorCustomizer interface). |
void |
setGeneratorMgr(GeneratorMgr generatorMgr)
Sets the generator manager that loaded this generator. |
void |
setItemGenerator(boolean itemGenerator)
Sets the flag: Generator generators an item. |
void |
setItemType(java.lang.String itemType)
Sets the item type this generation step is suitable for. |
void |
setRequiredItemPropertyList(java.util.List requiredItemPropertyList)
Sets the list of required properties of the item. |
void |
setSequenceNr(int sequenceNr)
Sets the sequence number that determines the order of displayed generator options in the context menu. |
void |
setShowOpenResultCheckBox(boolean showOpenResultCheckBox)
Sets the flag if the 'Open generated file' check box in the result page should be displayed. |
void |
setTemplateName(java.lang.String templateName)
Sets the name of the template class. |
void |
setXmlDriver(XMLDriver xmlDriver)
Sets the xML driver for generator settings. |
void |
setXmlLoaderSequenceNr(int xmlLoaderSequenceNr)
Sets the sequence number that determines the load order for the setting and depandant XML files. |
| Methods inherited from class org.openbp.common.generic.description.DisplayObjectImpl |
|---|
getDisplayName, getDisplayText, setDisplayName |
| Methods inherited from class org.openbp.common.generic.description.DescriptionObjectImpl |
|---|
clone, getDescription, getDescriptionEscape, getDescriptionText, getName, setDescription, setDescriptionEscape, setName, toString, validate |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openbp.common.generic.description.DescriptionObject |
|---|
clone, getDescription, getDescriptionText, getName, setDescription, setName |
| Constructor Detail |
|---|
public Generator()
| Method Detail |
|---|
public void copyFrom(java.lang.Object source,
int copyMode)
throws java.lang.CloneNotSupportedException
copyFrom in interface CopyablecopyFrom in class DisplayObjectImplsource - The source object. Must be of the same type as this object.copyMode - Determines if a deep copy, a first level copy or a shallow copy is to be
performed. See the constants of the org.openbp.common.generic.description.Copyable class.
java.lang.CloneNotSupportedException - If the cloning of one of the contained objects failed
public void preProcess(GeneratorContext context)
throws java.lang.Exception
context - Generator context
java.lang.Exception
public void performProcess(GeneratorContext context)
throws java.lang.Exception
context - Generator context
java.lang.Exception
public void postProcess(GeneratorContext context)
throws java.lang.Exception
context - Generator context
java.lang.Exception
public void runTemplateEngine(GeneratorContext context)
throws java.lang.Exception
context - Generator context
java.lang.Exceptionpublic boolean checkPrecondition()
public void checkRequirements(GeneratorContext context)
context - Generator context
GeneratorException - If one of the necessary requirements is not met.
The exception message should describe the problem.public void createSettings(GeneratorContext context)
context - Generator contextpublic void loadSettings(GeneratorContext context)
context - Generator contextpublic void saveSettings(GeneratorContext context)
context - Generator contextpublic GeneratorCustomizer getCustomizer()
protected void createCustomizer()
GeneratorException - On errorpublic void addInitialProperty(GeneratorProperty initialProperty)
initialProperty - The initial property to addpublic void copyInitialPropertiesToContext(GeneratorContext context)
context - Generator contextpublic void removeInitialPropertiesToContext(GeneratorContext context)
context - Generator contextpublic java.lang.String getFunctionalGroup()
public void setFunctionalGroup(java.lang.String functionalGroup)
public boolean isItemGenerator()
public void setItemGenerator(boolean itemGenerator)
public int getSequenceNr()
public void setSequenceNr(int sequenceNr)
public int getXmlLoaderSequenceNr()
public void setXmlLoaderSequenceNr(int xmlLoaderSequenceNr)
public java.lang.String getItemType()
public void setItemType(java.lang.String itemType)
public java.util.Iterator getRequiredItemPropertys()
public void addRequiredItemProperty(java.lang.String requiredItemProperty)
requiredItemProperty - The required property to addpublic void clearRequiredItemPropertys()
public java.util.List getRequiredItemPropertyList()
public void setRequiredItemPropertyList(java.util.List requiredItemPropertyList)
requiredItemPropertyList - A list of String objectspublic java.lang.String getCondition()
public void setCondition(java.lang.String condition)
public java.util.Iterator getCustomPages()
GeneratorPageDescriptor objectspublic void addCustomPage(GeneratorPageDescriptor customPage)
customPage - The custom page to addpublic void clearCustomPages()
public java.util.List getCustomPageList()
GeneratorPageDescriptor objectspublic void setCustomPageList(java.util.List customPageList)
customPageList - A list of GeneratorPageDescriptor objectspublic java.lang.String getTemplateName()
public void setTemplateName(java.lang.String templateName)
public java.lang.String getDefaultStartPageName()
public void setDefaultStartPageName(java.lang.String defaultStartPageName)
public boolean isShowOpenResultCheckBox()
public void setShowOpenResultCheckBox(boolean showOpenResultCheckBox)
public java.lang.String getGeneratorCustomizerClassName()
GeneratorCustomizer interface).
public void setGeneratorCustomizerClassName(java.lang.String generatorCustomizerClassName)
GeneratorCustomizer interface).
public GeneratorMgr getGeneratorMgr()
public void setGeneratorMgr(GeneratorMgr generatorMgr)
public java.lang.ClassLoader getClassLoader()
public void setClassLoader(java.lang.ClassLoader classLoader)
public XMLDriver getXmlDriver()
public void setXmlDriver(XMLDriver xmlDriver)
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class DescriptionObjectImplo - Object to compare to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||