|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.structconf.xconf.Paths
Utility class for easily looking up standard paths. This class maintains a global default and thread local settings. Therefore, long running servers can use this class and still allow for thread-specific changes to paths.
Before using static getter methods, make sure that you have
called Paths.initThreadLocal(product_root_directory);
if you
only care about thread local settings or Paths.init(product_root_directory, true)
if you want to set a process global default value.
initThreadLocal(java.io.File)
,
init(java.io.File,boolean)
Field Summary | |
private static File |
defaultProductRootDirectory__
|
private static File |
defaultTargetRootdirectory__
|
private static InheritableThreadLocal |
productRootDirectory__
|
private static InheritableThreadLocal |
targetRootdirectory__
|
Constructor Summary | |
Paths()
|
Method Summary | |
static File |
getProductRootDirectory()
Return the product root directory. |
static File |
getTargetRootDirectory()
Return the root directory into which derived file may be written. |
static void |
init(File product_root_directory,
boolean change_global_default)
Initialize the product root directory. |
static void |
initThreadLocal(File product_root_directory)
This is the equivalent of init(product_root_directory, false) . |
static String |
relativizePathToProductRoot(File path)
|
static String |
relativizePathToTargetRoot(File path)
|
private static void |
throwNotInitialized()
Determine if the product root directory has been initialized yet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static File defaultProductRootDirectory__
private static File defaultTargetRootdirectory__
private static final InheritableThreadLocal productRootDirectory__
private static final InheritableThreadLocal targetRootdirectory__
Constructor Detail |
public Paths()
Method Detail |
public static void initThreadLocal(File product_root_directory)
init(product_root_directory, false)
.
init(java.io.File,boolean)
public static void init(File product_root_directory, boolean change_global_default)
change_global_default
- if true changes the thread local setting as well as the global defaultprivate static void throwNotInitialized()
public static File getProductRootDirectory()
RuntimeException
- if init has not been called.initThreadLocal(java.io.File)
,
init(java.io.File,boolean)
public static File getTargetRootDirectory()
RuntimeException
- if init has not been called.initThreadLocal(java.io.File)
,
init(java.io.File,boolean)
public static String relativizePathToTargetRoot(File path)
public static String relativizePathToProductRoot(File path)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |