Package com.ptc.windchill.esi.ov
Class ChoiceRuleRenderer
java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.ov.ChoiceRuleRenderer
- All Implemented Interfaces:
ESIRenderer
Renders the ChoiceRule object along with RuleMemberLink and RuleMemberActionLink.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Field Summary
Fields inherited from class com.ptc.windchill.esi.rnd.BasicESIRenderer
adapterName, authentication, currentTarget, DELIMITER, objectTypeDefs, OPTIONSVARIANTS_HELPER_CLASS_STRING, SEPARATOR, taskHelper, XML_META_NAME -
Method Summary
Modifier and TypeMethodDescriptionprotected com.infoengine.object.factory.ElementadjustChoiceRuleElement(com.infoengine.object.factory.Element element, String groupName, ChoiceRule rule, Persistable ruleContext, Collection<ESITarget> targets) Allow subclasses to fix the contents of an element before it's added to the output group(s).protected voidRenders ChoiceRules along RuleMemberLink and RuleMemberActionLinks.
Note: At 10.2 Source Choices if available for Rule are rendered in RuleMemberLink element and target choices are rendered in RuleMemberActionLink in response.
If the attribute "Publish only Incremental Changes for a Modified Option set" on the target is set to "No", the option set and its related objects will be rendered as added objects regardless of their release history.voidgetRules(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, Object> paramsMap, String auth, VdbBuilder builder) Deprecated.As of 13.0.1.0.voidgetRules(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, Object> paramsMap, String auth, VdbBuilder builder, OptionSet previousExportedOptionSet) Renders the ChoiceRule and links that defines rule.voidsetData(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, Object> paramsMap, String auth) Deprecated.As of 13.01.0.voidsetData(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, Object> paramsMap, String auth, OptionSet previousExportedOptionSet) Initializes this renderer instance appropriately.protected voidvalidate()Throws an exception if any of the following instance members do not exists or do not carry a valid value - Choice rule, authentication and adapter parameters.Methods inherited from class com.ptc.windchill.esi.rnd.BasicESIRenderer
addAtt, adjustConfigurableAndCollapsibleAtts, adjustDateEffCxt, adjustDateEffectivities, adjustEffectivities, adjustLotNumberEffCxt, adjustLotNumberEffectivities, adjustObjectID, adjustSerialNumberEffCxt, adjustSerialNumberEffectivities, adjustTargets, buildUfidString, evaluateBussinessRule, fetchLatestEffectivities, formatDateEffectivityElement, getAdapterName, getAssignedVariantSpec, getAssignedVariantSpec, getAUMRenderer, getAuth, getBuilder, getEffectivityElementMap, getEffectivityHandler, getEffectivityTargetAttributes, getElements, getERPMaterialAttributeList, getERPMaterialAttributeList, getERPMaterialTargetAttributes, getFormatedDate, getGroupInfo, getGroupInfo, getGroupInfo, getMap, getMap, getMapInfo, getMapInfo, getMapInfo, getNavigationFilter, getObjectTypeDefs, getPlantSpecificAttributeList, getPlantSpecificAttributeList, getPlantSpecificTargetAttributes, getPreviousObject, getPreviousPublishedEffectivity, getTargetsFromAssns, getTargetUtility, getTransactionUtility, getUnwantedAttributes, getVersionRefObjectRefMap, getWCAttributeList, getWCAttributeList, initEffectivityHandler, initializeElementForGroup, invokeQueryTask, invokeQueryTask, invokeQueryTask, invokeQueryTaskForObjects, isExpressionToBePublished, isGroupAvailable, isPublishAssocOptionSetFlagEnabled, mapDateEffectivities, mapEffectivities, mapEffectivityAttributes, mapEffectivityElement, mapEffectivityParentElement, mapElement, mapElement, mapElement, mapElementWithEffectivityAttrs, mapLotNumberEffectivities, mapObject, mapObject, mapSerialNumberEffectivities, mergeElements, overrideAttrValue, populateDateEffectivityInfo, populateEffectivityInfo, processBussinessRulesWithAnd, processBussinessRuleValidationResultSet, processNoMatchingVersionFound, removeAttributesNotRequired, removeUnwantedEffectivityAttributes, render, renderAssociatedSkinnyVariantSpec, renderAssociatedVariantSpec, renderAssocOptionSetLinks, renderAssocSkinnyVariantSpec, renderAssocVariantSpec, renderATONavigationFilter, renderChoiceRules, renderEffectivities, renderEffectivities, renderExpressions, renderOptionSets, renderRoleBObjectOfModuleVariantLink, setAttrValue, setAttrValue, setAttrValues, setBuilder, setCurrentTarget, setCurrentTarget, setCurrentTargetFromTgtAssocs, setEffectivityHandler, setObjectTypeDefs, setObjectTypeDefs, setObjectTypeDefsFromObj, setStartEndEffAttr, setTransactionUtility, shallPublishAssocOptionSet, shouldRenderEffectivityElementInPartElement, shouldUseOldEffectivityBehaviour, storeCurrentAndItsPreviousObject, storeCurrentAndItsPreviousObject
-
Method Details
-
getRules
public void getRules(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, throws ESIRendererExceptionObject> paramsMap, String auth, VdbBuilder builder) Deprecated.As of 13.0.1.0. Use the other overloaded API that takes in an OptionSet instead.Renders the ChoiceRule and links that defines rule.
Supported API: true- Parameters:
context- - Object which is referring to this ChoiceRule (OptionSet etc.). Can be null when an ChoiceRule is published as a stand alone object.ruleDetails- - A Map containing choice rules as key and set choice to be rendered. If this null or empty, then the caller is expected to provide a value to the input argument "objectID".target- - Distribution target to which the rule is being processed.paramsMap- - Can be used to pass additional data to this renderer. Currently this is not being used by Out-Of-box code.auth- - Authentication information for Info*Engine tasks.builder- -The VdbBuilder to use when creating output.- Throws:
ESIRendererException
-
getRules
public void getRules(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, throws ESIRendererExceptionObject> paramsMap, String auth, VdbBuilder builder, OptionSet previousExportedOptionSet) Renders the ChoiceRule and links that defines rule.
Supported API: true- Parameters:
context- - Object which is referring to this ChoiceRule (OptionSet etc.). Can be null when an ChoiceRule is published as a stand alone object.ruleDetails- - A Map containing choice rules as key and set choice to be rendered. If this null or empty, then the caller is expected to provide a value to the input argument "objectID".target- - Distribution target to which the rule is being processed.paramsMap- - Can be used to pass additional data to this renderer. Currently this is not being used by Out-Of-box code.auth- - Authentication information for Info*Engine tasks.builder- - The VdbBuilder to use when creating output.previousExportedOptionSet- - Previously published option set.- Throws:
ESIRendererException
-
setData
public void setData(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, throws ESIRendererExceptionObject> paramsMap, String auth) Deprecated.As of 13.01.0. Use the other overloaded API that takes in an OptionSet instead.Initializes this renderer instance appropriately.
Supported API: true- Parameters:
context- - Object which is referring to this ChoceRule(s) (Product\Library\OptionSet etc.). Can be null when an expressionable ChoiceRule is published as a stand alone object.target- - Distribution target to which the option is being processed.paramsMap- - Can be used to pass additional data to this renderer. Currently this is not being used by Out-Of-box code.auth- - Authentication information for Info*Engine tasks.allChoiceRuleToBeRendered- - A Map containing choice rules as key and set choice to be rendered. If this null or empty, then the caller is expected to provide a value to the input argument "objectID".- Throws:
WTExceptionESIRendererException
-
setData
public void setData(Persistable context, Map<ChoiceRule, OptionsVariantsHelper.ChoiceRuleSourceTargetInfo> ruleDetails, ESITarget target, Map<String, throws ESIRendererExceptionObject> paramsMap, String auth, OptionSet previousExportedOptionSet) Initializes this renderer instance appropriately.
Supported API: true- Parameters:
context- - Object which is referring to this ChoceRule(s) (Product\Library\OptionSet etc.). Can be null when an expressionable ChoiceRule is published as a stand alone object.target- - Distribution target to which the option is being processed.paramsMap- - Can be used to pass additional data to this renderer. Currently this is not being used by Out-Of-box code.auth- - Authentication information for Info*Engine tasks.previousExportedOptionSet- - Previously published option set.allChoiceRuleToBeRendered- - A Map containing choice rules as key and set choice to be rendered. If this null or empty, then the caller is expected to provide a value to the input argument "objectID".- Throws:
WTExceptionESIRendererException
-
validate
Throws an exception if any of the following instance members do not exists or do not carry a valid value - Choice rule, authentication and adapter parameters.
Supported API: true- Specified by:
validatein classBasicESIRenderer- Throws:
ESIRendererException
-
buildGroups
Renders ChoiceRules along RuleMemberLink and RuleMemberActionLinks.
Note: At 10.2 Source Choices if available for Rule are rendered in RuleMemberLink element and target choices are rendered in RuleMemberActionLink in response.
- If the attribute "Publish only Incremental Changes for a Modified Option set" on the target is set to "No", the option set and its related objects will be rendered as added objects regardless of their release history. If it is set to "Yes" only difference will be published.
- If the preference "Enforce Distribution Target" is set to "Yes" and the objects being published have no targets associated, throws exception and the rendering will be aborted.
- Renders rule member links. At 10.2 source choice for Enable/Include rules are renderd in RuleMemberLink
- Renders rule member action links. At 10.2 target choices for Enable/Include/Exclude rules are renderd in RuleMemberLink
Supported API: true- Specified by:
buildGroupsin classBasicESIRenderer- Throws:
ESIRendererException- See Also:
-
adjustChoiceRuleElement
protected com.infoengine.object.factory.Element adjustChoiceRuleElement(com.infoengine.object.factory.Element element, String groupName, ChoiceRule rule, Persistable ruleContext, Collection<ESITarget> targets) Allow subclasses to fix the contents of an element before it's added to the output group(s). Default behavior is to return input element from the argument.
Supported API: true- Parameters:
element- - The element to be updated.groupName- - The logical name of the group to which the element will be added.rule- - RoleA object of the current rule member link.ruleContext- - The context object for rule such as OptionSet/Product etc. If availabletargets- - The collection of ESITarget objects.- Returns:
- An updated element.
-