Class ESIMPMLDifferenceManagementDelegateImpl

java.lang.Object
com.ptc.windchill.esi.mpml.delegate.ESIMPMLDifferenceManagementDelegateImpl
All Implemented Interfaces:
ESIMPMLDifferenceManagementDelegate

public class ESIMPMLDifferenceManagementDelegateImpl extends Object implements ESIMPMLDifferenceManagementDelegate
Provides services which can used for customizing the difference calculation of MPML Objects.

Supported API: true

Extendable: true
  • Method Details

    • compareMPMProcessPlan

      public HashMap compareMPMProcessPlan(MPMProcessPlan currentIteration, MPMProcessPlan previousIteration) throws WTException
      Compares two iterations of a process plan. This method internally invokes the object comparison frame work.

      Supported API: true
      Specified by:
      compareMPMProcessPlan in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentIteration - Current iteration of a process plan.
      previousIteration - Previous iteration of a process plan.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to the hash map object which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList")on the output hash map object returns another hash map which holds the attribute differences
      2. get("LinksDifferenceList") on the output hash map object returns another hash map which holds link differences.
      Throws:
      WTException - if any of the invoked methods throws this exception during iterations compare.
    • compareMPMProcessPlan

      public HashMap compareMPMProcessPlan(MPMProcessPlan currentIteration, MPMProcessPlan previousIteration, Set linksTocompute) throws WTException
      Compares two iterations of a process plan. This method internally invokes the object comparison frame work.

      Supported API: true
      Specified by:
      compareMPMProcessPlan in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentIteration - Current iteration of a process plan.
      previousIteration - Previous iteration of a process plan.
      linksTocompute - Links to compute
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to the hash map object which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList")on the output hash map object returns another hash map which holds the attribute differences
      2. get("LinksDifferenceList") on the output hash map object returns another hash map which holds link differences.
      Throws:
      WTException - if any of the invoked methods throws this exception during iterations compare.
    • compareMPMOperation

      public HashMap compareMPMOperation(MPMOperation currentIteration, MPMOperation previousIteration, VdbBuilder builder) throws WTException
      Compares two iterations of an operation. This method internally invokes the object comparison frame work.

      Supported API: true
      Specified by:
      compareMPMOperation in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentIteration - Current iteration of an operation .
      previousIteration - Previous iteration of an operation.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to the hash map object which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList")on the output hash map object returns another hash map which holds the attribute differences
      2. get("LinksDifferenceList") on the output hash map object returns another hash map which holds link differences.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareMPMOperation

      public HashMap compareMPMOperation(MPMOperation currentIteration, MPMOperation previousIteration, VdbBuilder builder, Set links) throws WTException
      Compares two iterations of an operation. This method internally invokes the object comparison frame work. It will compare only those links which are passed in argument other links will be ignored.

      Supported API: true
      Specified by:
      compareMPMOperation in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentIteration - Current iteration of an operation .
      previousIteration - Previous iteration of an operation.
      builder - VdbBuilder
      links - Link to be compared
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to the hash map object which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList")on the output hash map object returns another hash map which holds the attribute differences
      2. get("LinksDifferenceList") on the output hash map object returns another hash map which holds link differences.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareMPMStandardCC

      public HashMap compareMPMStandardCC(MPMControlCharacteristic currentIteration, MPMControlCharacteristic previousIteration) throws WTException
      Compares two iterations of a standard CC. This method internally invokes the object comparison frame work.

      Supported API: true
      Specified by:
      compareMPMStandardCC in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentIteration - Current iteration of SCC .
      previousIteration - Previous iteration of SCC.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to the hash map object which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList")on the output hash map object returns another hash map which holds the attribute differences
      2. get("LinksDifferenceList") on the output hash map object returns another hash map which holds link differences.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareMPMSequence

      public HashMap compareMPMSequence(MPMSequence currentIteration, MPMSequence previousIteration) throws WTException
      Compares two iterations of a sequence. This method internally invokes the object comparison frame work.

      Supported API: true
      Specified by:
      compareMPMSequence in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentIteration - Current iteration of a sequence.
      previousIteration - Previous iteration of a sequence.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to the hash map object which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList")on the output hash map object returns another hash map which holds the attribute differences
      2. get("LinksDifferenceList") on the output hash map object returns another hash map which holds link differences.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareWTPartsForCCLinks

      public HashMap compareWTPartsForCCLinks(Persistable currentObj, Persistable previousObj) throws WTException
      Compares two iterations of a WTPart. This method internally invokes the object comparison frame work.

      Supported API: true

      Specified by:
      compareWTPartsForCCLinks in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentObj - - Current iteration of a WTPart.
      previousObj - - Previous iteration of a WTPart.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to an array of HashSet objects which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList") on the output hash map object returns another hash map which holds the attribute differences. Key of the value map is fully qualified name of the link and the value is a HashMap with key as <Role B object master identifier>_<attribute name> and the value is the old value of the attribute. Check the method ESIObjectComparisonUtility.computeAttrDifferences(ComparisonResult) for more information.

      2. get("LinksDifferenceList") on the output hash map object returns an array of HashSet objects.
      HashSet at index 0 holds all the added MPMPartQualityLink objects.
      Index-1 : deleted MPMPartQualityLink objects,
      Index-2: changed MPMPartQualityLink objects,
      Index-3: Unchanged MPMPartQualityLink objects

      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareWTPartsForSCCLinks

      public HashMap compareWTPartsForSCCLinks(Persistable currentObj, Persistable previousObj, VdbBuilder builder) throws WTException
      Compares two iterations of a WTPart. This method internally invokes the object comparison frame work.

      Supported API: true

      Specified by:
      compareWTPartsForSCCLinks in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentObj - - Current iteration of a WTPart.
      previousObj - - Previous iteration of a WTPart.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to an array of HashSet objects which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList") on the output hash map object returns another hash map which holds the attribute differences. Key of the value map is fully qualified name of the link and the value is a HashMap with key as <Role B object master identifier>_<attribute name> and the value is the old value of the attribute. Check the method ESIObjectComparisonUtility.computeAttrDifferences(ComparisonResult) for more information.

      2. get("LinksDifferenceList") on the output hash map object returns an array of HashSet objects.
      HashSet at index 0 holds all the added MPMPartQualityLink objects.
      Index-1 : deleted MPMPartQualityLink objects,
      Index-2: changed MPMPartQualityLink objects,
      Index-3: Unchanged MPMPartQualityLink objects

      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareMPMResource

      public Map<String,Object> compareMPMResource(MPMResource currentObj, MPMResource previousObj) throws WTException
      Compares two iterations of an MPMResource. This method internally invokes the object comparison frame work.

      Supported API: true

      Specified by:
      compareMPMResource in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentObj - - Current iteration of a resource.
      previousObj - - Previous iteration of a resource.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to an array of HashSet objects which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList") on the output hash map object returns another hash map which holds the attribute differences. Key of the value map is fully qualified name of the link and the value is a HashMap with key as <Role B object master identifier>_<attribute name> and the value is the old value of the attribute. Check the method ESIObjectComparisonUtility.computeAttrDifferences(ComparisonResult) for more information.

      2. get("LinksDifferenceList") on the output hash map object returns an array of HashSet objects.
      HashSet at index 0 holds all the added WTPartUsageLink objects.
      Index-1 : deleted WTPartUsageLink objects,
      Index-2: changed WTPartUsageLink objects,
      Index-3: Unchanged WTPartUsageLink objects

      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareMPMStandardCCUsageLinks

      public HashMap compareMPMStandardCCUsageLinks(MPMOperationToStandardCCLink currentLink, MPMOperationToStandardCCLink previousLink) throws WTException
      Compares two operation to standard CC links. This method internally invokes the object comparison frame work.

      Supported API: true

      Specified by:
      compareMPMStandardCCUsageLinks in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentObj - - Current Operation to standard CC link.
      previousObj - - Previously published Operation to standard CC link.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the attribute and link differences in two separate hash maps.
      1. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      2. Key "LinksDifferenceList" is mapped to an array of HashSet objects which holds the link differences.

      In other words,

      1. get("AttributeDifferenceList") on the output hash map object returns another hash map which holds the attribute differences. Key of the value map is fully qualified name of the link and the value is a HashMap with key as <Role B object master identifier>_<attribute name> and the value is the old value of the attribute. Check the method ESIObjectComparisonUtility.computeAttrDifferences(ComparisonResult) for more information.

      2. get("LinksDifferenceList") on the output hash map object returns an array of HashSet objects.
      HashSet at index 0 holds all the added MPMOperationToStandardCCLink objects.
      Index-1 : deleted MPMOperationToStandardCCLink objects,
      Index-2: changed MPMOperationToStandardCCLink objects,
      Index-3: Unchanged MPMOperationToStandardCCLink objects

      Throws:
      WTException - if any of the invoked methods throws this exception.
    • compareProductionVersion

      public HashMap compareProductionVersion(wt.mpm.routing.WCRoutingPlan currentIteration, wt.mpm.routing.WCRoutingPlan previousIteration) throws WTException
      Compares two iterations of a production version. This method internally invokes the object comparison frame work.

      Supported API: true
      Specified by:
      compareProductionVersion in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      currentIteration - Current iteration of a production version.
      previousIteration - Previous iteration of a production version.
      Returns:
      Returns the comparison result in a java.util.HashMap. This HashMap object holds the link differences in Hashset.
      1. Key "LinksDifferenceList" is mapped to the hash set object which holds the link differences.

      2. Key "AttributeDifferenceList" is mapped to the hash map object which holds the attribute differences.
      In other words,

      1. get("LinksDifferenceList") on the output hash map object returns hash set which holds link differences. 2. get("AttributeDifferenceList")on the output hash map object returns another hash map which holds the attribute differences
      Throws:
      WTException - if any of the invoked methods throws this exception during iterations compare.
    • adjustProcessPlan

      public Optional<MPMProcessPlan> adjustProcessPlan(Iterated iteratableObject)
      If the user wants to change the processplan information than they can implement there own implementation in this method. That process plan information will get sent in response for the standalone operation publishing

      Supported API: true

      Specified by:
      adjustProcessPlan in interface ESIMPMLDifferenceManagementDelegate
      Parameters:
      iteratableObject - OperationHolder to fetch the ProcessPlan
      navigationCriteria - Navigation criteria
      Returns:
      Optional<MPMProcessPlan>