|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openorb.orb.config.Properties
This class contains all kernel properties.
Constructor Summary | |
Properties()
|
Method Summary | |
void |
addProperty(java.lang.String name,
boolean value)
Add a boolean property. |
void |
addProperty(java.lang.String name,
java.lang.Class clz)
Add a Class property. |
void |
addProperty(java.lang.String name,
int value)
Add an integer property. |
void |
addProperty(java.lang.String name,
java.lang.String value)
Add a string property. |
void |
addProperty(java.lang.String name,
java.net.URL value)
Add a URL property. |
void |
display()
Display properties. |
void |
display(org.apache.avalon.framework.logger.Logger logger)
Display properties. |
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
Setup current logger |
java.lang.String |
formatString(java.lang.String str)
Format the string argument, replacing ${prop.name} with the value of the property. |
boolean |
getBooleanProperty(java.lang.String name)
Get the boolean property with the given name. |
boolean |
getBooleanProperty(java.lang.String name,
boolean defl)
Get the boolean property with the given name. |
java.lang.Class |
getClassProperty(java.lang.String name)
Get the integer property with the given name. |
java.lang.Class |
getClassProperty(java.lang.String name,
java.lang.Class defl)
Get the Class object property with the given name. |
java.lang.Class |
getClassProperty(java.lang.String name,
java.lang.String defl)
Get the Class object property with the given name. |
int |
getIntProperty(java.lang.String name)
Get the integer property with the given name. |
int |
getIntProperty(java.lang.String name,
int defl)
Get the integer property with the given name. |
Property |
getProperty(java.lang.String name)
Get the Property object with the given name. |
java.lang.String |
getStringProperty(java.lang.String name)
Get the string property with the given name. |
java.lang.String |
getStringProperty(java.lang.String name,
java.lang.String defl)
Get the string property with the given name. |
java.net.URL |
getURLProperty(java.lang.String name)
Get the integer property with the given name. |
java.net.URL |
getURLProperty(java.lang.String name,
java.net.URL defl)
Get the URL property with the given name. |
java.util.Iterator |
properties(java.lang.String name)
Iterate over property values with the specified prefix. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Properties()
Method Detail |
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging
in interface org.apache.avalon.framework.logger.LogEnabled
public void addProperty(java.lang.String name, java.lang.String value)
name
- the property name.value
- the property value. May be null to delete named property.public void addProperty(java.lang.String name, int value)
name
- the property name.value
- the property value.public void addProperty(java.lang.String name, boolean value)
name
- the property name.value
- the property value.public void addProperty(java.lang.String name, java.net.URL value)
name
- the property name.value
- the property value.public void addProperty(java.lang.String name, java.lang.Class clz)
name
- The property name.clz
- The class. May be null to delete named property.public java.util.Iterator properties(java.lang.String name)
name
- parent of properties. Properies of the form name + "." + xxx
are returned, where xxx can be anything. May be null to iterate over all
properies.
There may also be the '*' wildcard at the end of the name. In this case the plain
name is used as prefix, no "." is appended.public void display()
public void display(org.apache.avalon.framework.logger.Logger logger)
public java.lang.String formatString(java.lang.String str)
java.lang.IllegalArgumentException
- if the string has unbalanced ${ }public Property getProperty(java.lang.String name)
name
- the property name.public java.lang.String getStringProperty(java.lang.String name, java.lang.String defl)
name
- the property name.defl
- default value to use if property not found.public java.lang.String getStringProperty(java.lang.String name) throws PropertyNotFoundException
name
- the property name.PropertyNotFoundException
- the property cannot be found.public int getIntProperty(java.lang.String name, int defl)
name
- the property name.defl
- default value to use if property not found.org.omg.CORBA.INITIALIZE
- The property value is not parsable to an int.public int getIntProperty(java.lang.String name) throws PropertyNotFoundException
name
- the property name.PropertyNotFoundException
- the property cannot be found.org.omg.CORBA.INITIALIZE
- The property value is not parsable to an int.public boolean getBooleanProperty(java.lang.String name, boolean defl)
name
- the property name.defl
- default value to use if property not found.public boolean getBooleanProperty(java.lang.String name) throws PropertyNotFoundException
name
- the property name.PropertyNotFoundException
- the property cannot be found.public java.net.URL getURLProperty(java.lang.String name, java.net.URL defl)
name
- the property name.defl
- default value to use if property not found.org.omg.CORBA.INITIALIZE
- The property value is not parsable to a URL.public java.net.URL getURLProperty(java.lang.String name) throws PropertyNotFoundException
name
- the property name.PropertyNotFoundException
- the property cannot be found.org.omg.CORBA.INITIALIZE
- The property value is not parsable to an int.public java.lang.Class getClassProperty(java.lang.String name, java.lang.Class defl)
name
- the property name.defl
- default value to use if property not found.org.omg.CORBA.INITIALIZE
- the property value cannot be loaded as a class.public java.lang.Class getClassProperty(java.lang.String name, java.lang.String defl)
name
- the property name.defl
- String name of default value to use if property not found.org.omg.CORBA.INITIALIZE
- the property value or default class cannot
be loaded as a class.public java.lang.Class getClassProperty(java.lang.String name) throws PropertyNotFoundException
name
- the property name.PropertyNotFoundException
- the property cannot be found.org.omg.CORBA.INITIALIZE
- the property value cannot be loaded as a class.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |