public class GenerateOptionsModel
extends java.lang.Object
implements com.lf.commons.model.ConfigurableUnit
GenerateOptionsWindow
.
Here, the templates are managed and can be accessed without creating the GUI components
(e.g for CLI).
Modifier and Type | Field and Description |
---|---|
protected com.lf.commons.lang.OrderedHashtable<java.lang.String,com.lf.commons.config.Configuration> |
cacheTemplates
Remembers the template configurations by their unique IDs.
|
protected java.lang.String |
currentTemplate
Remembers the active template.
|
protected com.lf.commons.config.Configuration |
templateDefault
The default template settings.
|
Constructor and Description |
---|
GenerateOptionsModel()
Constructor for the component.
|
Modifier and Type | Method and Description |
---|---|
void |
configureUnit(java.lang.String id,
com.lf.commons.config.Configuration config)
Restores values from persistent data stores.
|
protected void |
debugTemplates()
Prints the currently managed templates.
|
protected void |
finalize()
Clean-up method to help the gc.
|
com.lf.commons.config.Configuration |
getDefaultSyncTemplate()
Provides the default generate options reasonable for sync ops.
|
com.lf.commons.config.Configuration |
getDefaultTemplate()
Provides the default template settings.
|
com.lf.commons.config.Configuration |
getTemplate(java.lang.String id)
Provides the desired template, original container is copied (you may alter values).
|
java.util.Hashtable<java.lang.String,com.lf.commons.config.Configuration> |
getTemplates()
Provides the template configurations (copies, feel free to alter :-).
|
void |
storeUnit(java.lang.String id,
com.lf.commons.config.Configuration config)
Stores the current configuration values persistently.
|
void |
unitRegistered(com.lf.commons.model.ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was registered with a model.
|
void |
unitUnregistered(com.lf.commons.model.ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was unregistered with a model.
|
protected com.lf.commons.lang.OrderedHashtable<java.lang.String,com.lf.commons.config.Configuration> cacheTemplates
protected com.lf.commons.config.Configuration templateDefault
protected java.lang.String currentTemplate
public GenerateOptionsModel()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public com.lf.commons.config.Configuration getDefaultTemplate()
public com.lf.commons.config.Configuration getDefaultSyncTemplate()
public void configureUnit(java.lang.String id, com.lf.commons.config.Configuration config)
configureUnit
in interface com.lf.commons.model.ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void storeUnit(java.lang.String id, com.lf.commons.config.Configuration config)
storeUnit
in interface com.lf.commons.model.ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void unitRegistered(com.lf.commons.model.ApplicationModel model, java.lang.String id)
unitRegistered
in interface com.lf.commons.model.ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic void unitUnregistered(com.lf.commons.model.ApplicationModel model, java.lang.String id)
unitUnregistered
in interface com.lf.commons.model.ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic java.util.Hashtable<java.lang.String,com.lf.commons.config.Configuration> getTemplates()
public com.lf.commons.config.Configuration getTemplate(java.lang.String id)
id
- The template identifiernull
if not availableprotected void debugTemplates()
Copyright © 2005-2015 Leisenfels UG. All rights reserved.