|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.pdmlink.ProductIXUtils
Field Summary | |
private static String |
_rb
|
private static int[] |
DEF_FROM_INDEXES
|
private static Object[] |
DEF_PARAMS
|
private static String |
DEFAULT_ENCODING
|
private static String |
DEFAULT_LIFECYCLE
|
private static Object[] |
EMPTY_ARRAY
|
private static Class |
ENUM_TYPE_CLASS
|
private static String |
HEADER_ENCODING
|
private static NMProjectConstants.ProjectMemberInfo |
memberTags
|
private static Class |
OBJ_REF_CLASS
|
private static NMProjectConstants.ObjectIDInfo |
oidInfoTags
|
private static String |
PJL_NULL
|
private static String |
PROJ_MGMT_KEY
|
(package private) static String |
USER_KEY
|
private static Class |
WT_OBJECT_CLASS
|
Constructor Summary | |
ProductIXUtils()
|
Method Summary | |
static void |
addRoleElem(IxbElement elem,
Role role)
Adds a role element to the passed element. |
static boolean |
checkBufferSanity(StringBuffer strBuff)
|
static PushbackInputStream |
checkStreamSanity(InputStream in)
This method performs a sanity check on an input stream. |
static void |
checkTag(IxbElement elem,
String expected_tag)
|
static TimeToElapse |
computeDuration(IxbElement elem,
Importer imp)
|
static void |
copyStream(InputStream in,
OutputStream out)
Copies an input stream to an output stream. |
static void |
exportCost(IxbElement elem,
String tag,
Currency currency,
Exporter exporter)
|
static File |
exportDocumentToJarFile(WTContainerRef contRef,
WTDocument document,
File tmpFile)
|
static void |
exportDuration(WfExecutionObject exec_obj,
IxbElement elem,
Exporter exporter)
|
static void |
exportExecObjAttributes(ExecutionObject exec_obj,
IxbElement exec_elem,
Exporter exporter)
|
static File |
exportFolderStructureToJarFile(WTContainerRef contRef,
Folder folder,
File tmpFile)
|
static void |
exportOwner(Ownable own_obj,
IxbElement elem,
Exporter exporter)
|
static File |
exportProductStructureToJarFile(WTContainerRef contRef,
List parts,
File tmpFile)
|
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 |
exportReference(Persistable pers_obj,
IxbElement elem,
Exporter exporter)
|
static void |
exportSubscriptions(ExecutionObject obj,
IxbElement elem,
Exporter exp)
|
static void |
exportTimeToElapse(IxbElement elem,
String tag,
TimeToElapse time,
Exporter exporter)
|
static File |
exportToJarFile(Persistable persistObj,
File tmpFile)
Deprecated. use epxortToJarFile(WTContainerRef contRef, Persistable persistObj, File tmpFile) instead |
static File |
exportToJarFile(WTContainerRef contRef,
Persistable persistObj,
File tmpFile)
|
static void |
exportWork(IxbElement elem,
String tag,
Work work,
Exporter exporter)
|
static void |
exportWTDocument(WTDocument doc,
IxbElement elem,
Exporter exporter)
Exports a document into the given IxbElement. |
static void |
exportWTPart(WTPart part,
IxbElement elem,
Exporter exporter)
Exports a part into the given IxbElement. |
static void |
exportWTPartReferenceLink(WTPartReferenceLink part_link,
IxbElement elem,
Exporter exporter)
Exports a part reference link into the given IxbElement. |
static void |
exportWTPartUsageLink(WTPartUsageLink part_link,
IxbElement elem,
Exporter exporter)
Exports a part reference link into the given IxbElement. |
static ProjectPlan |
findProjectPlan(IxbElement elem,
Importer imp)
Finds the project plan referenced by the element passed as argument. |
private static IxbElement |
findProjectPlanTag(IxbElement elem)
|
static IxbDocument |
generateExportMappingRules()
|
static IxbDocument |
generateFolderMappingRules(Folder theFolder)
This generates mapping rules for the savePath. |
static IxbDocument |
generateImportMappingRules()
|
private static IxbDocument |
generateImportMappingRules(NotebookFolder notebook_folder)
|
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)
|
static QueryResult |
getDocuments(Project2 project)
Returns documents contained in project. |
static String |
getEncoding(File xmlFile)
Get the character encoding that is specified in the XML file. |
static String |
getEncoding(String xmlText)
Get the character encoding that is specified in the XML text. |
private static String |
getEncodingFromHeader(String header)
Get the character encoding that is specified in the given XML header. |
private static String |
getFolderPath(NotebookFolder folder)
|
static WTGroup |
getGroupByName(WTContainerRef contRef,
String princName)
|
private static String |
getHeader(File file)
Get the |
private static String |
getHeader(InputStream is)
Get the |
private static String |
getHeader(String content)
Get the |
private ObjectIdentifier |
getId(Object obj)
|
static Iterated |
getIteratedObject(WTContainerRef contRef,
Class theClass,
String attrName,
String attrValue)
|
static QueryResult |
getObjects(WTContainer cont,
Class object_class)
Returns objects of a given class contained in project. |
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 WfContainerTemplate |
getParentTemplate(WfTemplateObject template)
|
static QueryResult |
getParts(Project2 project)
Returns parts contained in project. |
static QueryResult |
getPlans(PDMLinkProduct product)
Returns project plans associated with project. |
static QueryResult |
getPlans(WTLibrary library)
Returns project plans associated with project. |
static WTPrincipal |
getPrincipalByDN(String dnName)
|
static WTPrincipal |
getPrincipalByName(WTContainerRef contRef,
String princName)
There has been some volatility in these methods so the logic is being localized here. |
static Project2 |
getProject(String project_name)
|
static ProjectCategory |
getProjectCategory(IxbElement elem)
This method returns the ProjectCategory object. |
private static Map |
getProjectEventTypes(IxbElement elem)
|
static ProjectHealthStatus |
getProjectHealthStatus(IxbElement elem)
This method returns a ProjectHealthStatus object. |
static ProjectPhase |
getProjectPhase(IxbElement elem)
|
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)
|
static ProjectState |
getProjectState(IxbElement elem)
|
static CurrencyRate |
getRate(IxbElement elem,
String tag,
Importer imp)
|
static Reader |
getReader(File xmlFile)
Get a Reader on the contents of the specified
File . |
static ObjectReference |
getReference(String ref_str,
Importer imp)
|
static Role |
getRole(IxbElement role_elem)
Returns a role given an IxbElement corresponding to the Role tag. |
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 WTUser |
getUserByDN(String dnName)
|
static WTUser |
getUserByName(WTContainerRef contRef,
String userName)
|
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 WTLibrary |
importBaseLibraryInfo(WTLibrary lib,
IxbElement elem,
Importer imp)
|
static PDMLinkProduct |
importBaseProductInfo(PDMLinkProduct prod,
IxbElement elem,
Importer imp)
|
static ExecutionObject |
importDuration(ExecutionObject exec_obj,
IxbElement elem,
Importer imp)
|
static ExecutionObject |
importExecObjectAttributes(ExecutionObject exec_obj,
IxbElement elem,
Importer imp)
TODO: This is a very old version of the DTD. |
static boolean |
importFromJarFile(Object obj,
String file_name)
|
static boolean |
importFromJarFile(WTContainerRef contRef,
Object obj,
String file_name)
|
static boolean |
importFromJarFileToContainer(WTContainerRef target,
File tmpFile)
|
static boolean |
importFromJarFileToFolder(Folder folder,
File tmpFile)
Deprecated. |
static boolean |
importFromJarFileToNotebook(NotebookFolder notebook_folder,
File tmpFile)
|
static boolean |
importFromJarFileToProject(WTContainerRef target,
File tmpFile)
|
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 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 void |
postExportFeedback(String rb,
String key)
|
static void |
postExportFeedback(String rb,
String key,
Object[] params)
|
static void |
postFeedback(Importer imp,
String rb,
String key,
Object[] params,
int level)
Posts message to the logger. |
private static boolean |
processBooleanStr(String str)
|
static ExecutionObject |
setOwner(ExecutionObject exec_obj,
IxbElement elem,
Importer imp)
|
static void |
setTmpId(IxbElement elem,
Importer imp)
Takes an ObjectId object and if the object id is a localId, we store the tmpId. |
static void |
setVariableValue(ProcessData context,
String var_name,
Class var_cls,
String val_str,
Importer imp)
|
static Timestamp |
stringToTimeStamp(String str)
Utility function that convers a string to a timestamp returns null on any type of failure. |
private static void |
updateFolderPathRules(IxbElement rootElem,
String path,
String value,
String newValue)
|
private static void |
updateLifecyclePathRules(IxbElement rootElement)
|
static boolean |
validateXMLInputStream(InputStream in)
This method does some simple validation on the input stream to verify that its contents do in fact contain an XML file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final String USER_KEY
private static final String _rb
private static final String PJL_NULL
private static final String PROJ_MGMT_KEY
private static final String DEFAULT_LIFECYCLE
private static final Object[] DEF_PARAMS
private static final Class ENUM_TYPE_CLASS
private static final Class OBJ_REF_CLASS
private static final Class WT_OBJECT_CLASS
private static final String DEFAULT_ENCODING
private static final String HEADER_ENCODING
private static final NMProjectConstants.ObjectIDInfo oidInfoTags
private static final NMProjectConstants.ProjectMemberInfo memberTags
private static final int[] DEF_FROM_INDEXES
private static final Object[] EMPTY_ARRAY
Constructor Detail |
public ProductIXUtils()
Method Detail |
public static ProjectNode importProjectNodeAttributes(ProjectNode node, IxbElement elem, 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 exportReference(Persistable pers_obj, IxbElement elem, Exporter exporter) throws WTException
This implementation is limited to the localId option.
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 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 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
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 PDMLinkProduct importBaseProductInfo(PDMLinkProduct prod, IxbElement elem, Importer imp)
public static WTLibrary importBaseLibraryInfo(WTLibrary lib, IxbElement elem, Importer imp)
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) throws WTException
WTException
public static ProjectState getProjectState(IxbElement elem) throws WTException
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 void setTmpId(IxbElement elem, Importer imp) 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 boolean validateXMLInputStream(InputStream in) throws WTException
WTException
public static boolean checkBufferSanity(StringBuffer strBuff) throws WTException
WTException
public static PushbackInputStream checkStreamSanity(InputStream in) throws WTException
WTException
public static File exportToJarFile(Persistable persistObj, File tmpFile) throws WTException
WTException
public static File exportToJarFile(WTContainerRef contRef, Persistable persistObj, File tmpFile) throws WTException
WTException
public static File exportDocumentToJarFile(WTContainerRef contRef, WTDocument document, File tmpFile) throws WTException
WTException
public static File exportProductStructureToJarFile(WTContainerRef contRef, List parts, File tmpFile) throws WTException
WTException
public static File exportFolderStructureToJarFile(WTContainerRef contRef, Folder folder, File tmpFile) throws WTException
WTException
public static boolean importFromJarFile(Object obj, String file_name) throws WTException
WTException
public static boolean importFromJarFile(WTContainerRef contRef, Object obj, String file_name) throws WTException
WTException
public static boolean importFromJarFileToProject(WTContainerRef target, File tmpFile) throws WTException
WTException
public static boolean importFromJarFileToContainer(WTContainerRef target, File tmpFile) throws WTException
WTException
public static boolean importFromJarFileToFolder(Folder folder, File tmpFile) throws WTException
WTException
public static boolean importFromJarFileToNotebook(NotebookFolder notebook_folder, File tmpFile) throws WTException
WTException
private static IxbDocument generateImportMappingRules(NotebookFolder notebook_folder) throws WTException
WTException
public static IxbDocument generateFolderMappingRules(Folder theFolder) throws WTException
WTException
public static IxbDocument generateExportMappingRules() throws WTException
WTException
public static IxbDocument generateImportMappingRules() throws WTException
WTException
private static final void updateLifecyclePathRules(IxbElement rootElement) throws WTException
WTException
private static final void updateFolderPathRules(IxbElement rootElem, String path, String value, String newValue) throws WTException
WTException
public static void exportWTDocument(WTDocument doc, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void exportWTPart(WTPart part, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void exportWTPartReferenceLink(WTPartReferenceLink part_link, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void exportWTPartUsageLink(WTPartUsageLink part_link, IxbElement elem, Exporter exporter) throws WTException
WTException
public static void copyStream(InputStream in, OutputStream out) throws WTException
WTException
public static void postFeedback(Importer imp, String rb, String key, Object[] params, int level) throws WTException
WTException
public static void postExportFeedback(String rb, String key) throws WTException
WTException
public static void postExportFeedback(String rb, String key, Object[] params) throws WTException
WTException
public static ProjectPlan getProjectPlan(Project2 project) throws WTException
WTException
public static QueryResult getPlans(PDMLinkProduct product) throws WTException
WTException
public static QueryResult getPlans(WTLibrary library) throws WTException
WTException
public static QueryResult getDocuments(Project2 project) throws WTException
WTException
public static QueryResult getParts(Project2 project) throws WTException
WTException
public static QueryResult getObjects(WTContainer cont, Class object_class) 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 Role getRole(IxbElement role_elem) throws WTException
WTException
public static void addRoleElem(IxbElement elem, Role role) throws WTException
WTException
public static Reader getReader(File xmlFile) throws IOException
Reader
on the contents of the specified
File
. Make sure the correct character encoding is used
when reading the XML file content.
xmlFile
- the file containg the XML
IOException
public static String getEncoding(String xmlText) throws IOException
null
if no encoding is specified in the
file.
xmlText
- a string containing well-formed XML text
IOException
public static String getEncoding(File xmlFile) throws IOException
null
if no encoding is specified in the
file.
xmlFile
- a file containing well-formed XML text
IOException
private static String getEncodingFromHeader(String header)
null
if no encoding
is specified in the declaration.
private static String getHeader(String content) throws IOException
content
- a string containing well-formed XML
IOException
private static String getHeader(File file) throws IOException
IOException
private static String getHeader(InputStream is) throws IOException
IOException
private static String getFolderPath(NotebookFolder folder) throws WTException
WTException
private static WfContainerTemplate getParentTemplate(WfTemplateObject template) throws WTException
WTException
private ObjectIdentifier getId(Object obj)
private static boolean processBooleanStr(String str)
public static Iterated getIteratedObject(WTContainerRef contRef, Class theClass, String attrName, String attrValue) throws WTException
WTException
public static WTPrincipal getPrincipalByName(WTContainerRef contRef, String princName) throws WTException
WTException
public static WTGroup getGroupByName(WTContainerRef contRef, String princName) throws WTException
WTException
public static WTUser getUserByName(WTContainerRef contRef, String userName) throws WTException
WTException
public static WTPrincipal getPrincipalByDN(String dnName) throws WTException
WTException
public static WTUser getUserByDN(String dnName) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |