Interface Discrepancy2
- All Known Implementing Classes:
AbstractAssembleUnderDiscrepancy,AbstractAttributeDiscrepancy,AbstractDiscrepancy2,AddUsageDiscrepancy,AssociationDiscrepancy,ItemExpressionDiscrepancy,PartAttributeDiscrepancy,PlantDiscrepancy,RemovedUsageDiscrepancy,SCCDiscrepancy,SubcontractDiscrepancy,SubcontractPlantsWithBOMTransformationDiscrepancy,UsageAttributeDiscrepancy
public interface Discrepancy2
The interface to define the Its recommended to extend the
Supported API: true
Extendable: false
AbstractDiscrepancy2 which implements this
interface and provide default methodsSupported API: true
Extendable: false
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Supported API: true ADDED - Used to indicate that Discrepancy occured due to Addition REMOVED - Used to indicate that Discrepancy occured due to Removalstatic enumSupported API: true
UNKNOWN - this is just detected but no other details are known. -
Method Summary
Modifier and TypeMethodDescriptionGets the current value of discrepancy.The discrepant path having the given type of discrepancy.The message for the discrepancy.Gets the previous value of discrepancy.The paths which are updated after resolution of the discrepancy.Gives the status of the discrepancy.The message for the status.Target Paths are temp paths used by UI to highlight the target paths on downstream side.getType()Tells the type of discrepancy.
-
Method Details
-
getType
DiscrepancyType getType()Tells the type of discrepancy. Used to find the delegate and other calculations
Supported API: true- Returns:
DiscrepancyType
-
getDiscrepantPath
AssociativePath getDiscrepantPath()The discrepant path having the given type of discrepancy. This path can be a usage or occurrence path based on type of discrepancy. The delegate needs to understand this. This should be populated during the find/search of a discrepancy as this is mandatory for the resolution phase.
Supported API: true- Returns:
- - should never return null once discrepancy is found.
-
getResolvedPath
AssociativePath getResolvedPath()The paths which are updated after resolution of the discrepancy. This path can be a usage or occurrence path based on type of discrepancy. This is ideally populated during the resolution phase, but can be populated before as needed by delegates. OOTB implementation does not guarantee this being populate this during find/search phase.
Supported API: true- Returns:
- - should not return null once discrepancy is resolved, but before that mostly null
-
getTargetPaths
Collection<AssociativePath> getTargetPaths()Target Paths are temp paths used by UI to highlight the target paths on downstream side. The paths which will be updated after resolution of the discrepancy i.e target Path. This path can be a usage or occurrence path based on type of discrepancy. This is ideally populated during the verifier phase.
Supported API: true- Returns:
- - can be empty but never null.
-
getMessages
Collection<String> getMessages()The message for the discrepancy. Usually for reporting. These are not maintained or carried forward during find/search and then resolve. So ideally these should be reported after find/search and then after resolve.
Supported API: true- Returns:
- - never null
-
getStatus
Discrepancy2.Status getStatus()Gives the status of the discrepancy. If a discrepancy is already synced, the status isDiscrepancy2.Status.SYNCED. Also set a status messagegetStatusMessage()to describe the reason for the status for reporting purpose.
Supported API: true -
getStatusMessage
String getStatusMessage()The message for the status. This is usually used for reporting and UI.
Supported API: true- Returns:
- - return a message or empty string, but never null
-
getCurrentValue
Object getCurrentValue()Gets the current value of discrepancy. This can be different during search/find and resolve. Usually after resolve current value will be final value. Usually this is of interest just for reporting or UI. Its up-to the delegate to understand this and handle it. There should be a good toString implementation in case value is complex object.
Supported API: true- Returns:
- - can return null in some cases where there is no current value like 'Removed Part' case.
-
getPreviousValue
Object getPreviousValue()Gets the previous value of discrepancy. After resolution, this value will be same as current value before resolution. During find/search this maybe value from previous iteration/version/baseline. Usually this is of interest just for reporting or UI. Its up-to the delegate to understand this and handle it. There should be a good toString implementation in case value is complex object for reporting.
Supported API: true- Returns:
- - can return null in some cases where there is no previous value like 'Added Part' case.
-