Class StandardESIService

java.lang.Object
wt.services.StandardManager
com.ptc.windchill.esi.svc.StandardESIService
All Implemented Interfaces:
ESIService, ESISvrService, Serializable, wt.fc._NetFactor, NetFactor, wt.services.Manager

public class StandardESIService extends StandardManager implements ESIService, ESISvrService, Serializable
StandardESIService is a concrete implementation of ESIService and ESISvrService.

Use the newStandardESIService static factory method(s), not the StandardESIService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: true

See Also:
  • Method Details

    • performStartupProcess

      protected void performStartupProcess() throws ManagerException
      Prepare the Windchill Service to begin operations. This is a protected method that is called by the base class, StandardManager, start up processing. The method registers event listeners that:
      • Validate deletion of ESITransaction objects
      • Validate deletion of ESITarget objects
      • Validate deletion of WTPart objects
      • Copy target assignments when new iterations, versions, and view-versions of parts are created
      • Optionally, depending on ESI property settings, launch an ESI workflow when a lifecycle state change occurs.


      Supported API: true
      Overrides:
      performStartupProcess in class StandardManager
      Throws:
      ManagerException
    • getPart

      public com.infoengine.object.IeCollection getPart(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs) throws WTException
      Creates an ESIWTPartRenderer instance from an ESIRendererFactory instance and invokes the getPart() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Specified by:
      getPart in interface ESISvrService
      Parameters:
      objectID - UFID of the part 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, distribution target attributes with names beginning "ESIECN_" will be used for the response generation; otherwise, attributes with names beginning "ESIPart_" 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.
    • getPart

      public com.infoengine.object.IeCollection getPart(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs, Persistable enterpriseDataObj, Collection enterpriseDataObjects, Collection partObjects) throws WTException
      Creates an ESIWTPartRenderer instance from an ESIRendererFactory instance and invokes the getPart() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Specified by:
      getPart in interface ESISvrService
      Parameters:
      objectID - UFID of the part 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, distribution target attributes with names beginning "ESIECN_" will be used for the response generation; otherwise, attributes with names beginning "ESIPart_" 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".
      enterpriseDataObj - Enterprise Data object if publication is triggered by LCS change of ED
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - - if any of the invoked methods throws this exception.
    • getSmartCollection

      public com.infoengine.object.IeCollection getSmartCollection(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter) throws WTException
      Creates an ESISmartCollectionRenderer instance from an ESIRendererFactory instance and invokes the getSmartCollection() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Specified by:
      getSmartCollection in interface ESISvrService
      Parameters:
      objectID - UFID of the smart collection 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.
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - - if any of the invoked methods throws this exception.
    • getBOM

      public com.infoengine.object.IeCollection getBOM(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs) throws WTException
      Creates an ESIBOMRenderer instance from an ESIRendererFactory instance and invokes the getBOM() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Specified by:
      getBOM in interface ESISvrService
      Parameters:
      objectID - UFID of the assembly part 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, distribution target attributes with names beginning "ESIECN_" will be used for the response generation; otherwise, attributes with names beginning "ESIBOM_" 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.
    • getECN

      public com.infoengine.object.IeCollection getECN(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter) throws WTException
      Creates an ESIWTChangeOrder2Renderer instance from an ESIRendererFactory instance and invokes the getECN() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Specified by:
      getECN in interface ESISvrService
      Parameters:
      objectID - UFID of the Change Notice to be rendered.
      txn - ESITransaction object that represents the delivery of data to the distribution targets in tgts.
      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.
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - - if any of the invoked methods throws this exception.
    • getProcessPlan

      public com.infoengine.object.IeCollection getProcessPlan(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs) throws WTException
      Creates an ESIProcessPlanRenderer instance from an ESIRendererFactory instance and invokes the getProcessPlan() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller. Explicit usage of class ESIProcessPlanRenderer and method getProcessPlan() is avoided, since a user may choose to install ESI services but not MPMLink.

      Supported API: true
      Specified by:
      getProcessPlan in interface ESISvrService
      Parameters:
      objectID - UFID of the process plan 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, distribution target attributes with names beginning "ESIECN_" will be used for the response generation; otherwise, attributes with names beginning "ESIPP_" 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.
    • getOperation

      public com.infoengine.object.IeCollection getOperation(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs, Map<Persistable,Set<Persistable>> processPlansAssociatedtoOperation) throws WTException
      Creates an ESINewOperationRenderer instance from an ESIRendererFactory instance and invokes the getOperation() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller. Explicit usage of class ESINewOperationRenderer and method getOperation() is avoided, since a user may choose to install ESI services but not MPMLink.

      Supported API: true
      Specified by:
      getOperation in interface ESISvrService
      Parameters:
      objectID - UFID of the operation 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, distribution target attributes with names beginning "ESIECN_" will be used for the response generation; otherwise, attributes with names beginning "ESIPP_" 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".
      processPlansAssociatedtoOperation - Map that contains the associated PP and set of MPMOPerationHolder.
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - - if any of the invoked methods throws this exception.
    • getResource

      public com.infoengine.object.IeCollection getResource(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs) throws WTException
      Creates an ESIResourceRenderer instance from an ESIRendererFactory instance and invokes the getResource() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller. Explicit usage of class ESIResourceRenderer and method getResource() is avoided, since a user may choose to install ESI services but not MPMLink.

      Supported API: true
      Specified by:
      getResource in interface ESISvrService
      Parameters:
      objectID - UFID of the process plan 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 ESIECN_DocumentFlag will be used for the response generation; otherwise, the attribute ESIResource_DocumentFlag 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.
    • getEPMDocument

      public com.infoengine.object.IeCollection getEPMDocument(String objectID, ESITransaction txn, Collection<ESITarget> targets, Map<ESITarget,Map<String,Object>> paramMap, String auth, String wcAdapter) throws WTException
      Creates an ESIEPMDocumentRenderer instance from an ESIRendererFactory instance and invokes the getEPMDocument() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.
      Note: Currently as of 10.0.0.020 this API only supports the CAD Document object.

      Supported API: true
      Specified by:
      getEPMDocument in interface ESISvrService
      Parameters:
      objectID - - UFID of the header of the CAD document structure to be rendered.
      txn - - ESITransaction object that represents the delivery of data to the distribution targets in targets; will be null when the method is invoked for the Preview functionality.
      targets - - Collection of distribution targets that represent a given destination, such as an ERP instance.
      paramMap - - Map holding ESITarget objects as keys and certain Maps as values; each value Map holds the names of certain parameters (that are used for navigating the CAD document structure and for generating the ESI response) and their values. If a certain parameter is not found in the value Map, its value is fetched from the corresponding target.
      • The value Map holds the following parameter names as keys:
        • ESIEPMDocument_DeltaFlag - Specifies whether or not incremental changes to the CAD document structure need to be calculated; can take a value "true" or "false".
        • ESIEPMDocument_MultiLevelFlag - The number of levels in the CAD document structure to be rendered.
        • ESIEPMDocument_ContentSelection - The type of the content to be rendered. Valid values are denoted by the constants ESIConst.EPMDOC_ALLCONTENT, ESIConst.EPMDOC_CADCONTENT, ESIConst.EPMDOC_REPRESENTATIONS.
        • ESIEPMDocument_RepresentationCollectionFilter - Filter to be applied on representations. Any string is a valid value.
        • ESIEPMDocument_SavedFilter - Navigation criteria to be applied on the CAD structure.
        • ESIEPMDocument_UseDefaultRepresentations - Specifies whether or not to fetch only default representations.
      auth - - Authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      wcAdapter - - Name of the Windchill adapter instance.
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getDocument

      public com.infoengine.object.IeCollection getDocument(String objectID, ESITransaction txn, Collection<ESITarget> targets, String auth, String wcAdapter) throws WTException
      Creates an ESIDocumentsRenderer instance from an ESIRendererFactory instance and invokes the getDocument() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller. The method caters to both CAD documents (associated to non-DP distribution targets), and WTDocuments.

      Supported API: true
      Specified by:
      getDocument in interface ESISvrService
      Parameters:
      objectID - - UFID of the document to be rendered.
      txn - - ESITransaction object that represents the delivery of data to the distribution targets in targets; will be null when the method is invoked for the Preview functionality.
      targets - - Collection of distribution targets that represent a given destination, such as an ERP instance.
      auth - - Authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      wcAdapter - - Name of the Windchill adapter instance to use.
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getPromotionRequest

      public com.infoengine.object.IeCollection getPromotionRequest(String objectID, ESITransaction txn, Collection<ESITarget> targets, String auth) throws WTException
      Creates an ESIPromotionRequestRenderer instance from an ESIRendererFactory instance and invokes the getPromotionRequest() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Specified by:
      getPromotionRequest in interface ESISvrService
      Parameters:
      objectID - - UFID of the promotion request.
      txn - - ESITransaction object that represents the delivery of data to the distribution targets in tgts;
      targets - - 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.
      Returns:
      The Info*Engine collection that holds the ESI response.
      Throws:
      WTException
    • getOptionSet

      public com.infoengine.object.IeCollection getOptionSet(String objectID, ESITransaction txn, Collection<ESITarget> targets, Map<ESITarget,Map<String,Object>> paramMap, String auth) throws WTException
      Creates an OptionSetRenderer instance from an ESIRendererFactory instance and invokes the getOptionSet() API on the renderer instance as appropriate. Returns the rendered output as an Info*Engine collection to the caller.

      Supported API: true
      Specified by:
      getOptionSet in interface ESISvrService
      Parameters:
      objectID - - UFID of the option set.
      txn - - ESITransaction object that represents the delivery of data to the distribution targets in tgts;
      targets - - Collection of distribution targets that represent a given destination, such as an ERP instance.
      paramMap - - Map holding ESITarget objects as keys and Maps as values; Currently this is not being used by the out of the box code.
      auth - - This parameter contains authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      Returns:
      The Info*Engine collection that holds the ESI response.
      Throws:
      WTException