Class ESIWorkCenterRenderer

All Implemented Interfaces:
ESIRenderer, com.ptc.windchill.esi.translation.ESITranslationRenderer

public class ESIWorkCenterRenderer extends AbstractResourceRenderer
This class renders the output of MPMWorkCenter (i.e. <WorkCenter> </WorkCenter>) in ESI response.

Supported API: true

Extendable: true
  • Method Details

    • buildGroups

      protected void buildGroups() throws ESIRendererException
      /** Output generator for the class. Does the following:
      1. Obtains the contents of the work center collection.
      2. Finds the ESI targets associated with the work centers.
      3. Finds the most current released version of the work center for each target.
      4. Compares the current version to the most current version. If they are the same and the effectivity has not changed, the work center is ignored.
      5. If the work center is not ignored, calls the Windchill Adapter to obtain all the attributes of the work center.
      6. Maps the result of the Windchill Adapter call.
      7. Calls adjustElement()
      8. If documents are required, calls the document renderer.


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

      protected void processWorkCenters(MPMResource workCenterHeader, Collection<MPMResource> workCentersInStructure, Collection<MPMResource>[] workCenterDelta, ESITarget tgt) throws ESIRendererException
      Processes work center rendering.
      Does the following:
      1. Checks the target associations of input work center objects. Throws exception and the aborts the response generation if a work center object doesn't have targets associated and the enforce orgs preference has a value true.
      2. Finds the most current released version of the work center for the input target.
      3. Compares the current version to the most current version. If they are the same and the effectivity has not changed, the work center is rendered as unchanged object.
      4. Collects the links between work center header and child work centers appropriately and invokes the ESIResourceUsageLinkRenderer renderer to render them.


      Supported API: true
      Parameters:
      workCenterHeader - - The work center having child work centers i.e. work center structure.
      workCentersInStructure - - The collection containing work centers object that belongs to perticular work center structure.
      workCenterDelta - - Array of work center collection containing added, changed and unchanged work centers
      tgt - - The current distribution target for which response need to be generated.
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.