intradoc.data
Class PropParameters
java.lang.Object
|
+--intradoc.data.PropParameters
- All Implemented Interfaces:
- Parameters
- public class PropParameters
- extends java.lang.Object
- implements Parameters
Gives an implementation of the Parameters interface based on a Properties object.
- See Also:
Properties
|
Field Summary |
boolean |
m_allowDefaults
If set to false, then if property does not exist a DataException will be thrown. |
java.util.Properties |
m_properties
Properties object containing values to return. |
|
Constructor Summary |
PropParameters(java.util.Properties properties)
Initializes this object with a Properties object. |
|
Method Summary |
java.lang.String |
get(java.lang.String key)
Implementation of the 'get(...)' method of the Parameters interface. |
java.lang.String |
getSystem(java.lang.String key)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_allowDefaults
public boolean m_allowDefaults
- If set to false, then if property does not exist a DataException will be thrown.
If set to true, then properties that do not exist, will return an empty string ("").
m_properties
public java.util.Properties m_properties
- Properties object containing values to return.
PropParameters
public PropParameters(java.util.Properties properties)
- Initializes this object with a Properties object.
- Parameters:
properties - The properties that will return values through the Parameters
interface.
get
public java.lang.String get(java.lang.String key)
throws DataException
- Implementation of the 'get(...)' method of the Parameters interface.
- Specified by:
get in interface Parameters
- Parameters:
key - Lookup key.
- Returns:
- Value in Properties object associated with key.
- Throws:
DataException - If m_allowDefaults is true, then this exception will
only be thrown if the Properties object has not been assigned. Otherwise an
exception will be thrown if the lookup key cannot be found in the Properties object.
getSystem
public java.lang.String getSystem(java.lang.String key)
throws DataException
- Specified by:
getSystem in interface Parameters
DataException
(c) 1996-2005 All rights reserved. Stellent, Inc. |