|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.projmgmt.ix.ProjMgmtIxUtils
Field Summary | |
(package private) static String |
CR
|
(package private) static String |
CRLF
|
(package private) static String |
CRLF_REPLACEMENT
|
private static int[] |
DEF_FROM_INDEXES
|
private static Object[] |
EMPTY_ARRAY
|
private static Class |
ENUM_TYPE_CLASS
|
(package private) static String |
LF
|
private static Class |
OBJ_REF_CLASS
|
private static String |
RESOURCE
|
private static boolean |
VERBOSE
|
private static Class |
WT_OBJECT_CLASS
|
Constructor Summary | |
ProjMgmtIxUtils()
|
Method Summary | |
static void |
checkTag(IxbElement elem,
String expected_tag)
|
static void |
checkTags(IxbElement elem,
String[] possibletags)
|
static TimeToElapse |
computeDuration(IxbElement elem,
Importer imp)
|
static boolean |
createFromTemplate(Importer imp)
Determines if object is being created from template. |
static void |
exportCost(IxbElement elem,
String tag,
Currency currency,
Exporter exporter)
|
static void |
exportDuration(WfExecutionObject exec_obj,
IxbElement elem,
Exporter exporter)
|
static void |
exportExecObjAttributes(ExecutionObject exec_obj,
IxbElement exec_elem,
Exporter exporter)
|
static void |
exportOwner(Ownable own_obj,
IxbElement elem,
Exporter exporter)
|
static File |
exportProjectDeliverables(WTContainerRef contRef,
File outFile,
Deliverable[] delivs,
IxbDocument ruleFile)
|
static void |
exportProjectNodeAttributes(ProjectNode node,
IxbElement elem,
Exporter exporter,
int node_id)
|
static void |
exportProjectVariables(WfExecutionObject exec_obj,
IxbElement elem,
Exporter exporter)
|
static void |
exportRate(IxbElement elem,
String tag,
CurrencyRate currency_rate,
Exporter exporter)
|
static void |
exportSubscriptions(ExecutionObject obj,
IxbElement elem,
Exporter exp)
|
static void |
exportTimeToElapse(IxbElement elem,
String tag,
TimeToElapse time,
Exporter exporter)
|
static void |
exportWork(IxbElement elem,
String tag,
Work work,
Exporter exporter)
|
static ProjectPlan |
findProjectPlan(IxbElement elem,
Importer imp)
Finds the project plan referenced by the element passed as argument. |
private static IxbElement |
findProjectPlanTag(IxbElement elem)
This method finds the project plan tag for an IxbElemnt. |
static Currency |
getCost(IxbElement elem,
String tag,
Importer imp)
Extracts the cost from the element that corresponds to the tag passed as argument. |
static Deliverable |
getDeliverable(ProjectPlan plan,
String deli_name)
|
static Enumeration |
getDeliverables(ProjectPlan plan)
|
private static String |
getIdStr(Object obj)
|
static String |
getMemberEmail(IxbElement elem,
String princName)
Looks up the member email (userEmail) from the RoleMemberMap given a username |
static int |
getNextNodeId(ProjectNode node,
Integer nodeId,
Importer imp)
|
static Object |
getObjectFromApplication(IxbElement locId,
Importer imp)
This utility method uses the contents of the |
static Object |
getObjectFromOID(String oidStr)
|
private static ProjectState |
getObjectState(ExecutionObject exec_obj)
Returns the corresponding auto execution state for a execution object, possibly exported from a manual mode. |
static Object |
getObjFromObjectIDElement(IxbElement objId,
Importer imp)
ObjectIds may come in two flavors. |
static Object |
getObjFromObjRefElem(IxbElement objRef,
Importer imp)
ObjectReferences can come in three flavors localId, ufid, and custom. |
private static ObjectIdentifier |
getOid(Object obj)
|
private static WfContainerTemplate |
getParentTemplate(WfTemplateObject template)
|
static QueryResult |
getPlans(Project2 project)
Returns project plans associated with project. |
static Project2 |
getProject(String project_name)
|
static ProjectCategory |
getProjectCategory(IxbElement elem)
This method returns the ProjectCategory object. |
private static Map |
getProjectEventTypes(IxbElement elem)
Returns a Map with PRojectEventType and their values This is map is used by the caller to set the subsriptions. |
static ProjectHealthStatus |
getProjectHealthStatus(IxbElement elem)
This method returns a ProjectHealthStatus object. |
static ProjectPhase |
getProjectPhase(IxbElement elem)
|
static ProjectPlan |
getProjectPlan(Importer imp)
Returns the project plan associated with the container. |
static ProjectPlan |
getProjectPlan(IxbElement elem,
Importer imp)
|
static ProjectPlan |
getProjectPlan(Project2 project)
Returns project plan associated with project or 'null' if none exists. |
static ProjectRiskValue |
getProjectRiskValue(IxbElement elem)
|
private static ProjectState |
getProjectState(IxbElement elem)
|
static CurrencyRate |
getRate(IxbElement elem,
String tag,
Importer imp)
|
static ObjectReference |
getReference(String ref_str,
Importer imp)
|
static TimeToElapse |
getTimeToElapse(IxbElement elem,
String tag,
Importer imp)
Extracts the elapsed time from the element that corresponds to the tag passed as argument. |
static Work |
getWork(IxbElement elem,
String tag,
Importer imp)
Extracts the work from the element that corresponds to the tag passed as argument. |
static boolean |
hasTag(IxbElement elem,
String expected_tag)
|
static Project2 |
importBaseProjectInfo(Project2 proj,
IxbElement elem,
Importer imp)
|
static ExecutionObject |
importDuration(ExecutionObject exec_obj,
IxbElement elem,
Importer imp)
|
private static ExecutionObject |
importDynamicAttributes(ExecutionObject exec_obj,
IxbElement elem,
Importer imp)
Dynamic attributes are those that may change as a result of the execution of the plan. |
static boolean |
importDynAttrs(Importer imp)
Determines if dynamic attributes should be imported. |
static ExecutionObject |
importExecObjectAttributes(ExecutionObject exec_obj,
IxbElement elem,
Importer imp)
TODO: This is a very old version of the DTD. |
private static ExecutionObject |
importManagerSubscriptions(ExecutionObject target,
IxbElement elem)
This method deals with the //import of ManagerSubscriptions for a Milestone or a Deliverable tag. |
private static void |
importNodeId(ProjectNode node,
IxbElement elem,
Importer imp)
|
private static ExecutionObject |
importOwnerSubscriptions(ExecutionObject target,
IxbElement elem)
|
private static ExecutionObject |
importPlanLevelManagerSubscriptions(ExecutionObject target,
IxbElement elem)
|
private static ExecutionObject |
importPlanLevelOwnerSubscriptions(ExecutionObject target,
IxbElement elem)
|
static ProjectNode |
importProjectNodeAttributes(ProjectNode node,
IxbElement elem,
Importer imp)
|
static ExecutionObject |
importProjectPlanLevelSubscriptions(ExecutionObject target,
IxbElement elem,
Importer imp)
|
static WfExecutionObject |
importProjectVariables(WfExecutionObject exec_obj,
IxbElement elem,
Importer imp)
|
static ExecutionObject |
importSubscriptions(ExecutionObject target,
IxbElement elem,
Importer imp)
This method expects an IxbElement corresponding to a <subsriberPolicy> tag. |
static boolean |
planImport(Importer imp)
Determines whether an execution object is being imported in the context of a plan or independenlty. |
private static boolean |
processBooleanStr(String str)
|
static String |
replaceString(String sOrigStr,
String replaceWhat,
String replaceWith)
|
private static void |
setArchiveMode(Exporter exp)
|
static ExecutionObject |
setDuration(ExecutionObject exec_obj,
TimeToElapse duration)
|
static ExecutionObject |
setOwner(ExecutionObject exec_obj,
IxbElement elem,
Importer imp)
|
private static ExecutionObject |
setProjectState(ExecutionObject exec_obj,
ProjectState plan_state,
ProjectState exec_state)
Sets the project state based on the plan state and the object's state. |
static void |
setVariableValue(ProcessData context,
String var_name,
Class var_cls,
String val_str,
Importer imp)
|
static String |
showObjs(Collection objs)
|
static Timestamp |
stringToTimeStamp(String str,
Importer imp)
Utility function that convers a string to a timestamp returns null on any type of failure. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final String CRLF_REPLACEMENT
static final String LF
static final String CR
static final String CRLF
private static final String RESOURCE
private static final Class ENUM_TYPE_CLASS
private static final Class OBJ_REF_CLASS
private static final Class WT_OBJECT_CLASS
private static final int[] DEF_FROM_INDEXES
private static final Object[] EMPTY_ARRAY
private static final boolean VERBOSE
Constructor Detail |
public ProjMgmtIxUtils()
Method Detail |
public static ProjectNode importProjectNodeAttributes(ProjectNode node, IxbElement elem, Importer imp) throws WTException
WTException
private static void importNodeId(ProjectNode node, IxbElement elem, Importer imp) throws WTException
WTException
public static int getNextNodeId(ProjectNode node, Integer nodeId, Importer imp) throws WTException
WTException
public static void exportProjectNodeAttributes(ProjectNode node, IxbElement elem, Exporter exporter, int node_id) throws WTException
WTException
public static void exportOwner(Ownable own_obj, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void exportExecObjAttributes(ExecutionObject exec_obj, IxbElement exec_elem, Exporter exporter) throws WTException
WTException
public static void exportDuration(WfExecutionObject exec_obj, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void exportTimeToElapse(IxbElement elem, String tag, TimeToElapse time, Exporter exporter) throws WTException
WTException
public static void exportWork(IxbElement elem, String tag, Work work, Exporter exporter) throws WTException
WTException
public static void exportCost(IxbElement elem, String tag, Currency currency, Exporter exporter) throws WTException
WTException
public static void exportRate(IxbElement elem, String tag, CurrencyRate currency_rate, Exporter exporter) throws WTException
WTException
public static void exportSubscriptions(ExecutionObject obj, IxbElement elem, Exporter exp) throws WTException
WTException
public static File exportProjectDeliverables(WTContainerRef contRef, File outFile, Deliverable[] delivs, IxbDocument ruleFile) throws WTException
WTException
private static void setArchiveMode(Exporter exp) throws WTException
WTException
public static void exportProjectVariables(WfExecutionObject exec_obj, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void checkTag(IxbElement elem, String expected_tag) throws WTException
WTException
public static void checkTags(IxbElement elem, String[] possibletags) throws WTException
WTException
public static boolean hasTag(IxbElement elem, String expected_tag) throws WTException
WTException
public static ProjectPlan getProjectPlan(IxbElement elem, Importer imp) throws WTException
WTException
public static ExecutionObject importSubscriptions(ExecutionObject target, IxbElement elem, Importer imp) throws WTException
WTException
private static ExecutionObject importOwnerSubscriptions(ExecutionObject target, IxbElement elem) throws WTException
WTException
public static ExecutionObject importProjectPlanLevelSubscriptions(ExecutionObject target, IxbElement elem, Importer imp) throws WTException
WTException
private static ExecutionObject importPlanLevelManagerSubscriptions(ExecutionObject target, IxbElement elem) throws WTException
WTException
private static ExecutionObject importPlanLevelOwnerSubscriptions(ExecutionObject target, IxbElement elem) throws WTException
WTException
private static ExecutionObject importManagerSubscriptions(ExecutionObject target, IxbElement elem) throws WTException
WTException
private static IxbElement findProjectPlanTag(IxbElement elem) throws WTException
WTException
private static Map getProjectEventTypes(IxbElement elem) throws WTException
WTException
private static ExecutionObject importDynamicAttributes(ExecutionObject exec_obj, IxbElement elem, Importer imp) throws WTException
healthStatus?, riskValue?, projectState?, projectPhase?, executionDescription?, riskDescription?, startDate?, finishDate?, performedWork?, currentWorkCost?,When execution objects are being import individually, as opposed to importing the whole plan, it is possible that they should not be imprted. For this reason they are collected in a separate method.
WTException
public static ExecutionObject importExecObjectAttributes(ExecutionObject exec_obj, IxbElement elem, Importer imp) throws WTException
TODO: This is a very old version of the DTD. We need to either update the DTD, or change this method so we are not checking a whole bunch of null ProjMgmtConstants.
WTException
public static boolean createFromTemplate(Importer imp) throws WTException
WTException
public static ProjectPlan getProjectPlan(Importer imp) throws WTException
WTException
public static boolean planImport(Importer imp) throws WTException
WTException
public static boolean importDynAttrs(Importer imp) throws WTException
WTException
public static Project2 importBaseProjectInfo(Project2 proj, IxbElement elem, Importer imp) throws WTException
WTException
public static TimeToElapse computeDuration(IxbElement elem, Importer imp) throws WTException
WTException
public static ExecutionObject importDuration(ExecutionObject exec_obj, IxbElement elem, Importer imp) throws WTException
WTException
public static TimeToElapse getTimeToElapse(IxbElement elem, String tag, Importer imp) throws WTException
WTException
public static Work getWork(IxbElement elem, String tag, Importer imp) throws WTException
WTException
public static Currency getCost(IxbElement elem, String tag, Importer imp) throws WTException
WTException
public static CurrencyRate getRate(IxbElement elem, String tag, Importer imp) throws WTException
WTException
public static WfExecutionObject importProjectVariables(WfExecutionObject exec_obj, IxbElement elem, Importer imp) throws WTException
WTException
public static void setVariableValue(ProcessData context, String var_name, Class var_cls, String val_str, Importer imp) throws WTException
WTException
public static ObjectReference getReference(String ref_str, Importer imp) throws WTException
WTException
public static Timestamp stringToTimeStamp(String str, Importer imp) throws WTException
WTException
private static ProjectState getProjectState(IxbElement elem) throws WTException
WTException
private static ProjectState getObjectState(ExecutionObject exec_obj) throws WTException
WTException
private static ExecutionObject setProjectState(ExecutionObject exec_obj, ProjectState plan_state, ProjectState exec_state) throws WTException
------------------------------------------------------------------
DEFINED RUNNING SUSPENDED COMPLETED
------------------------------------------------------------------
DEFINED DEFINED DEFINED* DEFINED* DEFINED*
RUNNING RUNNING* RUNNING SUSPENDED RUNNING*
SUSPENDED SUSPENDED* SUSPENDED SUSPENDED COMPLETED
------------------------------------------------------------------
An asterisk (*) denotes that the start, end time or both of the execution
object has to be updated.
WTException
public static Object getObjFromObjectIDElement(IxbElement objId, Importer imp) throws WTException
WTException
- if the tag is not an ObjectID tag.public static Object getObjFromObjRefElem(IxbElement objRef, Importer imp) throws WTException
WTException
public static Object getObjectFromApplication(IxbElement locId, Importer imp) throws WTException
WTException
public static Object getObjectFromOID(String oidStr) throws WTException
WTException
public static ProjectRiskValue getProjectRiskValue(IxbElement elem) throws WTException
WTException
- is thrown if the input IxbElement does not
correspond to a public static ProjectPhase getProjectPhase(IxbElement elem) throws WTException
WTException
- is thrown if the input IxbElement does not correspond
to a public static ProjectHealthStatus getProjectHealthStatus(IxbElement elem) throws WTException
WTException
public static ProjectCategory getProjectCategory(IxbElement elem) throws WTException
WTException
public static ProjectPlan findProjectPlan(IxbElement elem, Importer imp) throws WTException
WTException
public static ProjectPlan getProjectPlan(Project2 project) throws WTException
WTException
public static QueryResult getPlans(Project2 project) throws WTException
WTException
public static Project2 getProject(String project_name) throws WTException
WTException
public static Deliverable getDeliverable(ProjectPlan plan, String deli_name) throws WTException
WTException
public static Enumeration getDeliverables(ProjectPlan plan) throws WTException
WTException
public static ExecutionObject setOwner(ExecutionObject exec_obj, IxbElement elem, Importer imp) throws WTException
WTException
public static String getMemberEmail(IxbElement elem, String princName) throws WTException
WTException
private static WfContainerTemplate getParentTemplate(WfTemplateObject template) throws WTException
WTException
private static boolean processBooleanStr(String str)
public static ExecutionObject setDuration(ExecutionObject exec_obj, TimeToElapse duration) throws WTException
WTException
private static String getIdStr(Object obj) throws WTException
WTException
public static String showObjs(Collection objs) throws WTException
WTException
private static ObjectIdentifier getOid(Object obj) throws WTException
WTException
public static String replaceString(String sOrigStr, String replaceWhat, String replaceWith)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |