com.ptc.windchill.esi.lite.util
Class ERPConnectorProperties

java.lang.Object
  extended by com.ptc.windchill.esi.lite.util.ERPConnectorProperties

public class ERPConnectorProperties
extends Object

Assists ESI classes in obtaining ERP Connector configuration information.

Supported API: true

Extendable: false


Method Summary
static String getProperty(ESIPropertyRequest request)
          Returns the ERP Connector property whose key equals the request.getName().
static String getProperty(String name)
          Returns the ESI property whose key equals the name argument.
static boolean getProperty(String name, boolean dflt)
          Convenience method to get a boolean property string and convert it to a boolean value.
static String getProperty(String name, String defaultValue)
          Returns the ERP Connector property whose key equals the name argument.
static String substitute(String propertyValue)
          Substitutes expressions of the form $(name) in strings with property values from this properties object.
 
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 name)
Returns the ESI property whose key equals the name argument.

Supported API: true

Parameters:
name -
Returns:
String

getProperty

public static String getProperty(String name,
                                 String defaultValue)
Returns the ERP Connector property whose key equals the name argument. If no property is found, the defaultValue argument is returned.

Supported API: true

Parameters:
name -
defaultValue -
Returns:
String

getProperty

public static String getProperty(ESIPropertyRequest request)
Returns the ERP Connector property whose key equals the request.getName(). If no property is found, request.getDefaultValue() is returned.

Supported API: true

Parameters:
request -
Returns:
String

getProperty

public static boolean getProperty(String name,
                                  boolean dflt)
Convenience method to get a boolean property string and convert it to a boolean value.

Supported API: true

Parameters:
name - the property name.
default - value returned if named property does not exist
Returns:
the value as a boolean.

substitute

public static String substitute(String propertyValue)
Substitutes expressions of the form $(name) in strings with property values from this properties object. If the entire value is a substitution and the named property is not found, null is returned instead of an empty string. The expression $DATE(format) is a builtin SimpleDateFormat macro where format is a pattern expression such as MMddyy. It can be used to construct date/time based values such as log file names. The expression $LIB(key) is a builtin macro which lists the contents of the directory pointed at by key separated by File.pathSeparator.

This is used internally to the WTProperties.getProperty method. It is exposed as a public method to allow the same substitutions to be applied against arbitrary strings.

Supported API: true

Parameters:
propertyValue - the string to be parsed for substitutions
Returns:
the substituted string