raccoon.api.types
Interface IConfigurableManager

All Superinterfaces:
IBaseComponent
All Known Implementing Classes:
ConfigurableManager

public interface IConfigurableManager
extends IBaseComponent

Maanges the configurable components and their properties. If a component is configurable than the configuration elements are assigned to it. If the configurable component is loadable this is done before loading the component.

Since:
Raccoon v0.8
Version:
$Id: IConfigurableManager.java,v 1.1 2004/08/08 20:25:57 crouvrais Exp $
Author:
Cedric ROUVRAIS

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 pIsRequired)
          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.
 java.lang.String listRequiredComponents(java.lang.Class pClass)
          Generates an XML String describing this component.
 java.util.Iterator walkParameters()
          Get an iterator on the properties of this manager.
 
Methods inherited from interface raccoon.api.types.IBaseComponent
isInError
 

Method Detail

addProperty

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.

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

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

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()
pIsRequired - should the value of this property be assigned before this component is loaded.

isChangeable

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

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

boolean isAssignable(java.lang.String pName,
                     java.lang.Object pValue)
                     throws ResourceNotFoundException
Checks if the specified property can accept the value. TODO Change the exception signature to a runtime error

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
Throws:
ResourceNotFoundException - if the property named pName was not found.

walkParameters

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

Returns:
an iterator of ConfigurableProperty elements.

listRequiredComponents

java.lang.String listRequiredComponents(java.lang.Class pClass)
                                        throws java.lang.Exception
Generates an XML String describing this component.

It is recommended that the XML String generated be a valid configuration for the implementation of the interface IServiceManager for end user convenience.

Note: this method relies on the implementing class to declare it's configurable elements.

Parameters:
pClass - the class for which the configurable parameters are desired.
Returns:
the list of required components/elements.
Throws:
java.lang.Exception - should there be an error whilst analyzing the provided class.


Copyright null null. All Rights Reserved.