Class ESIResourceUsageLinkRenderer

All Implemented Interfaces:
ESIRenderer

public class ESIResourceUsageLinkRenderer extends ESIBOMComponentRenderer
Renders the output of WTPartUsageLink (i.e. <ResourceUsageLink> </ResourceUsageLink>) in ESI DataResponse.

Supported API: true

Extendable: true
  • Method Details

    • buildGroups

      protected void buildGroups() throws ESIRendererException
      Renders the usage link between two resources as added, deleted, changed and unchanged object appropriately.

      Supported API: true
      Overrides:
      buildGroups in class ESIBOMComponentRenderer
      Throws:
      ESIRendererException
      See Also:
    • adjustElement

      protected com.infoengine.object.factory.Element adjustElement(com.infoengine.object.factory.Element elem, String groupName, WTPartUsageLink usageLink, MPMPlantOwned plantOwnedObj, MPMResource resource, WTPart roleBResource, 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:
      elem - - The element to be updated.
      groupName - - The logical name of the group to which the element will be added.
      usageLink - - Link between two resources.
      plantOwnedObj - - process plan/part to which the input plant is associated.
      resource - - Resource which is the RoleA of the input usage link.
      roleBResource - RoleB iteration of the input usage link.
      targets - - Collection targets.
      Returns:
      Updated element.
    • validate

      protected void validate() throws ESIRendererException
      Ensures that the data needed to execute this renderer is set appropriately using setData(MPMPlantOwned, MPMResource, Map[], Collection, String, String) API.

      Supported API: true
      Overrides:
      validate in class ESIBOMSubordinateRenderer
      Throws:
      ESIRendererException
      See Also:
    • setData

      public void setData(MPMPlantOwned plantOwnedObj, MPMResource resource, Map<WTPartUsageLink,WTPart>[] delta, Collection<ESITargetAssociation> tgtAssociations, String auth, String adapter) throws ESIRendererException
      Set this renderer's member variables that are necessary for rendering usage links i.e. WTPartUsageLink.

      Supported API: true
      Parameters:
      plantOwnedObj - - Object to which the plants are assigned. part/process plan etc.
      resource - - Resource which is the RoleA of the input usage links.
      delta - - Collection of resource usage links i.e. WTPartUsageLink objects. The collection at index-0 is expected to contain the links which are newly added to the input resource object , index-1 deleted links, index-2 changed links and index-3 unchanged links.
      tgtAssociations - - Collection of target assignments with the plant owned.
      auth - - Info*Engine authentication information to be used when invoking a query task.
      adapter - - Windchill adapter instance name to be used when executing a info*engine webject.
      Throws:
      ESIRendererException - - if any exception thrown by an ESIRenderer.
    • areLineNumbersEnforced

      protected boolean areLineNumbersEnforced()
      getter for enforceLineNumbers attribute.

      Supported API: true
      Overrides:
      areLineNumbersEnforced in class ESIBOMSubordinateRenderer
      Returns:
      boolean