|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.esi.utl.TaskHelper
Common utility methods of general usefulness to ESI classes and ESI Info*Engine
tasks.
Supported API: true
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private static String |
CODEBASE
|
protected static String |
NULL_STRING
|
private static String |
RESOURCE
|
private static String |
SEARCH_TYPES
|
private static int |
WAIT_INTERVAL_DEFAULT
|
private static String |
WAIT_INTERVAL_PROPERTY
|
private static int |
WAIT_TRIES_DEFAULT
|
private static String |
WAIT_TRIES_PROPERTY
|
static String |
XML_META_NAME
|
Constructor Summary | |
TaskHelper()
|
Method Summary | |
void |
addMultivaluePersistableParamGroup(String paramName,
String groupName,
Tasklet task)
Get the task parameter values and add each one to an element in a group. |
void |
addMultivalueUfidParamGroup(String paramName,
String groupName,
Tasklet task)
Get the task parameter values and add each one to an element in a group. |
void |
addSuccessMsgGroup(String groupName,
Tasklet task)
Adds a group to the task to ensure that receivers are notified of a successful invocation of a service that returns a java void. |
void |
checkParameter(Object obj,
String name)
Test a method parameter to make sure that it is not null. |
void |
checkParameter(String param,
String name)
Test a string to make sure that it is not null and not empty, and not all spaces. |
private boolean |
convertStringToDefaultBoolean(String booleanString,
boolean defaultValue,
String paramName)
|
private boolean |
convertToBoolean(String booleanString)
|
boolean |
getBooleanStringParameter(String paramName,
boolean defaultValue,
Tasklet task)
Obtains a task parameter and returns it as a boolean value. |
boolean |
getBooleanStringParameter(String paramName,
Tasklet task)
Obtains a task parameter and returns it as a boolean value. |
WTChangeOrder2 |
getChangeOrderFromUfid(String ufid)
|
WTDocument |
getDocumentFromUfid(String ufid)
|
Collection |
getMultivalueParam(String name,
Tasklet task)
Return a collection of the values of the task parameter identified by the name argument. |
Persistable |
getObjectFromUfid(String ufid)
|
String |
getObjectID(Persistable object)
Returns the UFID for a Persistable. |
static String |
getObjectTypesForSearch()
Return a string which has the object types for searching the ESI Transaction Search page. |
String |
getParameterString(String paramName,
Tasklet tasklet)
Returns the value of a task parameter. |
WTPart |
getPartFromUfid(String ufid)
|
Iterator |
getRpcGroupNames(String groupName,
Tasklet task)
Obtains the results of an apply-service webject for an ESI RPC, adds all of the groups in the RPC response to the task passed in the argument, and returns an iterator of a collection of group names in the resultant VDB. |
private boolean |
isUfid(Object arg)
|
void |
logException(Exception e)
|
void |
removeDuplicateCreators(String groupName,
Tasklet task)
Remove elements that have duplicate values of attribute creator of ESITransaction class. |
private static String |
retrieveTypesForSearch()
|
static void |
testParameterString(String s,
String param)
Test a string to make sure that it is not null and not empty. |
void |
waitForMethodServer()
Waits until the method server is ready. |
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
public static final String XML_META_NAME
protected static final String NULL_STRING
private static final String CODEBASE
private static final String WAIT_INTERVAL_PROPERTY
private static final String WAIT_TRIES_PROPERTY
private static final int WAIT_INTERVAL_DEFAULT
private static final int WAIT_TRIES_DEFAULT
private static final String SEARCH_TYPES
Constructor Detail |
public TaskHelper()
Method Detail |
public final String getObjectID(Persistable object)
object
- The persistable object whose UFID is desired.
public final void addMultivalueUfidParamGroup(String paramName, String groupName, Tasklet task) throws IEException
paramName
- The name of the task parameter whose values are to be obtained.groupName
- the name of the Group to add to the task's VDB.task
- The task whose parameters are to be obtained and whose VDB is to be updated.
IEException
public final void addMultivaluePersistableParamGroup(String paramName, String groupName, Tasklet task) throws IEException
paramName
- The name of the task parameter whose values are to be obtained.groupName
- the name of the Group to add to the task's VDB.task
- The task whose parameters are to be obtained and whose VDB is to be updated.
IEException
public final boolean getBooleanStringParameter(String paramName, Tasklet task) throws IEException
paramName
- The parameter to access.task
- The task whose parameter is to be examined.
IEException
public final boolean getBooleanStringParameter(String paramName, boolean defaultValue, Tasklet task) throws IEException
paramName
- The parameter to access.defaultValue
- The value to return if the task has no parameter matching the value of the paramName argument.task
- The task whose parameter is to be examined.
IEException
public final String getParameterString(String paramName, Tasklet tasklet) throws IEException
paramName
- The name of the parameter to obtain.tasklet
- The Taskle whose parameter is to be queried.
IEException
public final void waitForMethodServer()
public final void addSuccessMsgGroup(String groupName, Tasklet task) throws IEException
groupName
- The name of the group to create.task
- The Tasklet whose VDB is to be updated.
IEException
public final Iterator getRpcGroupNames(String groupName, Tasklet task) throws IEException
groupName
- The name of the group to extract from the task argument. It is presumed to be the name of an Group containing one element with a single Att whose name is "result".task
-
IEException
public Collection getMultivalueParam(String name, Tasklet task) throws IEException
name
- The name of the parameter whose values are to be obtained.task
- The tasklet whose parameter is to be obtained.
IEException
public final void checkParameter(String param, String name) throws MissingParameterException
param
- name
-
MissingParameterException
public final void checkParameter(Object obj, String name) throws MissingParameterException
obj
- name
-
MissingParameterException
public Persistable getObjectFromUfid(String ufid) throws WTException
WTException
public WTPart getPartFromUfid(String ufid) throws WTException
WTException
public WTDocument getDocumentFromUfid(String ufid) throws WTException
WTException
public WTChangeOrder2 getChangeOrderFromUfid(String ufid) throws WTException
WTException
public void logException(Exception e)
public static void testParameterString(String s, String param) throws IEException
s
- The string to be tested.param
- The name of the parameter that is being tested. Used only for descriptive text in
the event of error.
IEException
- Thrown if the incoming string is null or empty or all spaces.private boolean convertToBoolean(String booleanString) throws IEException
IEException
private boolean convertStringToDefaultBoolean(String booleanString, boolean defaultValue, String paramName) throws IEException
IEException
private boolean isUfid(Object arg)
public final void removeDuplicateCreators(String groupName, Tasklet task) throws IEException
groupName
- The name of the group to extract from the task argument.task
- task
IEException.
IEException
private static String retrieveTypesForSearch()
public static final String getObjectTypesForSearch()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |