org.yasl.xmlobjects.impl
Class PropertyResolverImpl

java.lang.Object
  extended byorg.yasl.xmlobjects.impl.PropertyResolverImpl
All Implemented Interfaces:
PropertyResolver

public class PropertyResolverImpl
extends Object
implements PropertyResolver

Version:
1.0
Author:
Jeff Chapman

Constructor Summary
PropertyResolverImpl()
           
 
Method Summary
 String getProperty(String key)
          Returns the property associated with the key or null if the key is invalid.
 void setProperty(String key, String value)
          Maps the value to the key in the properties map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyResolverImpl

public PropertyResolverImpl()
Method Detail

getProperty

public String getProperty(String key)
Returns the property associated with the key or null if the key is invalid.

If the key is not mapped in the property resolver's property map, the method will check the System properties.

The method will strip the leading $ character if the key is prefixed with it.

Specified by:
getProperty in interface PropertyResolver
Parameters:
key - String
Returns:
String

setProperty

public void setProperty(String key,
                        String value)
Maps the value to the key in the properties map.

Specified by:
setProperty in interface PropertyResolver
Parameters:
key - String
value - String