Class ESISequenceUsageLinkRenderer

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

public class ESISequenceUsageLinkRenderer extends BasicESIRenderer
This class renders the output of MPMSequence and MPMSequenceUsageLink (i.e. <Sequence> </Sequence>) in ESI response.

Supported API: true

Extendable: true
  • Method Details

    • getTargets

      protected Collection<ESITargetAssociation> getTargets()
      Gets the value of the attribute: targets.

      Supported API: true
      Returns:
      Collection
    • getSequenceLinks

      protected Collection<MPMSequenceUsageLink>[] getSequenceLinks()
      Gets the value of the attribute: sequenceLinks.

      Supported API: true
      Returns:
      Collection[]
    • getRoot

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

      Supported API: true
      Returns:
      MPMProcessPlan
    • 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.
    • buildGroups

      protected void buildGroups() throws ESIRendererException
      Populates the associated VdbBuilder instance with the response data for Sequence(s). It creates a collection of all the added, changed and unchanged sequences which is further processed by the ESIProcessPlanRenderer.
      • Calls adjustObjectID().
      • Calls adjustTargets().
      • Calls adjustElement().

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

      public void setData(MPMSequenceHolder root, Collection<MPMSequenceUsageLink>[] sequenceLinks, Collection<ESITargetAssociation> tgtAssociations, String auth, String wcAdapter, ViewReference defaultView) throws ESIRendererException
      Initializes this renderer instance appropriately.

      Supported API: true
      Parameters:
      root - Root object (process plan) whose sequence usage links are to be rendered.
      sequenceLinks - Array of collections of added, deleted, changed and unchanged sequence usage links.
      tgtAssociations - Collection of ESITargetAssociation objects.
      auth - I*E 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 process plan resides in.
      Throws:
      ESIRendererException - if any of the invoked methods threw this exception.
    • adjustElement

      protected com.infoengine.object.factory.Element adjustElement(com.infoengine.object.factory.Element elem, String group, MPMSequence mpmSequence, Collection<ESITarget> targets)
      Allow subclasses to fix the contents of an element before it's added to the output group(s). Default behavior is to return the argument.

      Supported API: true
      Parameters:
      elem - the input Element.
      group - the input group.
      mpmSequence - Input mpm sequence.
      targets - Collection of ESITarget objects.
      Returns:
      Element
    • validate

      protected void validate() throws ESIRendererException
      Throws an exception if the attribute root, targets or the Collection sequenceLinks is null or contains null objects.

      Supported API: true
      Specified by:
      validate in class BasicESIRenderer
      Throws:
      ESIRendererException - , if any of the said instance members are null, or are invalid.
    • getPreviousExportedIterationAssociations

      protected Map getPreviousExportedIterationAssociations(MPMSequence mpmSequence, Collection<ESITargetAssociation> tgtAssociations, boolean delta) throws WTException
      Populate a map that associates each previous exported iteration with a collection of Distribution Targets. Getting the previous exported iteration applies only when differences are desired, i.e. delta is true, and the object is associated with at least one target. When delta is false, or the object is associated with zero targets, the object is treated as though there aren't any previous exported iterations. Internally invokes the API ESITransactionUtility.latestObjectExport(Collection, ESIPropertyRequest).

      Supported API: true
      Parameters:
      mpmSequence - - MPMSequence
      tgtAssociations - - Collection of ESITargetAssociation
      delta - - Boolean
      Returns:
      Map of PreviousExportedIterationKey and the collection of ESITargetAssociation
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getRootToFetchOpionSetInfo

      protected Persistable getRootToFetchOpionSetInfo()
      Returns the root object to be used for fetching the 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. It returns the process plan which is obtained by invoking the API getRoot() by default. The renderer "com.ptc.windchill.esi.ov.ChoiceMappableChoiceLinkRenderer" uses this object to find the appropriate option set for the current sequence usage link being rendered. Check the java doc of this renderer for more information.

      Supported API: true
      Returns:
      the root object to be used for fetching the option set information.