org.jcoderz.commons.config
Class ConfigurationServiceAdminImpl

java.lang.Object
  extended by org.jcoderz.commons.config.ConfigurationServiceCommonImpl
      extended by org.jcoderz.commons.config.ConfigurationServiceAdminImpl
All Implemented Interfaces:
ConfigurationServiceAdminInterface, ConfigurationServiceCommonInterface
Direct Known Subclasses:
ConfigurationServiceAdminBean

public class ConfigurationServiceAdminImpl
extends ConfigurationServiceCommonImpl
implements ConfigurationServiceAdminInterface

Implementation of the ConfigurationService business methods of the administration interface. This class holds all business logic of the service related to administrative tasks like getting all configuration keys or single configuration values. On this level only primitve types String, int, long and boolean are used. The wellformed and complex typed interfaces for the specific services are using this more simple interface. Implementing the business interface ConfigurationServiceAdminInterface and thus the ConfigurationServiceCommonInterface. IMPORTANT: Because of XDoclet Bug in current version, we define deligators to the super class with ejb-tags here. These should be deleted if XDoclet is fixed.


Constructor Summary
ConfigurationServiceAdminImpl()
           
 
Method Summary
 boolean getBoolean(ConfigurationKey key)
          Returns the boolean value that is associated with the given key.
 int getInt(ConfigurationKey key)
          Returns the int value that is associated with the given key.
 Set getKeys()
          Returns an immutable Set containing all keys present in the configuration.
 long getLong(ConfigurationKey key)
          Returns the long value that is associated with the given key.
 String getString(ConfigurationKey key)
          Returns the String value that is associated with the given key.
 
Methods inherited from class org.jcoderz.commons.config.ConfigurationServiceCommonImpl
getConfigurationCacheCurrent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationServiceAdminImpl

public ConfigurationServiceAdminImpl()
Method Detail

getKeys

public Set getKeys()
            throws ConfigurationInitializationFailedException
Returns an immutable Set containing all keys present in the configuration. The keys are ConfigurationKey objects. In case there are no keys, the Set is empty.

Specified by:
getKeys in interface ConfigurationServiceAdminInterface
Returns:
the Set of all existing ConfigurationKey objects. Or empty set if no data is stored.
Throws:
ConfigurationInitializationFailedException - if the requested configuration keys could not be fetched, or if a key could not be transformed to a valid ConfigurationKey instance. This could only occur, for general config resource problems, therefor the initialization failure is thrown instead of the underlying ArgumentMalformedException.
ejb.interface-method
view-type="remote"
ejb.permission
role-name="Admin,Observer"
ejb.transaction
type="Required"

getBoolean

public boolean getBoolean(ConfigurationKey key)
                   throws ConfigurationValueNotFoundException,
                          ConfigurationTypeConversionFailedException,
                          ArgumentMalformedException
Returns the boolean value that is associated with the given key. FIXME: activate ejb tag if XDoclet BugFix is available

Specified by:
getBoolean in interface ConfigurationServiceCommonInterface
Overrides:
getBoolean in class ConfigurationServiceCommonImpl
Parameters:
key - ConfigurationKey that is the key for a stored configuration value.
Returns:
the boolean value that is associated with the given key.
Throws:
ConfigurationValueNotFoundException - in case there is no match to key.
ConfigurationTypeConversionFailedException - in case the found value could not be converted to boolean type.
ArgumentMalformedException - Is thrown to indicate the illegal use of a null object as input parameter.
ejb.interface-method
view-type="remote"
ejb.permission
role-name="Admin,Observer"
ejb.transaction
type="Required"

getInt

public int getInt(ConfigurationKey key)
           throws ConfigurationValueNotFoundException,
                  ConfigurationTypeConversionFailedException,
                  ArgumentMalformedException
Returns the int value that is associated with the given key. FIXME: activate ejb tag if XDoclet BugFix is available

Specified by:
getInt in interface ConfigurationServiceCommonInterface
Overrides:
getInt in class ConfigurationServiceCommonImpl
Parameters:
key - ConfigurationKey that is the key for a stored configuration value.
Returns:
the int value that is associated with the given key.
Throws:
ConfigurationValueNotFoundException - in case there is no match to the key.
ConfigurationTypeConversionFailedException - in case the found value could not be converted to int type.
ArgumentMalformedException - Is thrown to indicate the illegal use of a null object as input parameter.
ejb.interface-method
view-type="remote"
ejb.permission
role-name="Admin,Observer"
ejb.transaction
type="Required"

getLong

public long getLong(ConfigurationKey key)
             throws ConfigurationValueNotFoundException,
                    ConfigurationTypeConversionFailedException,
                    ArgumentMalformedException
Returns the long value that is associated with the given key. FIXME: activate ejb tag if XDoclet BugFix is available

Specified by:
getLong in interface ConfigurationServiceCommonInterface
Overrides:
getLong in class ConfigurationServiceCommonImpl
Parameters:
key - ConfigurationKey that is the key for a stored configuration value.
Returns:
the long value that is associated with the given key.
Throws:
ConfigurationValueNotFoundException - in case there is no match to the key.
ConfigurationTypeConversionFailedException - in case the found value could not be converted to long type.
ArgumentMalformedException - Is thrown to indicate the illegal use of a null object as input parameter.
ejb.interface-method
view-type="remote"
ejb.permission
role-name="Admin,Observer"
ejb.transaction
type="Required"

getString

public String getString(ConfigurationKey key)
                 throws ConfigurationValueNotFoundException,
                        ArgumentMalformedException
Returns the String value that is associated with the given key. FIXME: activate ejb tag if XDoclet BugFix is available

Specified by:
getString in interface ConfigurationServiceCommonInterface
Overrides:
getString in class ConfigurationServiceCommonImpl
Parameters:
key - ConfigurationKey that is the key for a stored configuration value.
Returns:
the String value that is associated with the given key.
Throws:
ConfigurationValueNotFoundException - in case there is no match to the key.
ArgumentMalformedException - Is thrown to indicate the illegal use of a null object as input parameter.
ejb.interface-method
view-type="remote"
ejb.permission
role-name="Admin,Observer"
ejb.transaction
type="Required"


Copyright 2007 The jCoderZ Project.