|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pietschy.command.configuration.impl.DefaultConfigurationLoader
public class DefaultConfigurationLoader
Default implementation of ConfigurationLoader.
| Constructor Summary | |
|---|---|
DefaultConfigurationLoader()
Creates a new instance. |
|
DefaultConfigurationLoader(ConfigurationCache cache,
ConfigurationParser parser)
Creates a new instance with the specified cache and parser. |
|
| Method Summary | |
|---|---|
void |
configure(Command command)
Configures the specified command from the configuration cache using the most appropriate Configurator. |
(package private) Configurator |
getConfiguratorFor(Command command)
Get the best Configurator for the specified command. |
java.lang.String |
getGroupClassName(java.lang.String id)
Gets the class name specified for the group with the specified id. |
boolean |
isAutoCreate(java.lang.String id)
Checks if the specified Id represents a group that has been marked as autoCreate. |
boolean |
isGroup(java.lang.String id)
Checks if the specified Id represents a CommandGroup. |
boolean |
isToggleGroup(java.lang.String id)
Checks if the specified Id represents a ToggleGroup. |
void |
load(java.util.ResourceBundle bundle)
Loads the specified resource bundle into the configuration cache. |
(package private) void |
register(java.lang.Class<? extends Command> clazz,
Configurator configurator)
Registers the specified configurator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultConfigurationLoader()
DefaultConfigurationLoader(ConfigurationCache cache,
ConfigurationParser parser)
cache - the cache to use.parser - the parser to use.| Method Detail |
|---|
void register(java.lang.Class<? extends Command> clazz,
Configurator configurator)
clazz - the command classconfigurator - the configurator
public void load(java.util.ResourceBundle bundle)
throws ParseException
load in interface ConfigurationLoaderbundle - the bundle to load.
ParseException - if there was an error parsing the bundle.
public void configure(Command command)
throws ConfigurationException
Configurator.
configure in interface ConfigurationLoadercommand - the command to configure.
ConfigurationException - if there was an error configuring the command.Configurator getConfiguratorFor(Command command)
Configurator for the specified command.
command - the command
public boolean isGroup(java.lang.String id)
CommandGroup.
isGroup in interface ConfigurationLoaderid - the id to check.
true if the configuration for the specified id exists and
is for a CommandGroup.public boolean isToggleGroup(java.lang.String id)
ToggleGroup.
isToggleGroup in interface ConfigurationLoaderid - the id to check.
true if the configuration for the specified id exists and
is for a ToggleGroup.public boolean isAutoCreate(java.lang.String id)
isAutoCreate in interface ConfigurationLoaderid - the id to check.
true if the configuration for the specified id is a group and
has been configured for automatic creation.public java.lang.String getGroupClassName(java.lang.String id)
getGroupClassName in interface ConfigurationLoaderid - the group to check.
null if no class has been
explicitly specified.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||