com.plumtree.xpshared.config
Class ConfigPathResolver

java.lang.Object
  extended by com.plumtree.xpshared.config.ConfigPathResolver

public class ConfigPathResolver
extends java.lang.Object

A utility class to enable resolution of a given applications's config path, by reading from the %PT_HOME%/pthome.xml registry file.

Since:
1.0
Version:
1.0
Author:
Stephan Morais

Field Summary
static java.lang.String CONFIGPATH_TAG_NAME
           
static java.lang.String INSTALL_TAG_NAME
           
static java.lang.String OPENCONFIG_PATH
           
static java.lang.String PATH_SEPARATOR
           
static java.lang.String PATH_TAG_NAME
           
static java.lang.String PRODUCT_NAME_TAG_NAME
           
static java.lang.String PRODUCT_TAG_NAME
           
static java.lang.String PTHOME_CONFIG_FILE
           
static java.lang.String PTHOME_ENV_VAR
           
static java.lang.String VERSION_ATTRIBUTE_NAME
           
 
Constructor Summary
ConfigPathResolver()
           
 
Method Summary
static java.lang.String GetOpenConfigPath()
          Gets the path for the openconfig settings tree
static java.lang.String GetProductConfigPath(java.lang.String productName, java.lang.String productVersion)
          Gets the path for a specific product and version
static java.lang.String GetProductPath(java.lang.String productName)
          Gets the path for a specific product (if there are multiple versions, it returns the first one)
static java.lang.String GetProductPath(java.lang.String productName, java.lang.String productVersion)
          Gets the path for a specific product and version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PTHOME_ENV_VAR

public static final java.lang.String PTHOME_ENV_VAR
See Also:
Constant Field Values

PTHOME_CONFIG_FILE

public static final java.lang.String PTHOME_CONFIG_FILE
See Also:
Constant Field Values

OPENCONFIG_PATH

public static final java.lang.String OPENCONFIG_PATH
See Also:
Constant Field Values

PRODUCT_TAG_NAME

public static final java.lang.String PRODUCT_TAG_NAME
See Also:
Constant Field Values

PRODUCT_NAME_TAG_NAME

public static final java.lang.String PRODUCT_NAME_TAG_NAME
See Also:
Constant Field Values

INSTALL_TAG_NAME

public static final java.lang.String INSTALL_TAG_NAME
See Also:
Constant Field Values

VERSION_ATTRIBUTE_NAME

public static final java.lang.String VERSION_ATTRIBUTE_NAME
See Also:
Constant Field Values

PATH_TAG_NAME

public static final java.lang.String PATH_TAG_NAME
See Also:
Constant Field Values

CONFIGPATH_TAG_NAME

public static final java.lang.String CONFIGPATH_TAG_NAME
See Also:
Constant Field Values

PATH_SEPARATOR

public static final java.lang.String PATH_SEPARATOR
Constructor Detail

ConfigPathResolver

public ConfigPathResolver()
Method Detail

GetProductPath

public static java.lang.String GetProductPath(java.lang.String productName,
                                              java.lang.String productVersion)
Gets the path for a specific product and version

Returns:
The path as a String

GetProductPath

public static java.lang.String GetProductPath(java.lang.String productName)
Gets the path for a specific product (if there are multiple versions, it returns the first one)

Returns:
The path as a String

GetProductConfigPath

public static java.lang.String GetProductConfigPath(java.lang.String productName,
                                                    java.lang.String productVersion)
Gets the path for a specific product and version

Returns:
The path as a String

GetOpenConfigPath

public static java.lang.String GetOpenConfigPath()
Gets the path for the openconfig settings tree

Returns:
The path as a String



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.