com.ptc.windchill.cadx.common.util
Class CADDocUtilities

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.util.CADDocUtilities

public class CADDocUtilities
extends Object


Field Summary
private static boolean VERBOSE
           
 
Constructor Summary
CADDocUtilities()
           
 
Method Summary
static EPMDocument createNewEPMDocument(String documentNumber, String documentName, String modelName, String location, String modelType, EPMDocument templateEPMDocument, EPMWorkspace wsObj, boolean createInPersonalCabinet)
          Deprecated. Use createNewEPMDocument (String documentNumber, String documentName, String modelName, String location, String modelType, EPMDocument templateEPMDocument,EPMWorkspace wsObj,WTOrganization org, WTContainer container, boolean createInPersonalCabinet)
static EPMDocument createNewEPMDocument(String documentNumber, String documentName, String modelName, String location, String modelType, EPMDocument templateEPMDocument, EPMWorkspace wsObj, WTOrganization org, WTContainer container)
           
static EPMDocument createNewEPMDocument(String documentNumber, String documentName, String modelName, String location, String modelType, EPMDocument templateEPMDocument, EPMWorkspace wsObj, WTOrganization org, WTContainer container, boolean createInPersonalCabinet)
          Create the CAD Document in the specified shared folder location or in the personal cabinet of the workspace folder, based upon the specified choice.
static String getTemplateDocNumber(String modelType, String sectName)
          For the given model type, find out from the EPD param file the document number of the template file.
static EPMDocument getTemplateEPMDocument(String number)
          Deprecated. Instead use EPMDocumentUtilities.getTemplateEPMDocument (templateDocNumber, container)
static Boolean isOpenableProEDocument(String cadName)
           
static Boolean isValidProEDocumentType(EPMDocument obj)
           
static EPMDocument newCopyEPMDocument(EPMDocument document, String newnumber, String newname, Folder folder, String newCADName)
          For the specified (template) CAD Doc and for the specified values, create a new CAD Doc using Enterprise services newCopy operation.
static EPMDocument saveNewEPMDocument(EPMDocument document, EPMDocument templateEPMDocument, boolean createInPersonalCabinet, String location, WTContainer container)
          Persist the newly constructed EPMDocument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

private static boolean VERBOSE
Constructor Detail

CADDocUtilities

public CADDocUtilities()
Method Detail

getTemplateDocNumber

public static String getTemplateDocNumber(String modelType,
                                          String sectName)
For the given model type, find out from the EPD param file the document number of the template file.


getTemplateEPMDocument

public static EPMDocument getTemplateEPMDocument(String number)
                                          throws WTException
Deprecated. Instead use EPMDocumentUtilities.getTemplateEPMDocument (templateDocNumber, container)

For the given template Document number, get the EPMDocument

Throws:
WTException

createNewEPMDocument

public static EPMDocument createNewEPMDocument(String documentNumber,
                                               String documentName,
                                               String modelName,
                                               String location,
                                               String modelType,
                                               EPMDocument templateEPMDocument,
                                               EPMWorkspace wsObj,
                                               boolean createInPersonalCabinet)
                                        throws WTException
Deprecated. Use createNewEPMDocument (String documentNumber, String documentName, String modelName, String location, String modelType, EPMDocument templateEPMDocument,EPMWorkspace wsObj,WTOrganization org, WTContainer container, boolean createInPersonalCabinet)

Throws:
WTException

createNewEPMDocument

public static EPMDocument createNewEPMDocument(String documentNumber,
                                               String documentName,
                                               String modelName,
                                               String location,
                                               String modelType,
                                               EPMDocument templateEPMDocument,
                                               EPMWorkspace wsObj,
                                               WTOrganization org,
                                               WTContainer container)
                                        throws WTException
Throws:
WTException

createNewEPMDocument

public static EPMDocument createNewEPMDocument(String documentNumber,
                                               String documentName,
                                               String modelName,
                                               String location,
                                               String modelType,
                                               EPMDocument templateEPMDocument,
                                               EPMWorkspace wsObj,
                                               WTOrganization org,
                                               WTContainer container,
                                               boolean createInPersonalCabinet)
                                        throws WTException
Create the CAD Document in the specified shared folder location or in the personal cabinet of the workspace folder, based upon the specified choice. This is useful in the scenario where CAD Document needs to be created directly in the shared folder. For example, the template CAD Doc needs to be created directly in the template cabinet in case of PDMLink. In some cases, the workspace might not be passed as workspace is not yet created. For example, when administrator is creating a template CAD Document in PDMLink solution, there may not be any workspace at that point. Also the default values for the CAD Doc is directly decided by the solution in case of PDMLink, so workspaces default values are hardly of much use here. This document is not persisted yet. This is done so that if some other attributes - say soft attributes - need to be set, they could be done separately and then persist it. Call saveNewEPMDocument() to save it.

Throws:
WTException

saveNewEPMDocument

public static EPMDocument saveNewEPMDocument(EPMDocument document,
                                             EPMDocument templateEPMDocument,
                                             boolean createInPersonalCabinet,
                                             String location,
                                             WTContainer container)
                                      throws WTException
Persist the newly constructed EPMDocument. Perform those required operations which can be performed only after object has been persisted. For example, set target folder for this document in EPMInitialCheckinData here.

Parameters:
document -
templateEPMDocument -
createInPersonalCabinet -
location -
container -
Returns:
Throws:
WTException

isValidProEDocumentType

public static Boolean isValidProEDocumentType(EPMDocument obj)

isOpenableProEDocument

public static Boolean isOpenableProEDocument(String cadName)

newCopyEPMDocument

public static EPMDocument newCopyEPMDocument(EPMDocument document,
                                             String newnumber,
                                             String newname,
                                             Folder folder,
                                             String newCADName)
                                      throws WTException
For the specified (template) CAD Doc and for the specified values, create a new CAD Doc using Enterprise services newCopy operation.

Throws:
WTException