|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.load.LoadServerHelper
public class LoadServerHelper
Provides helper methods for use in load classes such as LoadDoc and LoadPart.
Supported API: true
Extendable: false
| Field Summary | |
|---|---|
static int |
BLANK_OKAY
Used to set the required flag for getValue. |
static int |
NOT_REQUIRED
Used to set the required flag for getValue. |
static int |
REQUIRED
Used to set the required flag for getValue. |
static String |
TARGET_CONTAINER_KEY
Map key used to store the target container in the parameter list. |
| Method Summary | |
|---|---|
static void |
changePrincipal(String desiredPrincipal)
Set the principal for operation on Windchill if the desiredPrincipal is different than the current principal. |
static Object |
getCacheValue(String key)
Retrieve some object or value that was being stored for a latter command in the load process. |
static Object |
getFromCache(Object key)
Retrieve some object or value that was being stored for a latter command in the load process. |
static WTContainerRef |
getTargetContainer(Hashtable cmd_line)
Returns the container ref to use for the load. |
static WTContainerRef |
getTargetContainer(Hashtable nv,
Hashtable cmd_line)
Returns the container ref to use for the load.This signature assumes that the csvmapfile.txt uses following string for the container path: parentContainerPath If you are using a different key, use the signature that allows you to specify the lookup key. |
static WTContainerRef |
getTargetContainer(Hashtable nv,
Hashtable cmd_line,
String cont_pathKey)
Returns the container ref to use for the load. |
static WTContainerRef |
getTargetContainer(Hashtable nv,
Hashtable cmd_line,
String cont_pathKey,
boolean useCache)
Returns the container ref to use for the load. |
static WTContainerRef |
getTargetContainer(Hashtable cmd_line,
String cont_pathKey)
Returns the container ref to use for the load. |
static WTContainerRef |
getTargetContainer(Hashtable cmd_line,
String cont_pathKey,
boolean useCache)
Returns the container ref to use for the load. |
static String |
getValue(String name,
Hashtable nv,
Hashtable cmd_line,
int required)
Get the value for the variable from either the file or the command line. |
static void |
printMessage(String text)
Prints a message to both the MethodServer log and the session window that started the load. |
static void |
putCacheValue(Object key,
Object value)
Save some object or value that can be used by a latter command in the load process. |
static void |
removeCacheValue(String key)
Remove an object or value that was stored for the load process. |
static Object |
removeFromCache(Object key)
Remove an object or value that was stored for the load process. |
static void |
setCacheValue(String key,
Object value)
Save some object or value that can be used by a latter command in the load process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int REQUIRED
public static final int NOT_REQUIRED
public static final int BLANK_OKAY
public static final String TARGET_CONTAINER_KEY
| Method Detail |
|---|
public static void changePrincipal(String desiredPrincipal)
throws WTException
desiredPrincipal - The principal that is desired for this operation.
WTException
public static Object getCacheValue(String key)
throws WTException
key - Key to hashtable storing the value.
WTException
public static void setCacheValue(String key,
Object value)
throws WTException
key - Key to hashtable storing the value.value - Value to be stored in the hashtable for latter use in the load process.
WTException
public static void removeCacheValue(String key)
throws WTException
key - Key to hashtable storing the value.
WTExceptionpublic static void printMessage(String text)
text - The message to be written to the log and the current session screen.
public static String getValue(String name,
Hashtable nv,
Hashtable cmd_line,
int required)
name - Name of attribute to retrieve.nv - Hashtable with values from data file.cmd_line - Hashtable with misc values from the command line.required - Flag if this is a required variable or not.
public static final WTContainerRef getTargetContainer(Hashtable cmd_line)
throws WTException
cmd_line - The framework that calls you loader has populated this for you. It is a representation of the csv/xml file contents.
WTException
public static final WTContainerRef getTargetContainer(Hashtable nv,
Hashtable cmd_line)
throws WTException
nv - Although it hard-wiring container values in an input file is strongly discouraged, if you wish to do so you can.cmd_line - The framework that calls you loader has populated this for you. It is a representation of the csv/xml file contents.
WTException
public static final WTContainerRef getTargetContainer(Hashtable cmd_line,
String cont_pathKey)
throws WTException
cmd_line - The framework that calls you loader has populated this for you. It is a representation of the csv/xml file contents.cont_pathKey - The key for the containerPath used in the csvmapfile.txt definition for your object.
WTException
public static final WTContainerRef getTargetContainer(Hashtable nv,
Hashtable cmd_line,
String cont_pathKey)
throws WTException
nv - cmd_line - The framework that calls you loader has populated this for you. It is a representation of the csv/xml file contents.cont_pathKey - The key for the containerPath used in the csvmapfile.txt definition for your object.
WTException
public static final WTContainerRef getTargetContainer(Hashtable cmd_line,
String cont_pathKey,
boolean useCache)
throws WTException
cmd_line - The framework that calls you loader has populated this for you. It is a representation of the csv/xml file contents.cont_pathKey - The key for the containerPath used in the csvmapfile.txt definition for your object.useCache - Use cache value if not defined in cmd_line.
WTException
public static final WTContainerRef getTargetContainer(Hashtable nv,
Hashtable cmd_line,
String cont_pathKey,
boolean useCache)
throws WTException
nv - cmd_line - The framework that calls you loader has populated this for you. It is a representation of the csv/xml file contents.cont_pathKey - The key for the containerPath used in the csvmapfile.txt definition for your object.useCache - Use cache value if not defined in cmd_line.
WTException
public static Object getFromCache(Object key)
throws WTException
key - Key to cache
WTException
public static void putCacheValue(Object key,
Object value)
throws WTException
key - Key to the cachevalue - Value to be cached
wt.util.WTException82
WTException
public static Object removeFromCache(Object key)
throws WTException
key - Key to the cache
WTException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||