Package com.ptc.windchill.esi.bom
Class ESISubstituteRenderer
java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.bom.ESIBOMSubordinateRenderer
com.ptc.windchill.esi.bom.ESISubstituteRenderer
- All Implemented Interfaces:
ESIRenderer
This class renders the output of substitute (i.e. <Substitute></Substitute>) in ESI DataResponse.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Field Summary
Fields inherited from class com.ptc.windchill.esi.bom.ESIBOMSubordinateRenderer
currToPrevUsageLinks, delParts, part, partUsageLinksWithSubstitutes, partUsagesToTargetAssocsMap, renderedParts, rmDelParts, root, targetAssociationsFields 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.ElementadjustElement(com.infoengine.object.factory.Element elem, String group, PartUsageInfo pui, WTPartMaster sub, Collection targets) Allow subclasses to fix the contents of an element before it's added to the output group(s).protected com.infoengine.object.factory.ElementadjustElement(com.infoengine.object.factory.Element elem, String group, WTPartUsageLink pui, WTPartMaster sub, Collection targets) Allow subclasses to fix the contents of an element before it's added to the output group(s).protected voidProduces the renderer's output.voidsetData(WTPart root, WTPart part, Collection<PartUsageInfo>[] deltaParts, Collection<ESITargetAssociation> targetAssociations, boolean lineNumbers, ESIBOMRenderer callerObj) Initializes this renderer instance appropriately.voidsetData(WTPart rootPart, WTPart part, Map<WTPartUsageLink, WTPart>[] colArray, Collection<ESITargetAssociation> targets, boolean lineNumbers, ESIBOMRenderer callerObj, boolean delta, Map<WTPartUsageLink, Collection<ESIQueryTargetAssociation>> partUsagesToQueryTargetAssocs) Initializes this renderer instance appropriately.Methods inherited from class com.ptc.windchill.esi.bom.ESIBOMSubordinateRenderer
addRenderedPart, addRenderedPart, addRenderedPart, addRenderedPart, addRenderedParts, areComponentQuantitiesRequired, areLineNumbersEnforced, getAigManager, getCaller, getCurrToPrevUsageLinks, getDelParts, getDeltaParts, getPart, getPartUsageLinksWithSubstitutes, getRenderedParts, getRenderedParts, getRmDelParts, getRoot, getTargetAssociations, getTargetAssocsForPartUsageLink, isDefaultFilter, isLineNumberEnabled, setData, setData, setData, setData, setPartUsageLinksWithSubstitutes, setPartUsagesToTargetAssocsMap, setRoot, shouldConsolidateComponentQuantity, validateMethods 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
-
buildGroups
Produces the renderer's output. Obtains an array of Maps of delta parts from the base class. Processes each Map. For each entry in the Map:- Obtains the substitute additions, deletions and commons.
- Maps the output.
- If alternate item groups are required, obtains the appropriate alternate item group from the alternate item group manager.
- Calls adjustObjectID().
- Calls adjustTargets().
- Calls adjustElement().
- Calls addRenderedPart().
Supported API: true- Specified by:
buildGroupsin classBasicESIRenderer- Throws:
ExceptionESIRendererException
-
adjustElement
protected com.infoengine.object.factory.Element adjustElement(com.infoengine.object.factory.Element elem, String group, PartUsageInfo pui, WTPartMaster sub, Collection targets) throws ESIRendererException Allow subclasses to fix the contents of an element before it's added to the output group(s). Default behavior is to return the argument.
Supported API: true- Parameters:
elem- - Info*Engine Element to be updated.group- - Logical name of the group to which the Element will be added.pui- - Part usage link being processed.sub- - Part Master Instance of Substitute parttargets- - Collection of ESITarget objects.- Returns:
- Element - Updated Element.
- Throws:
ESIRendererException
-
adjustElement
protected com.infoengine.object.factory.Element adjustElement(com.infoengine.object.factory.Element elem, String group, WTPartUsageLink pui, WTPartMaster sub, Collection targets) throws ESIRendererException Allow subclasses to fix the contents of an element before it's added to the output group(s). Default behavior is to return the argument.
Supported API: true- Parameters:
elem- - Info*Engine Element to be updated.group- - Logical name of the group to which the Element will be added.pui- - Part usage link being processed.sub- - Part Master Instance of Substitute parttargets- - Collection of ESITarget objects.- Returns:
- Element - Updated Element.
- Throws:
ESIRendererException
-
setData
public void setData(WTPart root, WTPart part, Collection<PartUsageInfo>[] deltaParts, Collection<ESITargetAssociation> targetAssociations, boolean lineNumbers, ESIBOMRenderer callerObj) throws ESIRendererException Initializes this renderer instance appropriately. It sets isAlternateItemGroupActive besides other attributes.
Supported API: true- Overrides:
setDatain classESIBOMSubordinateRenderer- Parameters:
root- WTPart instance that represents the top level assembly.part- WTPart instance that represents the assembly for which to process the substitutes.deltaParts- Array of elements, each of which is a collection of PartUsageInfo instances; each such instance represents either an added, deleted, changed or an unchanged component in the BOM being processed.targetAssociations- Collection of ESITargetAssociations for the BOM header for which to process the substitutes.lineNumbers- Specifies whether or not line numbers associated with components are to be processed.callerObj- ESIBOMRenderer instance that was used for rendering the BOM whose substitutes are being processed by this renderer.- Throws:
ESIRendererException
-
setData
public void setData(WTPart rootPart, WTPart part, Map<WTPartUsageLink, WTPart>[] colArray, Collection<ESITargetAssociation> targets, boolean lineNumbers, ESIBOMRenderer callerObj, boolean delta, Map<WTPartUsageLink, throws ESIRendererExceptionCollection<ESIQueryTargetAssociation>> partUsagesToQueryTargetAssocs) Initializes this renderer instance appropriately. It sets isAlternateItemGroupActive besides other attributes.
Supported API: true- Parameters:
rootPart- WTPart instance that represents the top level assembly.part- WTPart instance that represents the assembly for which to process the substitutes.colArray- Array of elements, each of which is a collection of PartUsageInfo instances; each such instance represents either an added, deleted, changed or an unchanged component in the BOM being processed.lineNumbers- Specifies whether or not line numbers associated with components are to be processed.callerObj- ESIBOMRenderer instance that was used for rendering the BOM whose substitutes are being processed by this renderer.delta- Boolean flag value to indicate if delta is to calculated for the assembly or not.partUsagesToQueryTargetAssocs- Collection of WTPartUsageLink and its respective ESIQueryTargetAssociation objects.targetAssociations- Collection of ESITargetAssociations for the BOM header for which to process the substitutes.- Throws:
ESIRendererException
-