Class ESIOperationConsumableResourceRenderer

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

public class ESIOperationConsumableResourceRenderer extends BasicESIRenderer
This class renders the output of MPMOperationToConsumableLink (i.e. <OperationToConsumableResourceLink> </OperationToConsumableResourceLink>) in ESI response.

Supported API: true

Extendable: true
  • Method Details

    • getTargets

      protected Collection getTargets()
      Deprecated.
      (Since 10.2) Use getTargetAssociations()
      Gets the value of the attribute: targetAssociations; A collection ESITargetAssociation objects.

      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
    • getResourceLinks

      protected Collection<MPMOperationToConsumableLink>[] getResourceLinks()
      Gets the value of the attribute: resourceLinks.

      Supported API: true
      Returns:
      Collection[]
    • getRoot

      protected MPMOperation getRoot()
      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.
    • setData

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

      Supported API: true
      Parameters:
      processPlan - MPMProcessPlan object to set processPlan to.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getRootProcessPlan

      public MPMProcessPlan getRootProcessPlan()
      Returns the top level process plan.

      Supported API: true
      Returns:
      process plan which is the root of the process plan structure.
    • buildGroups

      public void buildGroups() throws ESIRendererException
      Populates the associated VdbBuilder instance with the response data for Consumable Resource 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<MPMOperationToConsumableLink>[] resourceLinks, HashMap oldAttrs, Collection<ESITargetAssociation> tgAssocs, String auth, String wcAdapter, ViewReference defaultView) throws WTException
      Set this renderer's member variables that are necessary for rendering operation to consumable resource links.

      Supported API: true
      Parameters:
      root - - Object (operation) for which to process operation to consumable resource links.
      resourceLinks - - Array of collections of added, deleted, changed and unchanged consumable resource links.
      oldAttrs - - HashMap of names and values of attributes on a previously published consumable resource link
      tgAssocs - - 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.
      defaultView - - ViewReference object representing the Windchill view that the top level process plan resides in.
      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.
    • getRootToFetchOpionSetInfo

      protected Persistable getRootToFetchOpionSetInfo()
      Returns the root object to be used for fetching option set information. This method is intended to be overridden by a customizer if they want to use a different root other than the default one. By default, it returns the process plan obtained from the API getRootProcessPlan(). The renderer "com.ptc.windchill.esi.ov.ChoiceMappableChoiceLinkRenderer" uses this object to find the appropriate option set for the current operation to consumable link being rendered. Check the java doc of this renderer for more information.

      Supported API: true
      Returns:
      the root object
    • adjustElement

      protected com.infoengine.object.factory.Element adjustElement(com.infoengine.object.factory.Element elem, String groupName, MPMOperationToConsumableLink operationToConsumableLink, WTPartMaster consumableResourceMaster, Collection<ESITarget> targets)
      Allows subclasses to fix the contents of an Element before it is added to the output group(s). Default behavior is to return the input Element itself.

      Supported API: true
      Parameters:
      elem - - I*E Element to be updated.
      groupName - - Logical name of the group to which the Element will be added.
      operationToConsumableLink - - The operation to consumable link being processed.
      consumableResourceMaster - - Part or resource master associated with the input operation to consumable link.
      targets - - Collection of ESITarget objects.
      Returns:
      The updated Element.
      Throws:
      ESIRendererException - if any of the invoked methods throws this exception.