Class ESIControlCharacteristicRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.mpml.pmi.ESIControlCharacteristicRenderer
All Implemented Interfaces:
ESIRenderer, com.ptc.windchill.esi.translation.ESITranslationRenderer

public class ESIControlCharacteristicRenderer extends BasicESIRenderer implements com.ptc.windchill.esi.translation.ESITranslationRenderer
Renderers MPMControlCharacteristic objects.

Supported API: true

Extendable: true
  • Method Details

    • renderControlCharacteristics

      public void renderControlCharacteristics(WTPart part, WTPart previousExportedIteration, String auth, String wcAdapter, VdbBuilder builder) throws WTException
      Compares the control characteristics that are associated with the part and its previous successfully published iteration and renders them appropriately as added, deleted, changed and unchanged objects.

      If the argument previousExportedIteration is null, then all the part quality links associated with the input part will be rendered as added objects.

      Delegates the work to the API renderControlCharacteristics(Persistable, Map[], String, String, VdbBuilder)

      Supported API: true

      Parameters:
      part - - Control characteristics associated with this part will be rendered into the response.
      previousExportedIteration - - Previous successfully published iteration of the part. A null should be passed in when the input part is published for the first time.
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the control characteristics data.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • renderStandardControlCharacteristics

      public void renderStandardControlCharacteristics(WTPart part, WTPart previousExportedIteration, String auth, String wcAdapter, VdbBuilder builder) throws WTException
      Compares the control characteristics that are associated with the part and its previous successfully published iteration and renders them appropriately as added, deleted, changed and unchanged objects.

      If the argument previousExportedIteration is null, then all the part quality links associated with the input part will be rendered as added objects.

      Delegates the work to the API renderStandardControlCharacteristics(Persistable, Map[], String, String, VdbBuilder)

      Supported API: true

      Parameters:
      part - - Control characteristics associated with this part will be rendered into the response.
      previousExportedIteration - - Previous successfully published iteration of the part. A null should be passed in when the input part is published for the first time.
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the control characteristics data.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • renderStandardControlCharacteristics

      public void renderStandardControlCharacteristics(Persistable root, Map<AssociativeToSCCLink,MPMControlCharacteristic>[] deltaLinksToSCCMap, String auth, String wcAdapter, VdbBuilder builder) throws WTException
      Renders all the MPMQualityLink and MPMControlCharacteristic objects available in the input argument deltaLinksToCCMap appropriately.

      The input argument deltaLinksToCCMap is expected to have quality links and corresponding control characteristics in the order index: 0 - added quality links and corresponding control characteristics, 1 - deleted quality links and corresponding control characteristics, 2 - changed quality links and corresponding control characteristics, 3 - unchanged quality links and corresponding control characteristics.

      Internally invokes the renderer ESIQualityLinkRenderer to render the quality links.

      Supported API: true

      Parameters:
      root - - Control characteristics associated with this object will be rendered into the response. This object can be a Part, process plan.
      deltaLinksToSCCMap - - MPMQualityLink and corresponding MPMControlCharacteristic objects that are associated with the input persistable object. 0th index in this array contains all the newly added MPMQualityLink and their MPMControlCharacteristic objects. index 1 - deleted, 2- changed, 3- unchanged links and corresponding MPMControlCharacteristic objects.
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the control characteristics data.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • renderControlCharacteristics

      public void renderControlCharacteristics(Persistable root, Map<com.ptc.windchill.mpml.pmi.MPMQualityLink,MPMControlCharacteristic>[] deltaLinksToCCMap, String auth, String wcAdapter, VdbBuilder builder) throws WTException
      Deprecated.


      Supported API: true

      Renders all the MPMQualityLink and MPMControlCharacteristic objects available in the input argument deltaLinksToCCMap appropriately.

      The input argument deltaLinksToCCMap is expected to have quality links and corresponding control characteristics in the order index: 0 - added quality links and corresponding control characteristics, 1 - deleted quality links and corresponding control characteristics, 2 - changed quality links and corresponding control characteristics, 3 - unchanged quality links and corresponding control characteristics.

      Internally invokes the renderer ESIQualityLinkRenderer to render the quality links.

      Parameters:
      root - - Control characteristics associated with this object will be rendered into the response. This object can be a Part, process plan.
      deltaLinksToCCMap - - MPMQualityLink and corresponding MPMControlCharacteristic objects that are associated with the input persistable object. 0th index in this array contains all the newly added MPMQualityLink and their MPMControlCharacteristic objects. index 1 - deleted, 2- changed, 3- unchanged links and corresponding MPMControlCharacteristic objects.
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the control characteristics data.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • renderControlCharacteristics

      public void renderControlCharacteristics(MPMOperation operation, Map<com.ptc.windchill.mpml.pmi.MPMOperationQualityLink,MPMControlCharacteristic>[] deltaLinksToCCMap, Map<Persistable,ArrayList<MPMControlCharacteristic>> owners_to_ccs_map, String auth, String adapterName, VdbBuilder builder) throws ESIRendererException, WTException
      Deprecated.

      Supported API: true

      Renders all the MPMOperationQualityLink and MPMControlCharacteristic objects available in the input argument deltaLinksToCCMap appropriately.

      The input argument deltaLinksToCCMap is expected to have operation quality links and corresponding control characteristics in the order index: 0 - added operation quality links and corresponding control characteristics, 1 - deleted operation quality links and corresponding control characteristics, 2 - changed operation quality links and corresponding control characteristics, 3 - unchanged operation quality links and corresponding control characteristics.

      Internally invokes the renderer ESIQualityLinkRenderer to render the quality links.

      Parameters:
      operation - - parent of all the operation quality links and corresponding control characteristics available in the input map "deltaLinksToCCMap".
      deltaLinksToCCMap - - MPMOperationQualityLink and corresponding MPMControlCharacteristic objects that are associated with the input operation. 0th index in this array contains all the newly added MPMOperationQualityLink and their MPMControlCharacteristic objects. index 1 - deleted, 2- changed, 3- unchanged links and corresponding MPMControlCharacteristic objects.
      owners_to_ccs_map - - A map of owner and control characteristics that it owns along with the links that connect control characteristics to the owner. This map is expected to contain the control characteristics that are consumed by the input operation.
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      adapterName - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the control characteristics data.
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.
      WTException - if any of the invoked methods throws this exception.
    • buildGroups

      protected void buildGroups() throws ESIRendererException
      Builds the added, changed and unchanged groups of control characteristics and renders corresponding model items also. Delegates the work to the API buildAGroup(java.lang.String, java.util.Collection<com.ptc.windchill.mpml.pmi.MPMControlCharacteristic>, java.util.Collection<com.ptc.windchill.esi.tgt.ESITarget>)to build these groups.

      Supported API: true

      Specified by:
      buildGroups in class BasicESIRenderer
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.
    • adjustModelItemElement

      public com.infoengine.object.factory.Element adjustModelItemElement(com.infoengine.object.factory.Element elem, String groupName, ModelItem modelItem, GraphicData graphicData, MPMControlCharacteristic controlCharacteristic, Collection targets) throws ESIRendererException
      Allow subclasses to fix the contents of a model item element before it is 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.
      modelItem - - Model Item.
      graphicData - - GraphicData object which has getter/setter methods to get the data of this model item.
      controlCharacteristic - - Associated MPMControlCharacteristic object.
      targets - - Collection of ESITarget objects.
      Returns:
      Element
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.
    • adjustControlCharacteristicElement

      public com.infoengine.object.factory.Element adjustControlCharacteristicElement(com.infoengine.object.factory.Element elem, String groupName, MPMControlCharacteristic controlCharacteristic, ModelItem modelItem, Collection targets) throws ESIRendererException
      Allow subclasses to fix the contents of control characteristic element before it is 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.
      controlCharacteristic - - control characteristic
      modelItem - - Model Item.
      targets - - Collection of ESITarget objects.
      Returns:
      Element
      Throws:
      ESIRendererException - if any exception thrown by an ESIRenderer.
    • validate

      protected void validate() throws ESIRendererException
      Validates the attributes which are required for this renderer to execute properly.

      Supported API: true

      Specified by:
      validate in class BasicESIRenderer
      Throws:
      ESIRendererException
    • setData

      public void setData(Persistable root, Set<MPMControlCharacteristic> controlCharacteristics, Map<Persistable,Map<MPMControlCharacteristic,com.ptc.windchill.mpml.pmi.MPMQualityLink>> ownerToCCLinksMap, String auth, String wcAdapter, VdbBuilder builder) throws WTException
      Deprecated.


      Supported API: true

      Sets the state of this renderer appropriately.
      Parameters:
      root - - A persistable object whose associated control characteristics have to be rendered in to the response. This object can be a Part, process plan or an operation.
      controlCharacteristics - - Set of control characteristics which are associated with the input persistable object.
      ownerToCCLinksMap - - Map between the owner of the control characteristics and a Map of control characteristics to corresponding quality link. Used to get the model item attributes using the API PMIService.getModelItemRelatedInformation(Map, wt.filter.NavigationCriteria)
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the response data.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(Persistable root, Set<MPMControlCharacteristic> stdcontrolCharacteristics, String auth, String wcAdapter, VdbBuilder builder) throws WTException
      Sets the state of this renderer appropriately.

      Supported API: true

      Parameters:
      root - - A persistable object whose associated control characteristics have to be rendered in to the response. This object can be a Part, process plan or an operation.
      stdcontrolCharacteristics - - Set of control characteristics which are associated with the input persistable object.
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the response data.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(Persistable root, Set<MPMControlCharacteristic> stdcontrolCharacteristics, boolean document, String auth, String wcAdapter, VdbBuilder builder, int transactionId, MPMProcessPlan processPlan, int subOperationDepth, boolean deltaflag, boolean resource, boolean standardProcedures, boolean workInstruction, boolean lineNumbers, boolean operatedOnPart, String configSpec, ViewReference defaultView) throws WTException
      Sets the state of this renderer appropriately.

      Supported API: true

      Parameters:
      root - - A persistable object whose associated control characteristics have to be rendered in to the response. This object can be a Part, process plan or an operation.
      stdcontrolCharacteristics - - Set of control characteristics which are associated with the input persistable object.
      document - - Specifies whether the document associated with the process plan need to be published.
      auth - - Authentication to be used while fetching the corresponding info engine elements of the control characteristics to be rendered.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      builder - - VdbBuilder instance to be populated with the response data.
      transactionId - - ID of the underlying ESI transaction.
      processPlan - - Process Plan
      subOperationDepth - - Specifies the depth up to which sub-operations in an operation should be published.
      deltaflag - - If false, renders the entire process plan as new; else renders the difference between the current and previously published iterations.
      resource - - Specifies whether the Resource associated with the process plan need to be published.
      standardProcedures - - Indicates if the associated Standard Procedures are to be rendered.
      workInstruction - - Specifies whether the work instruction associated with the process plan need to be published.
      lineNumbers - - If true, returns line numbers info; no line numbers info otherwise.
      operatedOnPart - - Specifies whether the Operated on part associated with the process plan need to be published.
      configSpec - - Config Spec
      defaultView - - Specifies view associated with the process plan.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getWcAdapter

      @Deprecated public String getWcAdapter()
      Deprecated.
      Use BasicESIRenderer.getAdapterName() instead.

      Supported API: true
      Returns the value of the attribute adapterName. This attribute holds the name of the Windchill Adapter instance where the Query-Objects webject is to be executed.
      Returns:
      The value stored in the field adapterName.
    • isDocument

      protected boolean isDocument()
      Gets the value of the attribute: document.

      Supported API: true
      Returns:
      boolean
    • isResource

      protected boolean isResource()
      Gets the value of the attribute: resource.

      Supported API: true
      Returns:
      boolean