|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.cockpit.generator.GeneratorContext
public class GeneratorContext
This container object holds various informations that are modified by the generator wizard and used by the generator.
| Constructor Summary | |
|---|---|
GeneratorContext()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
clearStatus(int statusFlag)
Clears the specified status. |
GeneratorSettings |
getGeneratorSettings()
Gets the generator-specific settings. |
Item |
getItem()
Gets the (modified) tem the generation process should be performed upon. |
Item |
getOriginalItem()
Gets the original item the generation process should be performed upon. |
java.lang.String |
getOutputRootDir()
Gets the root of the output directory. |
java.lang.String |
getOverwriteMode()
Gets the template overwrite mode. |
java.util.Map |
getProperties()
Gets the table of generator properties that will be used in the template-based generation process. |
java.lang.Object |
getProperty(java.lang.String key)
Gets a generator property. |
Generator |
getSelectedGenerator()
Gets the selected generator. |
TemplateEngineResult |
getTemplateEngineResult()
Gets the template engine result. |
boolean |
hasStatus(int statusFlag)
Checks if the specified status is set. |
boolean |
isClassnameSet()
Gets the flag if the item has been edited in the visual view. |
boolean |
isEmptyItem()
Gets the flag if the item name and structure should be initialized, overwriting existing definitions. |
boolean |
isInvalidGenerator()
Gets the flag if the requirements for the generator have not been met. |
boolean |
isItemSaved()
Gets the flag if the item has been saved during the generation process. |
boolean |
isNeedGeneration()
Gets the flag if a property/wizard page that may require (re)-generation has been modified. |
boolean |
isNewItem()
Gets the flag if the item is a new item. |
void |
removeProperty(java.lang.String key)
Removes a generator property. |
void |
reset()
Resets the context status. |
void |
setClassnameSet(boolean classnameSet)
Sets the flag if the item has been edited in the visual view. |
void |
setEmptyItem(boolean isEmpty)
Sets the flag if the item name and structure should be initialized, overwriting existing definitions. |
void |
setGeneratorSettings(GeneratorSettings generatorSettings)
Sets the generator-specific settings. |
void |
setInvalidGenerator(boolean invalidGenerator)
Sets the flag if the requirements for the generator have not been met. |
void |
setItem(Item item)
Sets the (modified) tem the generation process should be performed upon. |
void |
setItemSaved(boolean itemSaved)
Sets the flag if the item has been saved during the generation process. |
void |
setNeedGeneration(boolean needGeneration)
Sets the flag if a property/wizard page that may require (re)-generation has been modified. |
void |
setNewItem(boolean newItem)
Sets the flag if the item is a new item. |
void |
setOriginalItem(Item originalItem)
Sets the original item the generation process should be performed upon. |
void |
setOutputRootDir(java.lang.String outputRootDir)
Sets the root of the output directory. |
void |
setOverwriteMode(java.lang.String overwriteMode)
Sets the template overwrite mode. |
void |
setProperty(java.lang.String key,
java.lang.Object value)
Adds a generator property. |
void |
setSelectedGenerator(Generator selectedGenerator)
Sets the selected generator. |
void |
setStatus(int statusFlag)
Sets the specified status. |
void |
setTemplateEngineResult(TemplateEngineResult templateEngineResult)
Sets the template engine result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneratorContext()
| Method Detail |
|---|
public void reset()
public Item getItem()
public void setItem(Item item)
public Item getOriginalItem()
ModelObjectValidator
public void setOriginalItem(Item originalItem)
ModelObjectValidator
public boolean hasStatus(int statusFlag)
statusFlag - Status flag to check (see the constants of this class)public void setStatus(int statusFlag)
statusFlag - Status flag to set (see the constants of this class)public void clearStatus(int statusFlag)
statusFlag - Status flag to clear (see the constants of this class)public java.lang.String getOutputRootDir()
public void setOutputRootDir(java.lang.String outputRootDir)
public java.lang.String getOverwriteMode()
public void setOverwriteMode(java.lang.String overwriteMode)
overwriteMode - "ask"/"merge"/"overwrite"public Generator getSelectedGenerator()
public void setSelectedGenerator(Generator selectedGenerator)
public GeneratorSettings getGeneratorSettings()
public void setGeneratorSettings(GeneratorSettings generatorSettings)
public TemplateEngineResult getTemplateEngineResult()
public void setTemplateEngineResult(TemplateEngineResult templateEngineResult)
public void setProperty(java.lang.String key,
java.lang.Object value)
key - Property namevalue - Property valuepublic void removeProperty(java.lang.String key)
key - Property namepublic java.lang.Object getProperty(java.lang.String key)
key - Property name
public java.util.Map getProperties()
public boolean isNewItem()
public void setNewItem(boolean newItem)
public boolean isEmptyItem()
public void setEmptyItem(boolean isEmpty)
public boolean isItemSaved()
public void setItemSaved(boolean itemSaved)
public boolean isNeedGeneration()
public void setNeedGeneration(boolean needGeneration)
public boolean isInvalidGenerator()
public void setInvalidGenerator(boolean invalidGenerator)
public boolean isClassnameSet()
public void setClassnameSet(boolean classnameSet)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||