The Java class TaskManagerAPI in the com.enterworks.client.servlets.api package contains six public static methods that allow access to the work item’s properties or the work item’s name. These methods are outlined below:
To access the work item name of an opened work item version:
static public String getWorkItemName(
String sessionId, String workitemVersionId )
The first string, sessionId, is a TaskManager user’s session ID. The second string, workItemVersionId, is the opened work item version’s ID.
To access the properties (including system properties) of an opened work item version:
static public Properties getWorkItemProps(
String sessionId, String workItemVersionId )
The first string, sessionId, is a TaskManager user’s session ID. The second string, workItemVersionId, is the opened work item version’s ID.
If a property value originally contains the characters < or >, then this method converts < to < and > to >. For example, a property’s name is test and its original value is <flow>, then the returned property’s name is test and its converted value is <flow>.
To access the properties (with or without system properties) of an opened work item version:
static public Properties getWorkItemProps(
String sessionId, String workItemVersionId,
boolean convertFlag,
Boolean withSystemProperties )
The first string, sessionId, is a TaskManager user’s session ID. The second string, workItemVersionId, is the opened work item version’s ID. The first boolean parameter, convertFlag, indicates whether the conversion of < to < and of > to > is needed for each property value containing < or >. If this parameter is set to true, then the conversion is needed; otherwise no conversion will take place.
The second boolean parameter, withSystemProperties, indicates whether the returned properties should include the system properties of an opened work item version. If this parameter is set to true, then system properties will be included, otherwise no system properties.
To access the system properties of an opened work item version, automatically converting the characters < and > if they are present:
static public Properties getWorkItemSystemProps(
String sessionId, String workItemVersionId )
The first string, sessionId, is a TaskManager user’s session ID. The second string, workItemVersionId, is the opened work item version’s ID.
If a system property value originally contains < or >, then this method converts < to < and > to >. For example, if a property’s name is sys_test and its original value is <flow>, then the returned property’s name is sys_test and its converted value is <flow>.
To access the system properties of an opened work item version, with the option of converting the characters < and > if they are present:
static public Properties getWorkItemSystemProps(
String sessionId, String workItemVersionId,
boolean convertFlag )
The first string, sessionId, is a TaskManager user’s session ID. The second string, workItemVersionId, is the opened work item version’s ID. The boolean parameter, convertFlag, indicates whether the conversion of < to < and of > to > is needed for each property value containing < or >. If this parameter is set to true, then the conversion is needed; otherwise no conversion will take place.
To return the sorted keys of a given property:
static public ArrayList
getSortedPropertyKeyList(Properties props)
The property props is an object of Java properties type.