Class ESIProcessPlanHeaderRenderer

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

public class ESIProcessPlanHeaderRenderer extends BasicESIRenderer
This class renders the output of process plan header (ie. <ProcessPlan><l/ProcessPlan>) in ESI response.

Supported API: true

Extendable: true
  • Method Details

    • getTargetAssociations

      protected Collection<ESITargetAssociation> getTargetAssociations()
      Gets the value of the attribute: targetAssocs.

      Supported API: true
      Returns:
      Collection
    • getGroupName

      protected String getGroupName()
      Gets the value of the attribute: groupName.

      Supported API: true
      Returns:
      String
    • getProcessPlan

      protected MPMProcessPlan getProcessPlan()
      Gets the value of the attribute: mpmProcessPlan.

      Supported API: true
      Returns:
      MPMProcessPlan
    • buildGroups

      protected void buildGroups() throws ESIRendererException
      Populates the associated VdbBuilder instance with the response data for a process plan header. Besides invoking mapElement() to map the source to the target attributes, it invokes adjustment APIs such as adjustObjectID(), adjustEffectivities() and adjustElement() so as to alter the contents of the output element as may be appropriate.

      Supported API: true
      Specified by:
      buildGroups in class BasicESIRenderer
      Throws:
      ESIRendererException - , if some error was encountered while generating the response data.
    • setData

      public void setData(String groupName, MPMProcessPlan mpmProcessPlan, Collection<ESITargetAssociation> targetAssocs, ESIEffectivityHandler effHandler, String adapterName, String auth) throws ESIRendererException
      Establish the renderer's state so that it can process requests.

      Supported API: true
      Parameters:
      groupName - - Name of the group for which to render the output - for e.g., "AddedProcessPlans", "ChangedProcessPlans" etc.
      mpmProcessPlan - - Process plan being rendered.
      targetAssocs - - Collection of ESITargetAssociation objects.
      effHandler - - Effectivity handler instance to use when processing effectivity specifications.
      adapterName - - Windchill adapter instance name to use when executing a webject.
      auth - - Info*Engine authentication information to use when executing a query task.
      Throws:
      ESIRendererException - if any of the invoked methods threw this exception.
    • setData

      public void setData(String groupName, MPMProcessPlan mpmProcessPlan, MPMProcessPlan previousExportedIteration, Collection<ESITargetAssociation> targetAssocs, ESIEffectivityHandler effHandler, String adapterName, String auth) throws ESIRendererException
      Establish the renderer's state so that it can process requests.

      Supported API: true
      Parameters:
      groupName - - Name of the group for which to render the output - for e.g., "AddedProcessPlans", "ChangedProcessPlans" etc.
      mpmProcessPlan - - Process plan being rendered.
      previousExportedIteration - - Process plan iteration that was previously successfully published to the targets denoted by the input parameter targetAssocs.
      targetAssocs - - Collection of ESITargetAssociation objects.
      effHandler - - Effectivity handler instance to use when processing effectivity specifications.
      adapterName - - Windchill adapter instance name to use when executing a webject.
      auth - - Info*Engine authentication information to use when executing a query task.
      Throws:
      ESIRendererException - if any of the invoked methods threw this exception.
    • adjustElement

      protected com.infoengine.object.factory.Element adjustElement(com.infoengine.object.factory.Element element, String group, MPMProcessPlan mpmProcessPlan, Eff[] eff, Collection<ESITarget> targets) throws ESIRendererException
      This method is meant to be overridden by a sub-class. The default version simply returns the input element, but the overridden version can modify the contents of the element as needed before returning it to the caller.

      Supported API: true
      Parameters:
      element - - The element to be updated.
      group - - The logical name of the group to which the element will be added.
      mpmProcessPlan - - Process plan being processed.
      eff - - Array of effectivity specifications associated with the process plan..
      targets - - Collection of ESITarget objects associated with the process plan.
      Returns:
      Element
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.
    • validate

      protected void validate() throws ESIRendererException
      Throws an exception if any of the following instance members do not exist or do not carry a valid value - mpmProcessPlan, groupName and targetAssocs.

      Supported API: true
      Specified by:
      validate in class BasicESIRenderer
      Throws:
      ESIRendererException - , if any of the said instance members are null or do not carry a valid value.