Project Wonder 5.0.0.8795

er.extensions.foundation
Class ERXSystem

java.lang.Object
  extended by er.extensions.foundation.ERXSystem
All Implemented Interfaces:
NSKeyValueCoding, NSKeyValueCodingAdditions

public class ERXSystem
extends Object
implements NSKeyValueCoding, NSKeyValueCodingAdditions

ERXSystem provides support for variable replacement in Properties with

Author:
david teran

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Field Summary
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Method Summary
static void convertProperties(Properties originalProperties, Properties destinationProperties)
          Converts the property names defined in originalProperties with the ERXSystem.getProperty(..) method and puts the resulting values into the destinationProperties.
static Properties getProperties()
          Returns a copy of NSProperties._getProperties() that has been passed variable evaluation.
static String getProperty(String key)
          Looks up the given key in the ERXSystem properties, converts any property variables, and returns the converted value.
static String getProperty(String key, String defaultValue)
          Retrieves the value of the given key from the ERXSystem properties store, return defaultValue if the key does not exist.
 void takeValueForKey(Object value, String key)
           
 void takeValueForKeyPath(Object value, String key)
           
static void updateProperties()
          Converts and evaluates the properties from NSProperties._getProperties() and replaces the converted values in-place.
 Object valueForKey(String key)
           
 Object valueForKeyPath(String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProperty

public static String getProperty(String key)
Looks up the given key in the ERXSystem properties, converts any property variables, and returns the converted value.

Parameters:
key - the key to lookup
Returns:
the converted value

getProperty

public static String getProperty(String key,
                                 String defaultValue)
Retrieves the value of the given key from the ERXSystem properties store, return defaultValue if the key does not exist.

Parameters:
key - the key to lookup
defaultValue - the default value to return
Returns:
the corresponding value or defaultValue if the key doesn't exist

convertProperties

public static void convertProperties(Properties originalProperties,
                                     Properties destinationProperties)
Converts the property names defined in originalProperties with the ERXSystem.getProperty(..) method and puts the resulting values into the destinationProperties.

Parameters:
originalProperties - the properties to convert
destinationProperties - the properties to copy into

getProperties

public static Properties getProperties()
Returns a copy of NSProperties._getProperties() that has been passed variable evaluation.

Returns:
a converted copy of NSProperties._getProperties()

updateProperties

public static void updateProperties()
Converts and evaluates the properties from NSProperties._getProperties() and replaces the converted values in-place.


valueForKey

public Object valueForKey(String key)
Specified by:
valueForKey in interface NSKeyValueCoding

takeValueForKey

public void takeValueForKey(Object value,
                            String key)
Specified by:
takeValueForKey in interface NSKeyValueCoding

valueForKeyPath

public Object valueForKeyPath(String key)
Specified by:
valueForKeyPath in interface NSKeyValueCodingAdditions

takeValueForKeyPath

public void takeValueForKeyPath(Object value,
                                String key)
Specified by:
takeValueForKeyPath in interface NSKeyValueCodingAdditions

Last updated: Fri, Jan 9, 2009 • 04:35 AM EST

Copyright © 2002 – 2007 Project Wonder.