raccoon.core.types
Class ConfigurableManager

java.lang.Object
  extended by raccoon.core.types.ConfigurableManager
All Implemented Interfaces:
IBaseComponent, IConfigurableManager

public class ConfigurableManager
extends java.lang.Object
implements IConfigurableManager

The default implementation of the IConfigurableManager interface.

Since:
Raccoon v0.8
Version:
$Id: ConfigurableManager.java,v 1.1 2004/08/08 20:19:18 crouvrais Exp $
Author:
Cedric ROUVRAIS

Field Summary
protected  java.util.HashMap mParameters
          The list of parameters
 
Constructor Summary
ConfigurableManager()
           
 
Method Summary
 void addProperty(java.lang.String pName, java.lang.Class pType)
          Adds the specified property to the list of configurable elements.
 void addProperty(java.lang.String pName, java.lang.Class pType, boolean pRequired)
          Adds the specified property to the list of configurable elements.
 boolean isAssignable(java.lang.String pName, java.lang.Object pValue)
          Checks if the specified property can accept the value.
 boolean isChangeable(java.lang.String pName)
          Checks if the specified property is changeable.
 boolean isInError()
          Checks the state of this component.
 java.lang.String listRequiredComponents(java.lang.Class pClass)
          Generates empty Service Manager configuration string.
 java.util.Iterator walkParameters()
          Get an iterator on the properties of this manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mParameters

protected java.util.HashMap mParameters
The list of parameters

Constructor Detail

ConfigurableManager

public ConfigurableManager()
Method Detail

addProperty

public void addProperty(java.lang.String pName,
                        java.lang.Class pType)
Adds the specified property to the list of configurable elements. It is assumed that this property doesn't need to be assigned before the component is loaded, if this component implements ILoadable.

Specified by:
addProperty in interface IConfigurableManager
Parameters:
pName - the name of the property, usually correlated to the java bean property.
pType - the type of the property, usually obtained via (Object Instance).Object.getClass()

addProperty

public void addProperty(java.lang.String pName,
                        java.lang.Class pType,
                        boolean pRequired)
Adds the specified property to the list of configurable elements.

Specified by:
addProperty in interface IConfigurableManager
Parameters:
pName - the name of the property, usually correlated to the java bean property.
pType - the type of the property, usually obtained via (Object Instance).Object.getClass()
pRequired - should the value of this property be assigned before this component is loaded.

isChangeable

public boolean isChangeable(java.lang.String pName)
                     throws ResourceNotFoundException
Checks if the specified property is changeable.

Specified by:
isChangeable in interface IConfigurableManager
Parameters:
pName - the name of the property, usually correlated to the java bean property.
Returns:
true if the value of the property can be modified.
Throws:
ResourceNotFoundException - if the property named pName was not found.

isAssignable

public boolean isAssignable(java.lang.String pName,
                            java.lang.Object pValue)
                     throws ResourceNotFoundException
Checks if the specified property can accept the value.

Specified by:
isAssignable in interface IConfigurableManager
Parameters:
pName - the name of the property, usually correlated to the java bean property.
pValue - the value that is to be assigned to the property.
Returns:
true is the value can be assigned to the specified property.
Throws:
ResourceNotFoundException - if the property named pName was not found.

isInError

public boolean isInError()
Checks the state of this component.

Specified by:
isInError in interface IBaseComponent
Returns:
false this component can never be in error

walkParameters

public java.util.Iterator walkParameters()
Get an iterator on the properties of this manager.

Specified by:
walkParameters in interface IConfigurableManager
Returns:
an iterator of ConfigurableProperty elements.

listRequiredComponents

public java.lang.String listRequiredComponents(java.lang.Class pClass)
                                        throws java.lang.Exception
Generates empty Service Manager configuration string. Can be used to generate the XML String that will be used to configure the provided by the Service Manager.

Specified by:
listRequiredComponents in interface IConfigurableManager
Parameters:
pClass - the class that is to be analyzed.
Returns:
the appropriate XML String.
Throws:
java.lang.Exception - should there be an error whilst analyzing the provided class.


Copyright null null. All Rights Reserved.