com.ptc.hli.ecad
Class ECADAssembly

java.lang.Object
  extended bycom.ptc.hli.ecad.ECADAssembly

public class ECADAssembly
extends Object

The ECADAssembly class holds the Windchill objects which taken together represent an assembly. It includes an ECADDocument for: the assembly, a table of all ECADDocuments used or referenced by the assembly, and referenceDesignators used by the assembly.

The iterations of the assembly are stored as a EPMAsStoredConfig containing all the EPMDocuments related to that iteration.

When an assembly is checked out, an EPMWorkspace is created to hold the current objects until checkin.



Supported API: true

Extendable: false


Field Summary
private  ECADDocument assemblyDoc
           
private  ECADDesign design
           
private  HashMap documents
           
private static String ECADHLIRESOURCE
           
private  HashMap referenceDesignators
           
 
Constructor Summary
protected ECADAssembly()
           
protected ECADAssembly(ECADDocument assemblyDoc)
           
 
Method Summary
 void addComponentDoc(ECADDocument componentDoc)
          Add the given ECADDocument provided it has the DocumentType "COMPONENT"

Supported API: false
 void addContentDoc(ECADDocument contentDoc)
          Add a CONTENT ECADDocument to the assembly

Supported API: false
 void addReferenceDesignator(EPMUsesOccurrence designator)
          Add the given ReferenceDesignator

Supported API: false
static String generateWorkspaceName(EPMDocument epmDoc)
          Static method to return the name to be used for the EPMWorkspace to be used while this document is checkedout.
 ECADDocument getAssemblyDoc()
          Return the ECADDocument representing the assembly

Supported API: true
 String getAuthoringApplication()
          Return the Authoring Application of the assembly

Supported API: true
 Baseline getBaseline()
          Return the Baseline in use.
 ECADDocument getBoardDoc()
          Return the ECADDocument representing the board

Supported API: true
 ECADDocument getComponentDoc(String number)
          Return the ECADDocument representing the Component document with the given number.
 Vector getComponentDocs()
          Return the a Vector of ECADDocuments representing all the Components

Supported API: true
 ECADDocument getContentDoc(String number)
          Get the ECADDocument with the given number which is also a CONTENT Document.
 Vector getContentDocs()
          Retrieve all CONTENT documents.
 String getDescription()
          Return the description of the ECADAssembly

Supported API: true
 ECADDesign getDesign()
          Get the ECADDesign for this assembly

Supported API: false
 EPMAsStoredConfig getEPMAsStoredConfig()
          Return the EPMAsStoredConfig representing the stored ECADAssembly

Supported API: false
static EPMAsStoredConfig getEPMAsStoredConfig(String number, String version, WTContainerRef containerRef)
           
 EPMDocument[] getEPMDocuments()
          Return an array of EPMDocuments contained in the Assembly

Supported API: false
 Folder getFolder()
          Return the Folder for the ECADAssembly

Supported API: true
 String getIteration()
          Return the iteration of the assembly

Supported API: true
 String getLifeCycleName()
          Get the LifeCycle name for the ECADAssembly

Supported API: true
 String getName()
          Return the name of the ECADAssembly

Supported API: true
 String getNumber()
          Return the number of the ECADAssembly

Supported API: true
static ECADAssembly getOldAssembly(String number, String version, WTContainerRef containerRef)
          Static method to return the ECADAssembly with the given number and version if it exists.
 EPMUsesOccurrence getReferenceDesignator(String name)
          Return the named ReferenceDesignator

Supported API: true
 Vector getReferenceDesignators()
          Return a Vector of all ReferenceDesignators

Supported API: true
 ECADDocument getSchematicDoc()
          Return the ECADDocument representing the schematic

Supported API: true
static EPMDocument getSource(EPMDocument assembly)
          Return the EPMDocument which represents the "Container" for the given EPMDocument

Supported API: false
 ECADDocument getSourceDoc()
          Return the ECADDocument representing the source

Supported API: true
 String getTargetRevision()
          Get the Initial Revision for this assembly

Supported API: false
private  String getTeamTemplateName()
          Get the name of the Team Template for the ECADAssembly

Supported API: false
 QueryResult getUsesOccurrences(UsesOccurrenceContext context)
          Return a QueryResult of UsesOccurrences for the given object

Supported API: false
 String getVersion()
          Return the version of the assembly

Supported API: true
 EPMWorkspace getWorkspace()
          Return the EPMWorkspace which holds the current checked out assembly.
static EPMWorkspace getWorkspace(String number, String version, WTContainerRef containerRef)
           
 boolean isCheckedOut()
          Check the checkout status of the Assembly

Supported API: true
static boolean isCheckedOut(EPMDocument document)
           
protected  void loadDocuments()
           
protected  void loadLinks()
           
protected  void loadReferenceDesignators()
           
protected  void loadRefLinks(ECADDocument ecadDoc)
           
protected  void loadUses()
           
protected static ManagedBaseline lookupBaseline(EPMDocument epmDoc)
           
protected  EPMCheckpoint lookupCheckpoint()
           
static ECADAssembly newECADAssembly(ECADDesign design, ECADDocument assemblyDoc)
          Factory method to construct a new ECADAssembly containing the given ECADDocuments.
static ECADAssembly newECADAssembly(ECADDocument assemblyDoc)
           
 void removeComponentDoc(ECADDocument componentDoc)
          Remove the given ECADDocument provided it has the DocumentType "COMPONENT"

Supported API: false
 void removeContentDoc(ECADDocument contentDoc)
          Remove a CONTENT ECADDocument from the assembly

Supported API: false
 void removeReferenceDesignator(EPMUsesOccurrence designator)
          Remove the given ReferenceDesignator

Supported API: false
 void setDescription(String newDescription)
          Set the description of the ECADAssembly

Supported API: true
protected  void setDesign(ECADDesign _design)
          Set the ECADDesign for this assembly

Supported API: false
 void setLifeCycle(String lifeCycleName, WTContainerRef containerRef)
          Set the LifeCycle name for the ECADAssembly

Supported API: true
 void setSchematicDoc(ECADDocument schematicDoc)
          Set the ECADDocument representing the schematic This will replace the current schematic document if one exists.
 void setTeamTemplate(String templateName)
          Set the Team Template for the ECADAssembly

Supported API: false
 String toString()
          Override of the toString method for outputting the ECADAssembly

Supported API: false
protected  void update(ECADTransaction transaction)
          Update the assembly using the results of the transaction

Supported API: false
protected  void validateNumber(String newNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ECADHLIRESOURCE

private static final String ECADHLIRESOURCE
See Also:
Constant Field Values

design

private ECADDesign design

assemblyDoc

private ECADDocument assemblyDoc

documents

private HashMap documents

referenceDesignators

private HashMap referenceDesignators
Constructor Detail

ECADAssembly

protected ECADAssembly()
                throws WTException

ECADAssembly

protected ECADAssembly(ECADDocument assemblyDoc)
                throws WTException
Method Detail

getDesign

public ECADDesign getDesign()
Get the ECADDesign for this assembly

Supported API: false

Returns:
ECADDesign

getAssemblyDoc

public ECADDocument getAssemblyDoc()
Return the ECADDocument representing the assembly

Supported API: true

Returns:
ECADDocument

getBoardDoc

public ECADDocument getBoardDoc()
Return the ECADDocument representing the board

Supported API: true

Returns:
ECADDocument

getTargetRevision

public String getTargetRevision()
Get the Initial Revision for this assembly

Supported API: false

Returns:
String revision

getSourceDoc

public ECADDocument getSourceDoc()
Return the ECADDocument representing the source

Supported API: true

Returns:
ECADDocument

getSchematicDoc

public ECADDocument getSchematicDoc()
Return the ECADDocument representing the schematic

Supported API: true

Returns:
ECADDocument

setSchematicDoc

public void setSchematicDoc(ECADDocument schematicDoc)
Set the ECADDocument representing the schematic This will replace the current schematic document if one exists.

Supported API: true


getContentDoc

public ECADDocument getContentDoc(String number)
Get the ECADDocument with the given number which is also a CONTENT Document.

Supported API: true


getContentDocs

public Vector getContentDocs()
Retrieve all CONTENT documents.

Supported API: true

Returns:
Vector of ECADDocuments.

addContentDoc

public void addContentDoc(ECADDocument contentDoc)
                   throws WTException
Add a CONTENT ECADDocument to the assembly

Supported API: false

Throws:
WTException

removeContentDoc

public void removeContentDoc(ECADDocument contentDoc)
Remove a CONTENT ECADDocument from the assembly

Supported API: false


isCheckedOut

public boolean isCheckedOut()
                     throws WTException
Check the checkout status of the Assembly

Supported API: true

Returns:
boolean - true if the assembly is checked out to this user.
Throws:
WTException

isCheckedOut

public static boolean isCheckedOut(EPMDocument document)
                            throws WTException
Throws:
WTException

getWorkspace

public EPMWorkspace getWorkspace()
Return the EPMWorkspace which holds the current checked out assembly.

Supported API: false

Returns:
EPMWorkspace

getComponentDoc

public ECADDocument getComponentDoc(String number)
Return the ECADDocument representing the Component document with the given number.

Supported API: true

Returns:
ECADDocument

getComponentDocs

public Vector getComponentDocs()
Return the a Vector of ECADDocuments representing all the Components

Supported API: true

Returns:
Vector of ECADDocuments

addComponentDoc

public void addComponentDoc(ECADDocument componentDoc)
                     throws WTException
Add the given ECADDocument provided it has the DocumentType "COMPONENT"

Supported API: false

Throws:
WTException

removeComponentDoc

public void removeComponentDoc(ECADDocument componentDoc)
Remove the given ECADDocument provided it has the DocumentType "COMPONENT"

Supported API: false


getReferenceDesignator

public EPMUsesOccurrence getReferenceDesignator(String name)
Return the named ReferenceDesignator

Supported API: true

Returns:
EPMUsesOccurrence

getReferenceDesignators

public Vector getReferenceDesignators()
Return a Vector of all ReferenceDesignators

Supported API: true

Returns:
Vector of EPMUsesOccurrence

addReferenceDesignator

public void addReferenceDesignator(EPMUsesOccurrence designator)
Add the given ReferenceDesignator

Supported API: false


removeReferenceDesignator

public void removeReferenceDesignator(EPMUsesOccurrence designator)
Remove the given ReferenceDesignator

Supported API: false


getEPMAsStoredConfig

public EPMAsStoredConfig getEPMAsStoredConfig()
                                       throws WTException
Return the EPMAsStoredConfig representing the stored ECADAssembly

Supported API: false

Returns:
EPMAsStoredConfig
Throws:
WTException

getBaseline

public Baseline getBaseline()
                     throws WTException
Return the Baseline in use. This will be the EPMAsStoredConfig if the Assembly is not checked out or the EPMCheckpoint if it is checked out to this user.

Supported API: false

Returns:
ECADDocument
Throws:
WTException

getNumber

public String getNumber()
Return the number of the ECADAssembly

Supported API: true

Returns:
String - the number of the ECADAssembly.

getName

public String getName()
Return the name of the ECADAssembly

Supported API: true

Returns:
String - the name of the ECADAssembly.

getDescription

public String getDescription()
Return the description of the ECADAssembly

Supported API: true

Returns:
String - the description of the ECADAssembly.

setDescription

public void setDescription(String newDescription)
                    throws WTPropertyVetoException
Set the description of the ECADAssembly

Supported API: true

Throws:
WTPropertyVetoException

getVersion

public String getVersion()
Return the version of the assembly

Supported API: true

Returns:
String - the version of the ECADAssembly.

getIteration

public String getIteration()
Return the iteration of the assembly

Supported API: true

Returns:
String - the iteration of the ECADAssembly.

getAuthoringApplication

public String getAuthoringApplication()
Return the Authoring Application of the assembly

Supported API: true

Returns:
String - the Authoring Application of the ECADAssembly.

getTeamTemplateName

private String getTeamTemplateName()
Get the name of the Team Template for the ECADAssembly

Supported API: false

Returns:
String - the project name of the ECADAssembly.

setTeamTemplate

public void setTeamTemplate(String templateName)
                     throws WTPropertyVetoException,
                            WTException
Set the Team Template for the ECADAssembly

Supported API: false

Throws:
WTPropertyVetoException, - WTException
WTPropertyVetoException
WTException

getLifeCycleName

public String getLifeCycleName()
Get the LifeCycle name for the ECADAssembly

Supported API: true

Returns:
String - the LifeCycle name of the ECADAssembly.

setLifeCycle

public void setLifeCycle(String lifeCycleName,
                         WTContainerRef containerRef)
                  throws WTPropertyVetoException,
                         WTException
Set the LifeCycle name for the ECADAssembly

Supported API: true

Throws:
WTPropertyVetoException, - WTException
WTPropertyVetoException
WTException

getFolder

public Folder getFolder()
                 throws WTException
Return the Folder for the ECADAssembly

Supported API: true

Returns:
Folder
Throws:
WTException

newECADAssembly

public static ECADAssembly newECADAssembly(ECADDesign design,
                                           ECADDocument assemblyDoc)
                                    throws WTException
Factory method to construct a new ECADAssembly containing the given ECADDocuments.

Supported API: true

Throws:
WTException

newECADAssembly

public static ECADAssembly newECADAssembly(ECADDocument assemblyDoc)
                                    throws WTException
Throws:
WTException

getOldAssembly

public static ECADAssembly getOldAssembly(String number,
                                          String version,
                                          WTContainerRef containerRef)
                                   throws WTException
Static method to return the ECADAssembly with the given number and version if it exists.

Supported API: true

Returns:
ECADAssembly
Throws:
WTException

toString

public String toString()
Override of the toString method for outputting the ECADAssembly

Supported API: false

Returns:
String - detailed contents of the ECADAssembly

getEPMDocuments

public EPMDocument[] getEPMDocuments()
Return an array of EPMDocuments contained in the Assembly

Supported API: false

Returns:
EPMDocument[]

getSource

public static EPMDocument getSource(EPMDocument assembly)
                             throws WTException
Return the EPMDocument which represents the "Container" for the given EPMDocument

Supported API: false

Returns:
EPMDocument - container document
Throws:
WTException

getUsesOccurrences

public QueryResult getUsesOccurrences(UsesOccurrenceContext context)
                               throws WTException
Return a QueryResult of UsesOccurrences for the given object

Supported API: false

Returns:
QueryResult
Throws:
WTException

generateWorkspaceName

public static String generateWorkspaceName(EPMDocument epmDoc)
Static method to return the name to be used for the EPMWorkspace to be used while this document is checkedout. It is the name/number/version of the EPMDocument with "WS-" prepended.

Supported API: false

Returns:
String

getEPMAsStoredConfig

public static EPMAsStoredConfig getEPMAsStoredConfig(String number,
                                                     String version,
                                                     WTContainerRef containerRef)

getWorkspace

public static EPMWorkspace getWorkspace(String number,
                                        String version,
                                        WTContainerRef containerRef)

update

protected void update(ECADTransaction transaction)
Update the assembly using the results of the transaction

Supported API: false


setDesign

protected void setDesign(ECADDesign _design)
Set the ECADDesign for this assembly

Supported API: false


lookupCheckpoint

protected EPMCheckpoint lookupCheckpoint()
                                  throws WTException
Throws:
WTException

lookupBaseline

protected static ManagedBaseline lookupBaseline(EPMDocument epmDoc)
                                         throws WTException
Throws:
WTException

loadDocuments

protected void loadDocuments()
                      throws WTException
Throws:
WTException

loadLinks

protected void loadLinks()
                  throws WTException
Throws:
WTException

loadRefLinks

protected void loadRefLinks(ECADDocument ecadDoc)
                     throws WTException
Throws:
WTException

loadReferenceDesignators

protected void loadReferenceDesignators()
                                 throws WTException
Throws:
WTException

validateNumber

protected void validateNumber(String newNumber)
                       throws WTException
Throws:
WTException

loadUses

protected void loadUses()
                 throws WTException
Throws:
WTException