Class ESIResourceRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.mpml.resource.ESIResourceRenderer
All Implemented Interfaces:
ESIRenderer

public class ESIResourceRenderer extends BasicESIRenderer
Renders MPMResource objects. Invokes ESISkillRenderer, ESIProcessMaterialRenderer, ESIToolingRenderer, ESIPlantStructureRenderer, ESIResourceGroupStructureRenderer and ESIWorkCenterRenderer for Skill, process material, tool, plant, resource group and work center respectively.

Supported API: true

Extendable: true
  • Method Details

    • getRoot

      @Deprecated protected MPMOperationHolder getRoot()
      Deprecated.


      Supported API: true
      Gets the value of the attribute: root.
      Returns:
      MPMProcessPlan
    • setRoot

      @Deprecated protected void setRoot(MPMOperationHolder a_Root) throws WTPropertyVetoException
      Deprecated.


      Supported API: true
      Sets the value of the attribute: root.
      Parameters:
      a_Root - input root.
      Throws:
      WTPropertyVetoException - if setRoot methods throws WTPropertyVetoException exception.
    • setRoot

      protected void setRoot(Persistable root)
      Sets the value of the attribute: root.

      Supported API: true
      Parameters:
      root - - The root object could be process plan or part in the context of which resources publication is triggerd
    • getRootObject

      protected Persistable getRootObject()
      Gets the value of the attribute: root.

      Supported API: true
      Returns:
      -The root object that could be process plan or part in the context of which resources publication is triggerd.
    • getResources

      protected Collection<MPMResource> getResources()
      Gets the value of the attribute: resources.

      Supported API: true
      Returns:
      Collection
    • isDocuments

      protected boolean isDocuments()
      Gets the value of the attribute: documents.

      Supported API: true
      Returns:
      boolean
    • getAuth

      protected String getAuth()
      Gets the value of the attribute: auth.

      Supported API: true
      Overrides:
      getAuth in class BasicESIRenderer
      Returns:
      String
    • getWcAdapter

      protected String getWcAdapter()
      Gets the value of the attribute: wcAdapter.

      Supported API: true
      Returns:
      String
    • getTransactionID

      protected int getTransactionID()
      Gets the value of the attribute: transactionID.

      Supported API: true
      Returns:
      int
    • getLevels

      protected int getLevels()
      Gets the value of the attribute: levels.

      Supported API: true
      Returns:
      int
    • isDelta

      protected boolean isDelta()
      Gets the value of the attribute: delta.

      Supported API: true
      Returns:
      boolean
    • buildGroups

      protected void buildGroups() throws ESIRendererException
      Output generator for the class. Does the following:
      1. Separates the resources into collections of homogeneous resource types.
      2. Invokes the appropriate renderer for each of these resource types


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

      public void setData(Persistable root, MPMOperation operation, MPMResource resource, Collection<MPMResource> operationResources, Collection<ESITargetAssociation> tgtAssocs, boolean buildDocs, boolean delta, int levels, TreeNavigator treeNavigator, String auth, String wcAdapter, String transactionID)
      Establish the renderer's state so that it can process requests. This API is invoked when rendering resources that are associated to an operation in a process plan.

      Supported API: true
      Parameters:
      root - - The top level process plan/part being rendered.
      operation - - The operation that is using the resources.
      resource - - The resource to be rendered. This would be null when the resource is being published as part of a Process Plan. This will have a value when a resource structure is rendered, and will hold the parent resource object such as Plant, ResourceGroup, Tool, Skill etc.
      operationResources - - Collection of resources to be rendered. This would be null when the resource is a standalone object.
      tgtAssocs - - Collection of target associations.
      buildDocs - - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      delta - - If "true", returns only the changes since the last successful export. Default is "true".
      levels - - Number of levels to be navigated.
      treeNavigator - - Tree Navigator instance if the structure is already navigated by some other renderer.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction.
    • setData

      public void setData(Persistable root, MPMControlCharacteristic standardCC, MPMResource resource, Collection<MPMResource> operationResources, Collection<ESITargetAssociation> tgtAssocs, boolean buildDocs, boolean delta, TreeNavigator treeNavigator, int levels, String auth, String wcAdapter, String transactionID)
      Establish the renderer's state so that it can process requests. This API is invoked when rendering resources that are associated to an operation in a process plan.

      Supported API: true
      Parameters:
      root - - The top level process plan/part being rendered.
      resource - - The resource to be rendered. This would be null when the resource is being published as part of a Process Plan. This will have a value when a resource structure is rendered, and will hold the parent resource object such as Plant, ResourceGroup, Tool, Skill etc.
      operationResources - - Collection of resources to be rendered. This would be null when the resource is a standalone object.
      tgtAssocs - - Collection of target associations.
      buildDocs - - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      delta - - If "true", returns only the changes since the last successful export. Default is "true".
      treeNavigator - - Tree Navigator instance if the structure is already navigated by some other renderer.
      levels - - Number of levels to be navigated.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction.
      operation - - The operation that is using the resources.
    • setData

      public void setData(MPMOperationHolder root, MPMResource resource, Collection<MPMResource> operationResources, Collection<ESITargetAssociation> tgtAssocs, boolean buildDocs, String auth, String wcAdapter, String transactionID)
      Establish the renderer's state so that it can process requests. This API is invoked when rendering resources that are associated to an operation in a process plan.

      Supported API: true
      Parameters:
      root - - The top level process plan being rendered.
      resource - - The resource to be rendered. This would be null when the resource is being published as part of a Process Plan.
      operationResources - - Collection of resources to be rendered. This would be null when the resource is a standalone object.
      tgtAssocs - - Collection of target associations.
      buildDocs - - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction.
    • setData

      public void setData(MPMResource resource, boolean buildDocs, String auth, String wcAdapter, String transactionID)
      Establish the renderer's state so that it can process requests. This API is invoked when publishing a standalone resource.

      Supported API: true
      Parameters:
      resource - - The resource to be rendered.
      buildDocs - - Specifies whether or not documents associated with the resource are to be returned by the renderer.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction..
    • getResource

      public com.infoengine.object.IeCollection getResource(String obid, boolean buildDocs, String auth, String wcAdapter, String transactionID) throws WTException
      Deprecated.
      Use getResource(String, ESITransaction, Collection<ESITarget>, String, String, boolean) instead.
      GetResource RPC processor for a manufacturing resource such as tooling, process material or skill.

      Supported API: true
      Parameters:
      obid - input object id.
      buildDocs - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      auth - Info*Engine authentication information.
      wcAdapter - Windchill adapter instance name to use when executing a webject.
      transactionID - ID of the underlying ESI transaction.
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getResource

      public void getResource(MPMOperationHolder root, Collection<MPMResource> operationResources, Collection<ESITargetAssociation> tgtAssocs, boolean buildDocs, String auth, String wcAdapter, String transactionID, VdbBuilder builder) throws WTException
      This overloaded API would get called from the ESIOperationRenderer if the resource flag is "true".

      Supported API: true
      Parameters:
      root - the mpmoperation holder
      operationResources - collection of mpm resource.
      tgtAssocs - collection of target association.
      buildDocs - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      auth - Info*Engine authentication information.
      wcAdapter - Windchill adapter instance name to use when executing a webject.
      transactionID - ID of the underlying ESI transaction.
      builder - primary business object in the given release.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getResource

      public void getResource(MPMOperationHolder root, MPMOperation operation, Collection<MPMResource> operationResources, Collection<ESITargetAssociation> tgtAssocs, boolean buildDocs, String auth, String wcAdapter, String transactionID, VdbBuilder builder) throws WTException
      This overloaded API would get called from the ESIOperationRenderer if the resource flag is "true".

      Supported API: true
      Parameters:
      root - - The top level process plan being rendered.
      operation - - The operation which is consuming the resources available in the collection "operationResources".
      operationResources - - Collection of resources.
      tgtAssocs - - Collection of target associations.
      buildDocs - - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction.
      builder - - vdb builder instance.
      Throws:
      WTException - thrown wt exception if any during get resource.
    • getResource

      public void getResource(Persistable root, MPMOperation operation, MPMResource parentResource, Collection<MPMResource> operationResources, Collection<ESITargetAssociation> tgtAssocs, boolean buildDocs, TreeNavigator treeNavigator, String auth, String wcAdapter, String transactionID, VdbBuilder builder) throws WTException
      This overloaded API would get called from the ESIOperationRenderer if the resource flag is "true".

      Supported API: true
      Parameters:
      root - - The top level process plan/part being rendered.
      operation - - The operation which is consuming the resources available in the collection "operationResources".
      parentResource - - The parent resouce of resources to be rendered.
      operationResources - - Collection of resources.
      tgtAssocs - - Collection of target associations.
      buildDocs - - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      treeNavigator - - Navigator instance which holds all the navigated structure data.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction.
      builder - - VdbBuilder instance.
      Throws:
      WTException - thrown wt exception if any during get resource.
    • getResource

      public void getResource(Persistable root, MPMControlCharacteristic standardCC, MPMResource parentResource, Collection<MPMResource> operationResources, Collection<ESITargetAssociation> tgtAssocs, boolean buildDocs, String auth, String wcAdapter, String transactionID, VdbBuilder builder) throws WTException
      This overloaded API would get called from the ESIOperationRenderer if the resource flag is "true".

      Supported API: true
      Parameters:
      root - - The top level process plan/part being rendered.
      parentResource - - The parent resouce of resources to be rendered.
      operationResources - - Collection of resources.
      tgtAssocs - - Collection of target associations.
      buildDocs - - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      auth - - Info*Engine authentication information to use when executing a query task.
      wcAdapter - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction.
      builder - - VdbBuilder instance.
      operation - - The operation which is consuming the resources available in the collection "operationResources".
      treeNavigator - - Navigator instance which holds all the navigated structure data.
      Throws:
      WTException - thrown wt exception if any during get resource.
    • setOperation

      protected void setOperation(MPMOperation operation)
      Sets the operation which is consuming the resources being rendered.

      Supported API: true
      Parameters:
      operation - - operation
    • getOperation

      protected MPMOperation getOperation()
      Returns the operation which is consuming the resources being rendered.

      Supported API: true
      Returns:
      the operation which is consuming the resources being rendered.
    • getResource

      public void getResource(Collection<MPMResource> resources, boolean buildDocs, String auth, String wcAdapter, String transactionID, VdbBuilder builder) throws WTException
      This overloaded version would be invoked from ESIWTChangeOrder2Renderer.buildDetail() for any of the stand alone resources that may figure in the resulting objects list of a Change Notice.

      Supported API: true
      Parameters:
      resources - Collection of manufacturing resources to be processed.
      buildDocs - Specifies whether or not documents associated to a resource are to be returned.
      auth - Authentication information to use when executing Windchill adapter webjects.
      wcAdapter - Name of the Windchill adapter instance.
      transactionID - ID of the underlying ESI transaction.
      builder - VdbBuilder instance to use for storing the output.
      Throws:
      WTException - if any of the invoked methods threw this exception.
    • getResource

      public void getResource(Releasable resource, boolean buildDocs, String auth, String wcAdapter, String transactionID) throws WTException
      Deprecated.
      Use getResource(String, ESITransaction, Collection<ESITarget>, String, String, boolean) instead.
      Overloaded version that takes in a Releasable instead of an object ID.

      Supported API: true
      Parameters:
      resource - Collection of manufacturing resources to be processed.
      buildDocs - Specifies whether or not documents associated to a resource are to be returned.
      auth - Authentication information to use when executing Windchill adapter webjects.
      wcAdapter - Name of the Windchill adapter instance.
      transactionID - ID of the underlying ESI transaction.
      Throws:
      WTException - if any of the invoked methods threw this exception.
    • validate

      protected void validate() throws ESIRendererException
      Force all subclasses to implement the method. The concrete method is expected to examine the attributes of the object and throw an exception if they are not set properly.

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

      public com.infoengine.object.IeCollection getResource(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs) throws WTException
      Creates a VdbBuilder instance for the input transaction, renders the input resource and creates release activities as appropriate for each of the distribution targets in tgts. The settings pertaining to ESI response generation for a given distribution target are fetched from the target itself. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Parameters:
      objectID - UFID of the resource (tooling, process material or skill) to be rendered.
      txn - ESITransaction object that represents the delivery of data to the distribution targets in tgts; will be null when the method is invoked for the Preview functionality.
      tgts - Collection of distribution targets that represent a given destination, such as an ERP instance.
      auth - This parameter contains authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      wcAdapter - This parameter contains the name of the Windchill adapter instance.
      useECNDTAttrs - If true, the distribution target attribute Publish Related Documents that figures in the ECN Settings section will be used for the response generation; otherwise, the corresponding attribute in the Resource Settings section will be used. For example, a true will be passed for this parameter when the method is invoked for the Preview functionality and the preference "Automatically Generate Change Notice" has a value "Yes".
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - - if any of the invoked methods throws this exception.
    • getResource

      public void getResource(MPMOperationHolder root, MPMResource mpmResource, boolean delta, int multilevel, boolean buildDocs, String authentication, String adapterName, String transactionID, VdbBuilder builder) throws ESIRendererException
      This overloaded API would get called from the ESIProcessPlanRenderer.

      Supported API: true
      Parameters:
      root - - The top level process plan being rendered.
      mpmResource - - Related resource.
      delta - - If "true", returns only the changes since the last successful export. Default is "true".
      multilevel - - Number of levels to be navigated.
      buildDocs - - Specifies whether or not documents associated with the resource(s) are to be returned by the renderer.
      authentication - - Info*Engine authentication information to use when executing a query task.
      adapterName - - Windchill adapter instance name to use when executing a webject
      transactionID - - ID of the underlying ESI transaction.
      builder - - vdb builder instance.
      operation - - The operation which is consuming the resources available in the collection "operationResources".
      Throws:
      ESIRendererException