org.ops4j.util.property
Class DictionaryPropertyResolver

java.lang.Object
  extended by org.ops4j.util.property.FallbackPropertyResolver
      extended by org.ops4j.util.property.DictionaryPropertyResolver
All Implemented Interfaces:
PropertyResolver

public class DictionaryPropertyResolver
extends FallbackPropertyResolver

Resolves properties from a Dictionary.

Since:
0.5.0, January 16, 2008
Author:
Alin Dreghiciu

Constructor Summary
DictionaryPropertyResolver(java.util.Dictionary properties)
          Creates a property resolver without a fallback resolver.
DictionaryPropertyResolver(java.util.Dictionary properties, PropertyResolver fallbackResolver)
          Creates a property resolver with a fallback resolver.
 
Method Summary
 java.lang.String findProperty(java.lang.String propertyName)
          Resolves a property based on it's name .
 void setProperties(java.util.Dictionary properties)
          Sets the properties in use.
 
Methods inherited from class org.ops4j.util.property.FallbackPropertyResolver
get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryPropertyResolver

public DictionaryPropertyResolver(java.util.Dictionary properties)
Creates a property resolver without a fallback resolver.

Parameters:
properties - dictionary; optional

DictionaryPropertyResolver

public DictionaryPropertyResolver(java.util.Dictionary properties,
                                  PropertyResolver fallbackResolver)
Creates a property resolver with a fallback resolver.

Parameters:
properties - dictionary; optional
fallbackResolver - fallback resolver
Method Detail

setProperties

public void setProperties(java.util.Dictionary properties)
Sets the properties in use.

Parameters:
properties - dictionary of properties

findProperty

public java.lang.String findProperty(java.lang.String propertyName)
Resolves a property based on it's name .

Specified by:
findProperty in class FallbackPropertyResolver
Parameters:
propertyName - property name to be resolved
Returns:
value of property or null if property is not set or is empty.


Copyright © 2006-2008 OPS4J - Open Participation Software for Java. All Rights Reserved.