Package com.ptc.windchill.esi.ov
Class ESIOVDifferenceManagementDelegateImpl
java.lang.Object
com.ptc.windchill.esi.ov.ESIOVDifferenceManagementDelegateImpl
- All Implemented Interfaces:
ESIOVDifferenceManagementDelegate
public class ESIOVDifferenceManagementDelegateImpl
extends Object
implements ESIOVDifferenceManagementDelegate
Provides services which can used for customizing the difference calculation of OV Objects.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptiongetAssignedOptionSet(Persistable anObject, Persistable context, boolean overRideOptionSetRevision, Persistable cachingContextPersistable) Returns theOptionSetassociated with the input configurable object in the form of.invalid reference
OptionSetAssignmentResultgetChoices(Collection<Option> options) For each option in the input collection, returns all its choices.getChoicesOptions(Persistable cachingContextPersistable, WTSet choices) Returns the Options and Choices map where key is Choice and value is Option for a Choice
Supported API: trueHashSet[]getModuleVariantLinks(Set<Persistable> links) Fetches module variant information links
Supported API: truegetOptionSetData(OptionSet optionSet, Persistable cachingContextPersistable) getOptionSetDiffData(OptionSet currentObj, OptionSet previousObj, Persistable cachingContextPersistable) Compares two iterations of an OptionSet.retrieveModuleVariantLinksDiffUsingObjComparison(WTPart currentPart, WTPart previousPart, ESITarget esiTarget, VdbBuilder builder) Get the difference information for module variant information links for a part
Supported API: true
-
Method Details
-
getOptionSetData
public Map<String,Object> getOptionSetData(OptionSet optionSet, Persistable cachingContextPersistable) throws WTException Returns all the associatedOption,ChoiceandOptionSetMemberLinkobjects for the input option set.
Supported API: true- Specified by:
getOptionSetDatain interfaceESIOVDifferenceManagementDelegate- Parameters:
optionSet- - Option setcachingContextPersistable- - The persistable object to be used for building the session cache. Typically this should be the primary business object that triggered the ESI publication, or a unique object that can be used to define the session.- Returns:
- A Map containing OptionSet data. Call to
Map.get(Object)API on the returned map returns following values for keys
Key Value OptionsVariantsHelper.LINK_CHOICE_INFO A map whose key is an OptionSetMemberLink and the value is corresponding Choice. OptionsVariantsHelper.OPTION_TO_CHOICE_MAP A map whose key is an Option and the value is a set of all the Choices that belongs to this option. OptionsVariantsHelper.OPTIONSET_CHOICE_RULE_REF_LINK Set of all the OptionSetChoiceRuleMasterLinkorOptionSetChoiceRuleLinkobjects. - Throws:
WTException
-
getOptionSetDiffData
public Map<String,Object> getOptionSetDiffData(OptionSet currentObj, OptionSet previousObj, Persistable cachingContextPersistable) throws WTException Compares two iterations of an OptionSet. This method internally invokes the APIESIObjectComparisonUtility.compareOptionSets(OptionSet, OptionSet). In addition to the comparison result, it also returns the options and choices associated with the current iteration of the option set.
Supported API: true- Specified by:
getOptionSetDiffDatain interfaceESIOVDifferenceManagementDelegate- Parameters:
currentObj- - current iteration of an option set.previousObj- - option set iteration to compare the current iteration with.cachingContextPersistable- - The persistable object to be used for building the session cache. Typically this should be the primary business object that triggered the ESI publication, or a unique object that can be used to define the session.- Returns:
- A Map containing OptionSet difference information. Call to
Map.get(Object)API on the returned map returns following values for keys
Key Value ESIObjectComparisonUtility.ATTRIBUTE_DIFF_INFORMATION A map which holds the attribute differences. For more information, check the API ESIObjectComparisonUtility.compareOptionSets(OptionSet, OptionSet).OptionsVariantsHelper.OPTIONSETMEMBERLINKDIFFERENCE An array of Map containing OptionSetMemberLink as key and Choice as value. For more information, check the API ESIObjectComparisonUtility.compareOptionSets(OptionSet, OptionSet).OptionsVariantsHelper.OPTION_TO_CHOICE_MAP A Map containing Option as key and set of Choice as value. OptionsVariantsHelper.OPTIONSET_TO_OPTION_LINKDIFFERENCE An array of sets containing options. Set at index -0 contains all the options newly added to the current option set. Index - 1 contains the options that are removed from the current option set. OptionsVariantsHelper.OPTIONSETCHOICERULEMASTERLINKDIFFERENCE An array of Set containing OptionSetChoiceRuleMasterLink. - Throws:
WTException- See Also:
-
retrieveModuleVariantLinksDiffUsingObjComparison
public HashMap retrieveModuleVariantLinksDiffUsingObjComparison(WTPart currentPart, WTPart previousPart, ESITarget esiTarget, VdbBuilder builder) throws WTException, WTPropertyVetoException Get the difference information for module variant information links for a part
Supported API: true- Specified by:
retrieveModuleVariantLinksDiffUsingObjComparisonin interfaceESIOVDifferenceManagementDelegate- Parameters:
currentPart- - Current iteration of the assembly part.previousPart- - Previously published iteration of the assembly part.esiTarget- - The currently processed distribution target.builder- - VdbBuilder instance- Returns:
- A Map of difference information
- Throws:
WTExceptionWTPropertyVetoException
-
getModuleVariantLinks
Fetches module variant information links
Supported API: true- Specified by:
getModuleVariantLinksin interfaceESIOVDifferenceManagementDelegate- Parameters:
links- - module variant information links collection that is currently being published.
-
getAssignedOptionSet
public AssignedOptionSetResult getAssignedOptionSet(Persistable anObject, Persistable context, boolean overRideOptionSetRevision, Persistable cachingContextPersistable) throws WTException Returns theOptionSetassociated with the input configurable object in the form of. API returns the OptionSetAssignmentResult either from cache or by querying database and populating OptionSetAssignmentResult.invalid reference
OptionSetAssignmentResult
Supported API: true- Specified by:
getAssignedOptionSetin interfaceESIOVDifferenceManagementDelegate- Parameters:
anObject- - Input object for which an associated option set needs to be found out.context- - This object is passed in to the option service API that fetches the associated option set; has relevance only when processing choice mappable choice links. A null is passed in for this argument when processing associated option set links.overRideOptionSetRevision- - Flag to indicate if the option set should be overridden with the new revision.cachingContextPersistable- - The persistable object to be used for building the session cache. Typically this should be the primary business object that triggered the ESI publication, or a unique object that can be used to define the session.
Note: anObject and context in the input parameter should be valid object for wich option set is displayed in 'Assigned Option Set' table on info page.- Returns:
- - The OptionSetAssignmentResult having information about option set associated with the input object.
- Throws:
WTException
-
getChoicesOptions
public WTValuedMap getChoicesOptions(Persistable cachingContextPersistable, WTSet choices) throws WTException Returns the Options and Choices map where key is Choice and value is Option for a Choice
Supported API: true- Specified by:
getChoicesOptionsin interfaceESIOVDifferenceManagementDelegate- Parameters:
cachingContextPersistable- - The persistable object to be used for building the session cache. Typically this should be the primary business object that triggered the ESI publication, or a unique object that can be used to define the session.choices- - The set of choice objects.- Returns:
- - The value map containing Choice as key and Option as a value
- Throws:
WTException
-
getChoices
For each option in the input collection, returns all its choices.
Supported API: true- Specified by:
getChoicesin interfaceESIOVDifferenceManagementDelegate- Parameters:
options- - Collection of options.- Returns:
- - A Map whose key is an option and the value is a set of all its choices.
- Throws:
WTException
-