Class ReconciliationContext
java.lang.Object
com.ptc.windchill.associativity.reconciliation.AbstractReconciliationContext
com.ptc.windchill.associativity.reconciliation.ReconciliationContext
Bean to store common information required to find/verify/resolve discrepancies
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.ptc.windchill.associativity.reconciliation.AbstractReconciliationContext
applicationName -
Method Summary
Modifier and TypeMethodDescription
Supported API: trueReturns the specified change items.Returns the specified change context.This is string criteria coming from the client.Get the specified path forgetChangeItems()under thegetChangeContext().Returns the specified change items.Return the configured criteria to be used to build structure to compare with input.TheNavigationCriteriato be used to navigate the downstream structure for reconciliation.Returns the specified downstream change context.Returns the specified equivalent contexts in which reconciliation is going to work.getMode()Mostly for internal use, but this tells if the service call is for detection or for resolution.
Supported API: trueTheNavigationCriteriato be used to navigate the upstream structure for reconciliation.booleanTells if the reconciliation should work between given upstream and downstream structure.boolean
Supported API: trueboolean
Supported API: truevoidsetActionType(String actionType)
Supported API: truevoidsetChangeables(Collection<Persistable> changeables) Allows to specify the change items.voidsetChangeContext(Associative changeContext) Allows to specify the change context.voidsetChangeCriteria(String changeCriteria) This is string criteria coming from the client.voidsetChangeItemPaths(Collection<AssociativePath> changeItemPaths) Allows to specify path forgetChangeItems()under thegetChangeContext().voidsetChangeItems(Collection<Associative> changeItems) Allows to specify the change items.void
Supported API: true
voidsetCriteria(AbstractCriteria criteria) Allows specifying the criteria to be used.voidsetDnNavCriteria(NavigationCriteria dnNavCriteria) TheNavigationCriteriato be used to navigate the downstream structure for reconciliation.voidsetDownstreamContext(Associative downstreamContext) Allows to specified downstream change context.voidsetEquivalentContexts(Collection<AssociativePair> equivalentContexts) Allows to specify the equivalent context in which to limit the resolution for multi-equivalent use cases.voidvoidsetOccurenceMode(boolean isOccurenceMode)
Supported API: truevoidsetRuleMatching(boolean isRuleMatching)
Supported API: truevoidsetTargetPaths(List<AssociativePath> list)
Supported API: truevoidsetUpNavCriteria(NavigationCriteria upNavCriteria) TheNavigationCriteriato be used to navigate the upstream structure for reconciliation.Methods inherited from class com.ptc.windchill.associativity.reconciliation.AbstractReconciliationContext
addAdditionalParam, getAdditionalParam, getAllAdditionalParams, getAssociationCache, getLocale, isAutoCheckInEnabled, isUpdateEquivalentEnabled, setAllAdditionalParams, setApplicationName, setAssociationCache, setAutoCheckInEnabled, setLocale, setUpdateEquivalentEnabled
-
Method Details
-
getChangeContext
Returns the specified change context. This is usually the common parent under which all reconciliation needs to happen. Ideally should be nearest common parent for performance reasons.
Supported API: true- Returns:
- - ideally should never return null as this is mandatory.
-
setChangeContext
Allows to specify the change context. This is usually the common parent under which all reconciliation needs to happen. Ideally should be nearest common parent for performance reasons.
Supported API: true -
getDownstreamContext
Returns the specified downstream change context. This is usually the downstream equivalent of thegetChangeContext(). This is optional and if not provided, system tries to populate this using equivalence link.
Supported API: true- Returns:
- - can return null as this is not mandatory.
-
setDownstreamContext
Allows to specified downstream change context. This is usually the downstream equivalent of thegetChangeContext(). This is optional and if not provided, system tries to populate this using equivalence link. Ideally in case of multiple-downstream equivalent it may make sense to provide this and call the reconciliation for different downstream context in a loop.
Supported API: true -
getChangeItems
Returns the specified change items. This is the collection of parts which have changed under thegetChangeContext(). This should never be empty.
Supported API: true- Returns:
- - should never return null as this is mandatory.
-
getChangeables
Returns the specified change items. This is the collection of changeables which have changed.This should never be empty.
Supported API: true- Returns:
- - should never return null as this is mandatory.
-
setChangeItems
Allows to specify the change items. This is the collection of parts which have changed under thegetChangeContext(). This should never be empty.
Supported API: true
Supported API: true -
getEquivalentContexts
Returns the specified equivalent contexts in which reconciliation is going to work.
Supported API: true- Returns:
- - should never return null, but can be empty as is optional
-
setEquivalentContexts
Allows to specify the equivalent context in which to limit the resolution for multi-equivalent use cases. This is optional and needed for specific use cases where we wish to handle such use cases one by one.
Supported API: true -
setChangeables
Allows to specify the change items. This is the collection of Changeables which have changed This should never be empty.
Supported API: true -
getChangeItemPaths
Get the specified path forgetChangeItems()under thegetChangeContext(). this is usually provided when action is invoked from UI where we have path information. Helps in performance to not do a where-used to find the path. If not provided system calculates this information as this is needed to find the accountable paths for reconciliation.- Returns:
- - can return empty as this is optional, and usually is populated by service at point of need.
Supported API: true
-
setChangeItemPaths
Allows to specify path forgetChangeItems()under thegetChangeContext(). this is usually provided when action is invoked from UI where we have path information. Helps in performance to not do a where-used to find the path. If not provided system calculates this information as this is needed to find the accountable paths for reconciliation.
Supported API: true If path information is available, its desirable to provide that. -
getChangeCriteria
This is string criteria coming from the client. This is optional and if provided we call theReconciliationDelegate.populateChangeItemsFromChange(ReconciliationContext). OOTB this is number forWTChangeOrder2orWTChangeActivity2. But can be anything and handled in the delegate. Allows the service to derive the populategetChangeItems()from a change notice.
Supported API: true- Returns:
- - a string representation of criteria, can return null as this is optional.
-
setChangeCriteria
This is string criteria coming from the client. This is optional and if provided we call theReconciliationDelegate.populateChangeItemsFromChange(ReconciliationContext). OOTB this is number forWTChangeOrder2orWTChangeActivity2. But can be anything and handled in the delegate. Allows the service to derive the populategetChangeItems()from a change notice.
Supported API: true -
getCriteria
Return the configured criteria to be used to build structure to compare with input. This is again optional and OOTB we try to get the default criteria configured in the configuration. If none found, the last fall back is onOutOfDateCriteria
Supported API: true- Returns:
- - Configured criteria or default Out of date criteria
- Throws:
WTException
-
setCriteria
Allows specifying the criteria to be used. This is optional. refergetCriteria()for more.
Supported API: true- Parameters:
criteria-- Throws:
WTException
-
getMode
Mostly for internal use, but this tells if the service call is for detection or for resolution. This is typically needed for building the JSON for discrepancies found based on the phase of service call.
Supported API: true- Returns:
- - should never return null
-
setMode
-
isCompareDownstream
public boolean isCompareDownstream()Tells if the reconciliation should work between given upstream and downstream structure. By default Reconciliation works by tracking changes on upstream side only. Setting this flag to true means we will compare with downstream if structure are in sync or not
Supported API: true
- Overrides:
isCompareDownstreamin classAbstractReconciliationContext- Returns:
-
setCompareMode
Supported API: true
-
getTargetPaths
Supported API: true- Returns:
-
setTargetPaths
Supported API: true- Parameters:
list-
-
isOccurenceMode
public boolean isOccurenceMode()
Supported API: true- Returns:
-
setOccurenceMode
public void setOccurenceMode(boolean isOccurenceMode)
Supported API: true- Parameters:
isOccurenceMode-
-
getActionType
Supported API: true- Returns:
- the actionType
-
setActionType
Supported API: true- Parameters:
actionType- the actionType to set
-
isRuleMatching
public boolean isRuleMatching()
Supported API: true- Returns:
-
setRuleMatching
public void setRuleMatching(boolean isRuleMatching)
Supported API: true- Parameters:
isRuleMatching-
-