Class ESIToolingRenderer

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

public class ESIToolingRenderer extends AbstractResourceRenderer
Renders the output of MPMTooling (i.e. <Tooling> </Tooling>) in ESI response.

Supported API: true

Extendable: true
  • Method Details

    • getToolings

      @Deprecated protected Collection<MPMTooling> getToolings()
      Deprecated.
      Use AbstractResourceRenderer.getMpmResources() instead of this API.


      Supported API: true
      Gets the value of the attribute: toolings.
      Returns:
      Collection
    • buildGroups

      protected void buildGroups() throws ESIRendererException
      Renders tooling objects as added, deleted, changed and unchanged objects appropriately.
      1. Renders the tooling structures as structures(all the tooling objects in the structure including links) in the response.
      2. All other tooling objects which are not structures will be rendered normally.
      3. Uses the TreeNavigator instance passed as input via. setData() API to get the structure information. If it is null, invokes the API AbstractResourceRenderer.getTreeNavigator(MPMTooling) to navigate tooling structure.
      4. Invokes the renderer ESIResourceUsageLinkRenderer to render the link WTPartUsageLink that exists between two resources.


      Supported API: true
      Specified by:
      buildGroups in class BasicESIRenderer
      Throws:
      ESIRendererException
      See Also:
    • processToolings

      protected void processToolings(MPMResource toolingHeader, Collection<MPMResource> toolings, Collection<MPMResource>[] toolingColls, ESITarget tgt, TreeNavigator navigator) throws ESIRendererException
      Output generator for the class. Does the following:
      1. Checks the target associations of input tooling objects. Throws exception and aborts response generation if a tooling object doesn't have targets associated and the enforce orgs preference has a value true.
      2. Finds the most current released version of the tooling 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 tooling is rendered as unchanged object.
      4. Calls the Windchill Adapter to obtain all the attributes of the tooling.
      5. Maps the result of the Windchill Adapter call.
      6. Calls adjustElement()
      7. If documents are required, calls the document renderer.
      8. If the tooling is a structure, collects the links appropriately and invokes the ESIResourceUsageLinkRenderer renderer to render them.


      Supported API: true
      Parameters:
      toolingHeader - - Header of the tooling structure.
      toolings - - Collection of tooling objects.
      toolingColls - - An array of collections which holds the added, deleted, changed and unchanged tooling objects respectively.
      tgt - - Current distribution target.
      navigator - - Tree navigator instance to get the structure information.
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.