Class ESISmartCollectionRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.smartcollection.ESISmartCollectionRenderer
All Implemented Interfaces:
ESIRenderer

public class ESISmartCollectionRenderer extends BasicESIRenderer


Supported API: true

Extendable: true
  • Method Details

    • getSmartCollection

      public com.infoengine.object.IeCollection getSmartCollection(String objectID, ESITransaction txn, Collection<ESITarget> targets, String auth, String wcAdapter) throws WTException
      Creates a VdbBuilder instance for the input transaction, renders the input assembly and creates release activities as appropriate for each of the distribution targets in targets. The settings pertaining to ESI response generation for a given distribution target are fetched from the target itself. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Parameters:
      objectID - - UFID of the AccountabilityMap object to be rendered.
      txn - - ESITransaction object that represents the delivery of data to the distribution targets in targets; will be null when the method is invoked for the Preview functionality.
      targets - - A collection of distribution targets that represent a given destination, such as an ERP instance.
      auth - - This parameter contains authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      wcAdapter - - This parameter contains the name of the Windchill adapter instance.
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - - if any of the invoked methods throws this exception.
    • setData

      public void setData(AccountabilityMap root, String auth, String wcAdapter, String transactionID, ESITarget target)
      Establish the renderer's state so that it can process requests.

      Supported API: true
      Parameters:
      root - - The primary smart collection to process. May not be null.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject.
      transactionID - - Optional transaction ID to pass to the VDB builder.
      target - - ESI target object.
    • getRoot

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

      Supported API: true
      Returns:
      AccountabilityMap
    • buildGroups

      protected void buildGroups() throws WTException
      Output generator for the class. Does the following:
      1. Obtains a list of targets assigned to the AccountabilityMap.
      2. Identifies if the AccountabilityMap was previously published and renders in respective group in ESI response.
      3. Populated AccountabilityMap associations such a context part, content part and navigation criteria.
      4. Calls the Navigation Criteria renderer.


      5. Supported API: true
      Specified by:
      buildGroups in class BasicESIRenderer
      Throws:
      ESIRendererException
      WTException
    • validate

      protected void validate() throws ESIRendererException
      Make sure the object is ready to process. If AccountabilityMap object, authentication, or adapterName are null, throws an exception.

      Supported API: true
      Specified by:
      validate in class BasicESIRenderer
      Throws:
      ESIRendererException
    • adjustSmartCollectionElement

      protected com.infoengine.object.factory.Element adjustSmartCollectionElement(com.infoengine.object.factory.Element element, String group, AccountabilityMap smartCollection, ESITarget targets) throws ESIRendererException
      Allow subclasses to fix the contents of an element.

      Supported API: true
      Parameters:
      element - - The element to be updated.
      group - - The logical name of the group to which the element will be added.
      smartCollection - - AccountabilityMap object.
      targets - - Collection of ESITarget objects.
      Throws:
      ESIRendererException
    • adjustContextPartElement

      protected com.infoengine.object.factory.Element adjustContextPartElement(com.infoengine.object.factory.Element element, String groupName, WTPart contextPart, Collection<ESITarget> targets, AccountabilityKey accountabilitykeys) throws ESIRendererException
      Allow subclasses to fix the contents of an element.

      Supported API: true
      Parameters:
      element - - The element to be updated.
      groupName - - The logical name of the group to which the element will be added.
      contextPart - - Context part object.
      targets - - Collection of ESITarget objects.
      accountabilitykeys - - AccountabilityKey object.
      Throws:
      ESIRendererException
    • adjustContentPartElement

      protected com.infoengine.object.factory.Element adjustContentPartElement(com.infoengine.object.factory.Element element, String groupName, WTPart contentPart, Collection<ESITarget> targets) throws ESIRendererException
      Allow subclasses to fix the contents of an element.

      Supported API: true
      Parameters:
      element - - The element to be updated.
      groupName - - The logical name of the group to which the element will be added.
      targets - - Collection of ESITarget objects.
      contextPart - - Context part.
      Throws:
      ESIRendererException
    • getPreviousExportedIterationAssociations

      Computes the previous exported iteration for the input target associations. Invokes the API
      invalid reference
      ESITransactionUtility#latestObjectExport(Collection)
      .

      Computing a previous exported iteration is target sensitive because each target is not guaranteed to have the same previously exported iteration. For example, an accountabilityMap could be associated with target 1, then exported, then associated with target 2, and exported a second time. In the case of the second export, target 1 has a previous exported iteration, while target 2 does not. Therefore, the output map contains a previous exported iteration mapped to collection of targets.

      Supported API: true

      Parameters:
      accMap - - AccountabilityMap being processed. Currently not used. But this may be useful for customizers.
      tgtAssociations - - Collection of distribution target associations. Typically the target association between the input part and current distribution target being processed.
      Throws:
      WTException