|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.cockpit.generator.GeneratorCustomizer
public abstract class GeneratorCustomizer
Customizer class used to customize a template generation process described by the
Generator class.
The customizer class can access the item the generation process is to be performed upon
using the context.getItem() method. It may also add or modify generation properties
(see GeneratorContext.setProperty(java.lang.String, java.lang.Object)) that will be used as property table for the
template-based generation process.
| Constructor Summary | |
|---|---|
GeneratorCustomizer()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
afterPageSequenceUpdate(GeneratorContext context,
GeneratorWizard wizard)
Template method that is called after the page sequence has been updated. |
void |
beforePageSequenceUpdate(GeneratorContext context,
GeneratorWizard wizard)
Template method that is called before the page sequence has been updated. |
void |
checkRequirements(GeneratorContext context)
This method is executed after the generation process has been selected in order to check any conditions that need to be fullfilled for the process to work. |
java.lang.Object |
createSettings(GeneratorContext context)
Creates a settings object for this customizer if it requires one. |
java.lang.String |
determineUniqueSuffix(Item item,
java.lang.String name)
Determines a unique suffix for the given name that will make the item name unique. |
java.lang.String |
evaluateFormat(GeneratorContext context,
java.lang.String format)
Evaluates a format descrition. |
java.lang.Class[] |
getDependentSettingsClasses()
Returns the class of any dependent objects of the generator settings class that must be serialized to the generator info of an edited item. |
Generator |
getGenerator()
Gets the generator that owns this customizer instance. |
java.lang.Class |
getSettingsClass()
Returns the class of the generator settings used by this generator. |
java.lang.String |
getTemplateName(GeneratorContext context)
Gets template name. |
boolean |
hasResultPage(GeneratorContext context)
Determines if the generator should display a result page. |
void |
loadSettings(GeneratorContext context)
Loads the settings from persistent storage into the newly created settings object. |
void |
performProcess(GeneratorContext context)
Main processing step. |
void |
postProcess(GeneratorContext context)
Post-process step that is executed after the actual generation step. |
void |
preProcess(GeneratorContext context)
Pre-process step that is executed before the actual generation step. |
void |
processWizardEvent(GeneratorContext context,
WizardEvent event)
Processes a wizard event caused by a generator wizard page. |
void |
saveSettings(GeneratorContext context)
Saves the settings from the settings object to persistent storage. |
void |
setGenerator(Generator generator)
Sets the generator that owns this customizer instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneratorCustomizer()
| Method Detail |
|---|
public java.lang.Object createSettings(GeneratorContext context)
context - Generator context
public void loadSettings(GeneratorContext context)
context - Generator contextpublic void saveSettings(GeneratorContext context)
context - Generator contextpublic java.lang.Class getSettingsClass()
public java.lang.Class[] getDependentSettingsClasses()
public java.lang.String getTemplateName(GeneratorContext context)
context - Generator context
public boolean hasResultPage(GeneratorContext context)
context - Generator context
public void checkRequirements(GeneratorContext context)
context - Generator context
GeneratorException - On error
public void beforePageSequenceUpdate(GeneratorContext context,
GeneratorWizard wizard)
context - Contextwizard - Generator wizard
public void afterPageSequenceUpdate(GeneratorContext context,
GeneratorWizard wizard)
context - Contextwizard - Generator wizard
public void preProcess(GeneratorContext context)
throws java.lang.Exception
context - Generator context
GeneratorException - On error
java.lang.Exception
public void performProcess(GeneratorContext context)
throws java.lang.Exception
context - Generator context
GeneratorException - On error
java.lang.Exception
public void postProcess(GeneratorContext context)
throws java.lang.Exception
context - Generator context
GeneratorException - On error
java.lang.Exception
public void processWizardEvent(GeneratorContext context,
WizardEvent event)
context - Generator contextevent - Event to handlepublic Generator getGenerator()
public void setGenerator(Generator generator)
public java.lang.String evaluateFormat(GeneratorContext context,
java.lang.String format)
format - Formatcontext - Generator context
public java.lang.String determineUniqueSuffix(Item item,
java.lang.String name)
item - Item to generate a name forname - Name to use as base for the new name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||