Class OptionRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.ov.OptionRenderer
All Implemented Interfaces:
ESIRenderer

public class OptionRenderer extends BasicESIRenderer
Renders Option, Choice and Group

Supported API: true

Extendable: true
  • Method Details

    • setdata

      public void setdata(String objectID, Persistable context, Map<Option,Set<Choice>> allOptionsAndChoicesToBeRendered, ESITarget target, Map<String,Object> paramsMap, String auth) throws WTException
      Initializes this renderer instance appropriately.

      Supported API: true
      Parameters:
      objectID - - The UFID of the option being processed.
      context - - Object which is referring to this option (Option Set etc.). Can be null when an option is published as a stand alone object.
      allOptionsAndChoicesToBeRendered - - A Map with option as the key and set of its choices as its value. If this null or empty, then the caller is expected to provide a value to the input argument "objectID".
      target - - Distribution target to which the option is being processed.
      paramsMap - - Can be used to pass additional data to this renderer. Currently this is not being used by Out-Of-box code.
      auth - - Authentication information for Info*Engine tasks.
      Throws:
      WTException
    • getOptionAndChoices

      public void getOptionAndChoices(Persistable context, Map<Option,Set<Choice>> allOptionsAndChoicesToBeRendered, Map<String,Object> paramsMap, String auth, VdbBuilder builder) throws WTException
      Renders the options and choices available in the input map "allOptionsAndChoicesToBeRendered".

      Supported API: true
      Parameters:
      context - - Object which is referring to the options and choices available in the input map.
      allOptionsAndChoicesToBeRendered - - Map with the option as key and a set of its choices as its value.
      paramsMap - - Can be used to pass additional data to this renderer. Currently this is not being used by Out-Of-box code.
      auth - - This parameter contains authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      builder - - The VdbBuilder to use when creating output.
      Throws:
      WTException
    • validate

      protected void validate() throws ESIRendererException
      Ensures that the data needed to execute this renderer is passed in correctly.

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

      protected void buildGroups() throws ESIRendererException
      Renders the option(s) and corresponding choices as added, changed and unchanged objects based on their release history.
      • If the attribute "Publish only Incremental Changes for a Modified Option set" on the target is set to "No", all the options and corresponding choices will be rendered as added objects regardless of their release history. If it is set to "Yes" only difference will be published.
      • If the preference "Enforce Distribution Target" is set to "Yes" and the objects being published have no targets associated, throws exception and the rendering will be aborted.
      • Targets will be inherited automatically from the context object (OptionSet, WTPart etc.) in all the cases except when the option is getting published as a stand alone object.


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

      protected com.infoengine.object.factory.Element adjustChoiceElement(com.infoengine.object.factory.Element element, String groupName, Choice choice, Option option, Persistable context, Collection<ESITarget> targets)
      Allow subclasses to fix the contents of an element before it's added to the output group(s). Default behavior is to return the argument.

      Supported API: true
      Parameters:
      element - - The element to be updated.
      groupName - - The logical name of the group to which the element will be added.
      choice - - The choice that is being processed.
      option - - The option to which this choice belongs.
      context - - The context object which is referring to this choice (Option Set etc.). Can be null when an option is published as a stand alone object.
      targets - - Collection of ESITarget objects.
      Returns:
      - An updated Choice element.
    • adjustOptionElement

      protected com.infoengine.object.factory.Element adjustOptionElement(com.infoengine.object.factory.Element element, String groupName, Option option, Persistable context, Collection<ESITarget> targets)
      Allow subclasses to fix the contents of an element before it's added to the output group(s). Default behavior is to return the argument.

      Supported API: true
      Parameters:
      element - - The element to be updated.
      groupName - - The logical name of the group to which the element will be added.
      option - - The option that is being processed.
      context - - The context object which is referring to this option (Option Set etc.). Can be null when an option is published as a stand alone object.
      targets - - Collection of ESITarget objects.
      Returns:
      - An updated Option element.