Project Wonder 5.0

er.extensions.foundation
Class ERXSystem

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

public class ERXSystem
extends java.lang.Object
implements com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.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
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Field Summary
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Method Summary
static void convertProperties(java.util.Properties originalProperties, java.util.Properties destinationProperties)
          Converts the property names defined in originalProperties with the ERXSystem.getProperty(..) method and puts the resulting values into the destinationProperties.
static java.util.Properties getProperties()
          Returns a copy of NSProperties._getProperties() that has been passed variable evaluation.
static java.lang.String getProperty(java.lang.String key)
          Looks up the given key in the ERXSystem properties, converts any property variables, and returns the converted value.
static java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Retrieves the value of the given key from the ERXSystem properties store, return defaultValue if the key does not exist.
 void takeValueForKey(java.lang.Object value, java.lang.String key)
           
 void takeValueForKeyPath(java.lang.Object value, java.lang.String key)
           
static void updateProperties()
          Converts and evaluates the properties from NSProperties._getProperties() and replaces the converted values in-place.
 java.lang.Object valueForKey(java.lang.String key)
           
 java.lang.Object valueForKeyPath(java.lang.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 java.lang.String getProperty(java.lang.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 java.lang.String getProperty(java.lang.String key,
                                           java.lang.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(java.util.Properties originalProperties,
                                     java.util.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 java.util.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 java.lang.Object valueForKey(java.lang.String key)
Specified by:
valueForKey in interface com.webobjects.foundation.NSKeyValueCoding

takeValueForKey

public void takeValueForKey(java.lang.Object value,
                            java.lang.String key)
Specified by:
takeValueForKey in interface com.webobjects.foundation.NSKeyValueCoding

valueForKeyPath

public java.lang.Object valueForKeyPath(java.lang.String key)
Specified by:
valueForKeyPath in interface com.webobjects.foundation.NSKeyValueCodingAdditions

takeValueForKeyPath

public void takeValueForKeyPath(java.lang.Object value,
                                java.lang.String key)
Specified by:
takeValueForKeyPath in interface com.webobjects.foundation.NSKeyValueCodingAdditions

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.