|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.load.LoadServerHelper
Provides helper methods for use in load classes such as LoadDoc and LoadPart.
Supported API: true
Extendable: false
Nested Class Summary | |
private static class |
LoadServerHelper.DomainKey
|
Field Summary | |
static int |
BLANK_OKAY
Used to set the required flag for getValue. |
private static String |
CLASSNAME
|
static String |
DEFAULT_CONT_PATH
|
static String |
DEFAULT_TARGET_DOMAIN_KEY
|
private static String |
DOMAIN_CACHE_KEY
|
private static Hashtable |
EMPTY_HASH
|
static long |
EXTERNALIZATION_VERSION_UID
|
static int |
NOT_REQUIRED
Used to set the required flag for getValue. |
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
PARENT_ORG_PATH
|
static int |
REQUIRED
Used to set the required flag for getValue. |
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static String |
SERVICE_NAME
|
static String |
TARGET_CONTAINER_KEY
Map key used to store the target container in the parameter list. |
private static boolean |
VERBOSE
|
Constructor Summary | |
LoadServerHelper()
|
Method Summary | |
static void |
changePrincipal(String desiredPrincipal)
Set the principal for operation on Windchill if the desiredPrincipal is different than the current principal. |
(package private) static AdminDomainRef |
createDomain(AdminDomainRef parentDomainRef,
String domainNameOrPath,
String description,
WTContainerRef containerRef)
|
private static AdminDomainRef |
createDomain(AdminDomainRef parentDomainRef,
String domainNameOrPath,
String description,
WTContainerRef containerRef,
boolean useCache)
|
private static Map |
createDomainCache()
|
private static AdministrativeDomain |
findDomain(String domainPath,
WTContainerRef containerRef,
boolean searchParent)
|
private static Hashtable |
getCache()
|
static Object |
getCacheValue(String key)
Retrieve some object or value that was being stored for a latter command in the load process. |
private static WTContainerRef |
getContainerFromLoadLine(Hashtable nv,
Hashtable cmd_line,
String cont_pathKey)
|
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 AdminDomainRef |
getTargetDomain(Hashtable nv,
Hashtable cmd_line,
String domain_key,
boolean isRequired)
Input file may specify Domain path as: a)Full path ('/System'). |
private static AdminDomainRef |
getTargetDomain(Hashtable nv,
Hashtable cmd_line,
String domain_key,
boolean isRequired,
boolean useDomainCache,
String cont_pathKey)
|
static AdminDomainRef |
getTargetDomain(Hashtable nv,
Hashtable cmd_line,
String domain_key,
boolean isRequired,
String cont_pathKey)
Deprecated. Now container path should be supplied as part of domain path. |
static AdminDomainRef |
getTargetDomain(String domainPath,
Hashtable nv,
Hashtable cmd_line)
|
private static AdminDomainRef |
getTargetDomain(String domainPath,
Hashtable nv,
Hashtable cmd_line,
boolean useDomainCache)
|
static AdminDomainRef |
getTargetDomain(String domainPath,
Hashtable nv,
Hashtable cmd_line,
String cont_pathKey)
Deprecated. |
private static AdminDomainRef |
getTargetDomain(String domainPath,
Hashtable nv,
Hashtable cmd_line,
String cont_pathKey,
boolean useDomainCache)
|
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. |
private static void |
PP(String s)
|
static void |
printMessage(String text)
Prints a message to both the MethodServer log and the session window that started the load. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(LoadServerHelper thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
static void |
removeCacheValue(String 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. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static boolean VERBOSE
private static final String SERVICE_NAME
private static final String DOMAIN_CACHE_KEY
public static final String DEFAULT_TARGET_DOMAIN_KEY
public static final String DEFAULT_CONT_PATH
private static final Hashtable EMPTY_HASH
private static final String PARENT_ORG_PATH
public static final int REQUIRED
public static final int NOT_REQUIRED
public static final int BLANK_OKAY
public static final String TARGET_CONTAINER_KEY
Constructor Detail |
public LoadServerHelper()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(LoadServerHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
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.
WTException
public 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
private static Hashtable getCache() throws WTException
WTException
public static AdminDomainRef getTargetDomain(Hashtable nv, Hashtable cmd_line, String domain_key, boolean isRequired, String cont_pathKey) throws WTException
nv
- cmd_line
- domain_key
- isRequired
- cont_pathKey
-
WTException
private static AdminDomainRef getTargetDomain(Hashtable nv, Hashtable cmd_line, String domain_key, boolean isRequired, boolean useDomainCache, String cont_pathKey) throws WTException
WTException
public static AdminDomainRef getTargetDomain(String domainPath, Hashtable nv, Hashtable cmd_line, String cont_pathKey) throws WTException
nv
- cmd_line
- cont_pathKey
-
WTException
private static AdminDomainRef getTargetDomain(String domainPath, Hashtable nv, Hashtable cmd_line, String cont_pathKey, boolean useDomainCache) throws WTException
WTException
private static WTContainerRef getContainerFromLoadLine(Hashtable nv, Hashtable cmd_line, String cont_pathKey) throws WTException
WTException
public static AdminDomainRef getTargetDomain(Hashtable nv, Hashtable cmd_line, String domain_key, boolean isRequired) throws WTException
cmd_line
- domain_key
- isRequired
-
WTException
public static AdminDomainRef getTargetDomain(String domainPath, Hashtable nv, Hashtable cmd_line) throws WTException
domainPath
- Domain path. It can be
a) Container qualified domain path , e.g. '[/]/System'.
b) Domain path, e.g. '/MyDomain/MyNestedDomain'. For domain path, will first look
in the target container, and then in Exchange
This API also supports Domain name, e.g. 'Default', to enable lookup of special
domains (Default, Root, User, System) in pre-7.0 format.nv
- cmd_line
-
WTException
private static AdminDomainRef getTargetDomain(String domainPath, Hashtable nv, Hashtable cmd_line, boolean useDomainCache) throws WTException
WTException
private static AdministrativeDomain findDomain(String domainPath, WTContainerRef containerRef, boolean searchParent) throws WTException
WTException
private static Map createDomainCache() throws WTException
WTException
static AdminDomainRef createDomain(AdminDomainRef parentDomainRef, String domainNameOrPath, String description, WTContainerRef containerRef) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static AdminDomainRef createDomain(AdminDomainRef parentDomainRef, String domainNameOrPath, String description, WTContainerRef containerRef, boolean useCache) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static void PP(String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |