Class ESIOperationToPartLinkRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.mpml.processplan.operation.ESIOperationToPartLinkRenderer
All Implemented Interfaces:
ESIRenderer

public class ESIOperationToPartLinkRenderer extends BasicESIRenderer
This class renders the output of MPMOperationToPartLink (i.e. <OprBomAllocatedPart> </OprBomAllocatedPart>) in ESI response.

Supported API: true

Extendable: true
  • Method Details

    • getTargets

      protected Collection<ESITargetAssociation> getTargets()
      Deprecated.
      (Since 10.2) Use getTargetAssociations()
      Gets the value of the attribute: targetAssociations.

      Supported API: true
      Returns:
      Collection
    • getTargetAssociations

      protected Collection<ESITargetAssociation> getTargetAssociations()
      Gets the value of the attribute: targetAssociations; A collection ESITargetAssociation objects.

      Supported API: true
      Returns:
      Collection
    • getComponents

      protected Collection<MPMOperationToPartLink>[] getComponents()
      Gets the value of the attribute: components.

      Supported API: true
      Returns:
      Collection[]
    • getRoot

      protected MPMOperation getRoot()
      Gets the value of the attribute: root.

      Supported API: true
      Returns:
      MPMOperation
    • getRootObj

      protected MPMOperationHolder getRootObj()
      Gets the value of the attribute: root.

      Supported API: true
      Returns:
      MPMOperation
    • getWcAdapter

      @Deprecated protected String getWcAdapter()
      Deprecated.
      Use BasicESIRenderer.getAdapterName() instead.

      Supported API: true
      Returns the value of the attribute adapterName. This attribute holds the name of the Windchill Adapter instance where the Query-Objects webject is to be executed.
      Returns:
      The value stored in the field adapterName.
    • getPartSet

      protected HashSet<WTPart> getPartSet()
      Gets the value of the attribute: partSet.

      Supported API: true
      Returns:
      HashSet<WTPart>
    • buildGroups

      public void buildGroups() throws ESIRendererException
      Populates the associated VdbBuilder instance with the response data for operation to part Links. It creates a collection of all the added, changed and unchanged links which is further processed by the ESIOperationRenderer.
      • Calls adjustObjectID().
      • Calls adjustTargets().


      Supported API: true
      Specified by:
      buildGroups in class BasicESIRenderer
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.
    • setData

      public void setData(MPMOperation root, Collection<MPMOperationToPartLink>[] operationToPartLinks, HashSet<WTPart> partSet, Set<WTPart> dissociatedParts, boolean lineNumbers, Collection<ESITargetAssociation> tgtAssociations, String auth, String wcAdapter) throws WTException
      Sets this renderer's member variables that are necessary for rendering operation to part links.

      Supported API: true
      Parameters:
      root - - Object (operation) for which to process operation to part links.
      operationToPartLinks - - Array of collections of added, deleted, changed and unchanged operation to part links.
      partSet - - Set of parts associated with the currently published top level process plan iteration.
      dissociatedParts - - Set of parts that were associated with a previously published process plan iteration, but not with the currently published iteration.
      lineNumbers - - if true, renders the line number information.
      tgtAssociations - - Collection of target associations.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(MPMProcessPlan root, Collection<MPMOperationToPartLink>[] operationToPartLinks, HashSet<WTPart> partSet, Set<WTPart> dissociatedParts, boolean lineNumbers, Collection<ESITargetAssociation> tgtAssociations, String auth, String wcAdapter) throws WTException
      Sets this renderer's member variables that are necessary for rendering operation to part links.

      Supported API: true
      Parameters:
      root - - Object (operation) for which to process operation to part links.
      operationToPartLinks - - Array of collections of added, deleted, changed and unchanged operation to part links.
      partSet - - Set of parts associated with the currently published top level process plan iteration.
      dissociatedParts - - Set of parts that were associated with a previously published process plan iteration, but not with the currently published iteration.
      lineNumbers - - if true, renders the line number information.
      tgtAssociations - - Collection of target associations.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(MPMOperationHolder rootObj, MPMOperation currOpr, Collection<MPMOperationToPartLink>[] operationToPartLinks, HashSet<WTPart> partSet, Set<WTPart> dissociatedParts, boolean lineNumbers, Collection<ESITargetAssociation> tgtAssociations, String auth, String wcAdapter) throws WTException
      Sets this renderer's member variables that are necessary for rendering operation to part links.

      Supported API: true
      Parameters:
      rootObj - - Holder of the operation for which to process operation to part links.
      currOpr - - Operation for which to process operation to part links.
      operationToPartLinks - - Array of collections of added, deleted, changed and unchanged operation to part links.
      partSet - - Set of parts associated with the top level process plan.
      dissociatedParts - - Set of parts that were associated with a previously published process plan iteration, but not with the currently published iteration.
      lineNumbers - - if true, renders the line number information.
      tgtAssociations - - Collection of target associations.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(MPMProcessPlan processPlan, MPMProcessPlan prevExportedProcessPlanIteration) throws WTException
      Sets the instance variable processPlan to the input object.

      Supported API: true
      Parameters:
      processPlan - MPMProcessPlan object to set processPlan to.
      prevExportedProcessPlanIteration - - Previously Exported Iteration of Process plan.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • validate

      protected void validate() throws ESIRendererException
      Force all subclasses to implement the method. The concrete method is expected to examine the attributes of the object and throw an exception if they are not set properly.

      Supported API: true
      Specified by:
      validate in class BasicESIRenderer
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.
    • adjustElement

      protected com.infoengine.object.factory.Element adjustElement(com.infoengine.object.factory.Element elem, String group, MPMOperationToPartLink operationToPartLink, WTPartMaster part, Collection<ESITarget> targets) throws ESIRendererException
      Allows subclasses to fix the contents of the input I*E Element before it is added to the output group(s). Default behavior is to return the input Element itself.

      Supported API: true
      Parameters:
      elem - - Input I*E Element to be updated.
      group - - Logical name of the group to which the Element will be added.
      operationToPartLink - - Operation to part link that is represented by the input Element.
      part - - Part master object associated with the input operation to part link.
      targets - - Collection of ESITarget objects.
      Returns:
      Updated Element.
      Throws:
      ESIRendererException