|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Subconfiguration
An interface to be passed to components for them to be configured.
Making this an interface allows thirdParty developers to be able to compile
their sources while only using the ActiveMath interfaces
(the abstractcontent package) and not reference directly the implementation
Manager class.
| Method Summary | |
|---|---|
boolean |
getBoolean(String name)
Tries to compute the boolean value of the value of the given property. |
Collection |
getChildrenNames(String prefix)
Returns the next step completion given the named prefix. |
int |
getInt(String name)
Tries to compute the integer value of the value of the given property. |
URL |
getPath(String name)
Computes the path of the given properties according to ActiveMath's mechanism (using a possible extra <name>.refType
property. |
String |
getProperty(String name)
Returns the values for the given name or null if there's none. |
Iterator |
getPropertyNames()
Returns an enumeration of all the property names. |
Object |
getService(String serviceInterfaceClassName)
This is the way to provide named services to users of the subconfiguation. |
Subconfiguration |
getSubconfiguration(String prefix)
Creates a sub-configuration object with the properties with given prefix. |
URL |
pathFromString(String pathString)
Computes the path for the obtained property value. |
void |
refreshServices()
Commodity method to request the configurator to re-read the services from whichever source it was given. |
void |
setDefaultProperties(Map props)
Sets the default properties for this component. |
| Method Detail |
|---|
void setDefaultProperties(Map props)
String.
IllegalStateException - when this method is called more than onceString getProperty(String name)
null if there's none.
URL getPath(String name)
<name>.refType
property.
Manager.getPath(java.lang.String)URL pathFromString(String pathString)
boolean getBoolean(String name)
IllegalArgumentException - if the property does not exist
or if the value cannot be cast to a booleanint getInt(String name)
IllegalArgumentException - if the property does not exist
or if the value cannot be cast to an intObject getService(String serviceInterfaceClassName)
Note that implementations of the Subconfiguration interface should only accept, as argument of this method, the class of a java-interface.
The service returned is not supposed to be twiddled or adjusted by the user of this service as such a service will presumably be shared by several users in a normal deployment.
Examples of such services could be an implementation of the JAXP's
TransformerFactory interface, or an implementation
of the MBaseRef interface.
Child-subconfigurations obtained through getSubconfiguration(java.lang.String)
should, so as to enforce the inversion-of-control pattern, restrict
the amount of services provided to the strict needed parts.
IllegalArgumentException - if the service indicated does not existvoid refreshServices()
Iterator getPropertyNames()
Collection getChildrenNames(String prefix)
As an example, given
i.a.blop.c = val1
i.b.blip = val2
This method, called with "i", would return the enumeration made of the string "a" and the string "b".
prefix - the prefix string, without the trailing "."
or null if the root property names is wished.Subconfiguration getSubconfiguration(String prefix)
prefix - the prefix string, without the trailing "."
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||