Class ESISkillRenderer

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

public class ESISkillRenderer extends AbstractResourceRenderer
Renders the output of MPMSkill (i.e. <Skill> </Skill>) in ESI response.

Supported API: true

Extendable: true
  • Method Details

    • getSkills

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


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

      protected void buildGroups() throws ESIRendererException
      Renders skill objects as added, deleted, changed and unchanged objects appropriately.
      1. Renders the skill structures as structures(all the skill objects in the structure including links) in the response.
      2. All other skill 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(MPMSkill) to navigate skill 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:
    • processSkills

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


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