Class ESIPromotionRequestRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.promotionrequest.ESIPromotionRequestRenderer
All Implemented Interfaces:
ESIRenderer

public class ESIPromotionRequestRenderer extends BasicESIRenderer
This class renders a Promotion Request.

Supported API: true

Extendable: true
  • Method Details

    • getPromotionRequest

      public com.infoengine.object.IeCollection getPromotionRequest(String objectID, ESITransaction txn, Collection<ESITarget> targets, String auth) throws WTException
      Renders the input promotion request and returns the output as an Info*Engine collection to the caller. For each distribution target in the input targets collection, it renders the promotion request and all its associated promotables and finally creates release activities as appropriate. The settings pertaining to ESI response generation for a given distribution target are fetched from the target itself. Additionally this method renders the children of the assembly which is added as a promotable to the input promotion request, if they are associated with any additional targets than their parent.

      Supported API: true
      Parameters:
      objectID - - UFID of the promotion request to be rendered. Should not be a null.
      txn - - Transaction object that represents the delivery of data to the distribution targets in targets collection.
      targets - - Collection of distribution targets. Should not be a null.
      auth - - This parameter contains authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      Returns:
      The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(String objectID, ESITarget target, String auth, String transactionID)
      Initializes this renderer instance appropriately.

      Supported API: true
      Parameters:
      objectID - - UFID of the promotion request to be rendered.
      target - distribution target for which promotion request need to be processed.
      auth - - Authentication information for Info*Engine tasks.
      transactionID - - The number of the transaction to associate with the output from this renderer.
    • buildGroups

      protected void buildGroups() throws ESIRendererException
      Renders the promotion request and all its associated promotables. Delegates the work to buildPromotionRequestHeader(PromotionNotice, ESITarget) and buildPromotables(PromotionNotice, ESITarget) APIs.

      Supported API: true
      Specified by:
      buildGroups in class BasicESIRenderer
      Throws:
      ESIRendererException
    • adjustPromotionRequestHeaderElement

      protected com.infoengine.object.factory.Element adjustPromotionRequestHeaderElement(com.infoengine.object.factory.Element element, String group, PromotionNotice promotionRequest, Collection<ESITarget> targets) throws ESIRendererException
      Allow subclasses to fix the contents of the input element. Currently this API simply returns the input element.

      Supported API: true
      Parameters:
      element - - I*E Element whose contents need to be fixed.
      group - - Name of the group in ESI response for which to adjust the I*E element.
      promotionRequest - - Promotion Request.
      targets - - Collection of ESITarget objects.
      Returns:
      Simply returns the input element.
      Throws:
      ESIRendererException
    • validate

      protected void validate() throws ESIRendererException
      Makes sure that the renderer is in proper state before processing. Validates "objectID", "auth" and "transactionID".

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

      @Deprecated public 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.
    • getPromotables

      protected Set<Releasable> getPromotables(PromotionNotice promotionRequest) throws WTException, MaturityException
      Returns the set of promotables that are implementing 'Releasable' interface and also if any promotable is ProcessPlan.

      Supported API: true
      Parameters:
      promotionRequest - - The promotion request to get promotables
      Returns:
      - The set of promotable object implementing 'Releasable' interface
      Throws:
      WTException
      MaturityException