|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.abstractcontent.SubconfImpl.AbstractSubconfiguration
org.activemath.abstractcontent.SubconfImpl.ChildSubconfiguration
public static class SubconfImpl.ChildSubconfiguration
A class to provide property-subtree-based configuration defined by a prefix and a parent subconfiguration.
| Constructor Summary | |
|---|---|
SubconfImpl.ChildSubconfiguration(Subconfiguration parent,
String prefix)
|
|
| Method Summary | |
|---|---|
boolean |
getBoolean(String name)
Uses the SubconfImpl.AbstractSubconfiguration.getBoolean(java.lang.String) to convert the
value of getProperty(java.lang.String) into an boolean. |
Collection |
getChildrenNames(String prefix2)
Returns the next step completion given the named prefix. |
int |
getInt(String name)
Uses the SubconfImpl.AbstractSubconfiguration.getInt(java.lang.String) to convert the
value of getProperty(java.lang.String) into an integer. |
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 value in the parent subconfiguration if available, or the value in default-properties (as set by setDefaultProperties(java.util.Map)). |
Iterator |
getPropertyNames()
Returns an enumeration of all the property names. |
Object |
getService(String serviceInterfaceName)
Does nothing but relaying the request to the parent. |
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 defaultsProps)
Set the default properties which allow a client to this class to set default-values that will be returned if the parent's property does not exist. |
String |
toString()
|
String |
wrapPropName(String name)
Returns prefix + "." + name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SubconfImpl.ChildSubconfiguration(Subconfiguration parent,
String prefix)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic void setDefaultProperties(Map defaultsProps)
setDefaultProperties in interface SubconfigurationsetDefaultProperties in class SubconfImpl.AbstractSubconfigurationpublic String wrapPropName(String name)
prefix + "." + name.
This method is called just about everywhere in this class
when a property name has to be looked up in the parent
subconfiguration.
public String getProperty(String name)
setDefaultProperties(java.util.Map)).
getProperty in interface SubconfigurationgetProperty in class SubconfImpl.AbstractSubconfigurationpublic int getInt(String name)
SubconfImpl.AbstractSubconfiguration.getInt(java.lang.String) to convert the
value of getProperty(java.lang.String) into an integer.
getInt in interface SubconfigurationgetInt in class SubconfImpl.AbstractSubconfigurationpublic boolean getBoolean(String name)
SubconfImpl.AbstractSubconfiguration.getBoolean(java.lang.String) to convert the
value of getProperty(java.lang.String) into an boolean.
getBoolean in interface SubconfigurationgetBoolean in class SubconfImpl.AbstractSubconfigurationpublic URL getPath(String name)
Subconfiguration<name>.refType
property.
getPath in interface SubconfigurationgetPath in class SubconfImpl.AbstractSubconfigurationManager.getPath(java.lang.String)public URL pathFromString(String pathString)
Subconfiguration
public Iterator getPropertyNames()
Subconfiguration
getPropertyNames in interface SubconfigurationgetPropertyNames in class SubconfImpl.AbstractSubconfigurationpublic Collection getChildrenNames(String prefix2)
SubconfigurationAs 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".
getChildrenNames in interface SubconfigurationgetChildrenNames in class SubconfImpl.AbstractSubconfigurationprefix2 - the prefix string, without the trailing "."
or null if the root property names is wished.public Subconfiguration getSubconfiguration(String prefix)
Subconfiguration
getSubconfiguration in interface SubconfigurationgetSubconfiguration in class SubconfImpl.AbstractSubconfigurationprefix - the prefix string, without the trailing "."
SubconfImpl.ChildSubconfiguration that is backed
by the current subconfiguration.public Object getService(String serviceInterfaceName)
public void refreshServices()
Subconfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||