public static class ApplicationConfig.SubApplicationConfig extends ApplicationConfig
monOption=toto monPrefix.monOption=titi
ApplicationConfig.Action, ApplicationConfig.ActionDef, ApplicationConfig.CacheItem<T>, ApplicationConfig.OptionDef, ApplicationConfig.OptionList, ApplicationConfig.SubApplicationConfig| Modifier and Type | Field and Description |
|---|---|
protected ApplicationConfig |
parent |
protected String |
prefix |
actions, ADJUSTING_PROPERTY, aliases, APP_NAME, cacheAction, cacheOption, classpath, CONFIG_ENCODING, CONFIG_FILE_NAME, CONFIG_PATH, context, curfile, defaults, env, etcfile, homefile, inParseOptionPhase, jvm, line, LIST_SEPARATOR, options, osName, pcs, unparsed, useOnlyAliases, userPath| Constructor and Description |
|---|
ApplicationConfig.SubApplicationConfig(ApplicationConfig parent,
String prefix) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue) |
Properties |
getFlatOptions(boolean replaceInner)
Surcharge de la methode pour que les options commencant par le prefix
soit modifiee pour qu'elle est la meme cle sans le prefix.
|
String |
getOption(String key)
Surcharge pour recherche la cle avec le prefix.
|
Properties |
getOptions()
Get all options from configuration.
|
Properties |
getOptionStartsWith(String prefix)
Surcharge pour recupere les valeurs commencant par le prefix demande
en plus du prefix 'sub'.
|
ApplicationConfig |
getParent() |
String |
getPrefix() |
boolean |
hasListeners(String propertyName) |
boolean |
hasOption(String key)
Teste si un option existe ou non.
|
protected void |
init(Properties defaults,
String configFilename)
On separt l'init du corps du constructeur, car les sous classes ne doivent
pas l'executer.
|
ApplicationConfig |
parse(String... args)
Parse option and call set necessary method, read jvm, env variable,
Load configuration file and prepare Action.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
setDefaultOption(String key,
String value)
Used to put default configuration option in config option.
|
void |
setOption(String key,
String value)
Set option value.
|
addAction, addActionAlias, addAlias, addPropertyChangeListener, convertOption, createAction, doAction, doAllAction, getActionStep, getConfigFileName, getConfigFileNameOption, getConfigPath, getEncoding, getEncodingOption, getFlatOptions, getMethods, getObject, getObject, getOption, getOption, getOptionAsBoolean, getOptionAsClass, getOptionAsDate, getOptionAsDouble, getOptionAsFile, getOptionAsFloat, getOptionAsInt, getOptionAsKeyStroke, getOptionAsList, getOptionAsLocale, getOptionAsLong, getOptionAsObject, getOptionAsObject, getOptionAsProperties, getOptionAsSingleton, getOptionAsSingleton, getOptionAsTime, getOptionAsTimestamp, getOptionAsURL, getOptionAsVersion, getParams, getPrintableConfig, getPropertyChangeListeners, getPropertyChangeListeners, getSubConfig, getSystemConfigFile, getSystemConfigurationPath, getUnparsed, getUserConfigDirectory, getUserConfigFile, getUserHome, getUsername, hasOption, installSaveUserAction, isAdjusting, isUseOnlyAliases, loadActions, loadActions, loadDefaultOptions, loadDefaultOptions, loadResource, migrateUserConfigurationFile, printConfig, printConfig, putObject, putObject, removePropertyChangeListener, replaceRecursiveOptions, save, saveForSystem, saveForUser, saveResource, setAdjusting, setAppName, setConfigFileName, setEncoding, setOptions, setUseOnlyAliasesprotected ApplicationConfig parent
protected String prefix
public ApplicationConfig.SubApplicationConfig(ApplicationConfig parent, String prefix)
protected void init(Properties defaults, String configFilename)
ApplicationConfiginit in class ApplicationConfigpublic ApplicationConfig getParent()
public String getPrefix()
public Properties getOptions()
ApplicationConfiggetOptions in class ApplicationConfigpublic void setDefaultOption(String key, String value)
ApplicationConfigsetDefaultOption in class ApplicationConfigkey - default property keyvalue - default property valuepublic boolean hasOption(String key)
ApplicationConfighasOption in class ApplicationConfigkey - la clef de l'option à testertrue si l'option existe, false sinon.public void setOption(String key, String value)
ApplicationConfigsetOption in class ApplicationConfigkey - property keyvalue - property valuepublic String getOption(String key)
getOption in class ApplicationConfigkey - La cle de l'optionpublic Properties getFlatOptions(boolean replaceInner)
getFlatOptions in class ApplicationConfigreplaceInner - le prefix à remplacerpublic Properties getOptionStartsWith(String prefix)
getOptionStartsWith in class ApplicationConfigprefix - prefix to useprotected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
firePropertyChange in class ApplicationConfigpublic void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener in class ApplicationConfigpublic void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
removePropertyChangeListener in class ApplicationConfigpublic boolean hasListeners(String propertyName)
hasListeners in class ApplicationConfigpublic ApplicationConfig parse(String... args) throws ArgumentsParserException
ApplicationConfigparse in class ApplicationConfigargs - argument as main(String[] args)ArgumentsParserException - if parsing failedCopyright © 2004-2012 CodeLutin. All Rights Reserved.