Class ESISmartCollectionRenderer
java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.smartcollection.ESISmartCollectionRenderer
- All Implemented Interfaces:
ESIRenderer
Supported API: true
Extendable: true
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe following is an inner class intended to be used only by this outer class (or subclasses thereof). -
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.ElementadjustContentPartElement(com.infoengine.object.factory.Element element, String groupName, WTPart contentPart, Collection<ESITarget> targets) Allow subclasses to fix the contents of an element.protected com.infoengine.object.factory.ElementadjustContextPartElement(com.infoengine.object.factory.Element element, String groupName, WTPart contextPart, Collection<ESITarget> targets, AccountabilityKey accountabilitykeys) Allow subclasses to fix the contents of an element.protected com.infoengine.object.factory.ElementadjustSmartCollectionElement(com.infoengine.object.factory.Element element, String group, AccountabilityMap smartCollection, ESITarget targets) Allow subclasses to fix the contents of an element.protected voidOutput generator for the class.protected Map<ESISmartCollectionRenderer.PreviousExportedIterationKey, Collection<ESITargetAssociation>> getPreviousExportedIterationAssociations(AccountabilityMap accMap, Collection<ESITargetAssociation> tgtAssociations) Computes the previous exported iteration for the input target associations.protected AccountabilityMapgetRoot()Gets the value of the attribute: root.com.infoengine.object.IeCollectiongetSmartCollection(String objectID, ESITransaction txn, Collection<ESITarget> targets, String auth, String wcAdapter) Creates a VdbBuilder instance for the input transaction, renders the input assembly and creates release activities as appropriate for each of the distribution targets in targets.voidsetData(AccountabilityMap root, String auth, String wcAdapter, String transactionID, ESITarget target) Establish the renderer's state so that it can process requests.protected voidvalidate()Make sure the object is ready to process.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
-
getSmartCollection
public com.infoengine.object.IeCollection getSmartCollection(String objectID, ESITransaction txn, Collection<ESITarget> targets, String auth, String wcAdapter) throws WTException Creates a VdbBuilder instance for the input transaction, renders the input assembly and creates release activities as appropriate for each of the distribution targets in targets. The settings pertaining to ESI response generation for a given distribution target are fetched from the target itself. Returns the rendered output as an Info*Engine collection to the caller.
Supported API: true- Parameters:
objectID- - UFID of the AccountabilityMap object to be rendered.txn- - ESITransaction object that represents the delivery of data to the distribution targets in targets; will be null when the method is invoked for the Preview functionality.targets- - A collection of distribution targets that represent a given destination, such as an ERP instance.auth- - This parameter contains authentication information required for executing certain Windchill adapter webjects as part of the rendering process.wcAdapter- - This parameter contains the name of the Windchill adapter instance.- Returns:
- IeCollection The Info*Engine collection that holds the ESI response.
- Throws:
WTException- - if any of the invoked methods throws this exception.
-
setData
public void setData(AccountabilityMap root, String auth, String wcAdapter, String transactionID, ESITarget target) Establish the renderer's state so that it can process requests.
Supported API: true- Parameters:
root- - The primary smart collection to process. May not be null.auth- - Info*Engine authentication information to use when executing a query task.wcAdapter- - Windchill adapter instance name to use when executing a webject.transactionID- - Optional transaction ID to pass to the VDB builder.target- - ESI target object.
-
getRoot
Gets the value of the attribute: root.
Supported API: true- Returns:
- AccountabilityMap
-
buildGroups
Output generator for the class. Does the following:- Obtains a list of targets assigned to the AccountabilityMap.
- Identifies if the AccountabilityMap was previously published and renders in respective group in ESI response.
- Populated AccountabilityMap associations such a context part, content part and navigation criteria.
- Calls the Navigation Criteria renderer.
Supported API: true- Specified by:
buildGroupsin classBasicESIRenderer- Throws:
ESIRendererExceptionWTException
-
validate
Make sure the object is ready to process. If AccountabilityMap object, authentication, or adapterName are null, throws an exception.
Supported API: true- Specified by:
validatein classBasicESIRenderer- Throws:
ESIRendererException
-
adjustSmartCollectionElement
protected com.infoengine.object.factory.Element adjustSmartCollectionElement(com.infoengine.object.factory.Element element, String group, AccountabilityMap smartCollection, ESITarget targets) throws ESIRendererException Allow subclasses to fix the contents of an element.
Supported API: true- Parameters:
element- - The element to be updated.group- - The logical name of the group to which the element will be added.smartCollection- - AccountabilityMap object.targets- - Collection of ESITarget objects.- Throws:
ESIRendererException
-
adjustContextPartElement
protected com.infoengine.object.factory.Element adjustContextPartElement(com.infoengine.object.factory.Element element, String groupName, WTPart contextPart, Collection<ESITarget> targets, AccountabilityKey accountabilitykeys) throws ESIRendererException Allow subclasses to fix the contents of an element.
Supported API: true- Parameters:
element- - The element to be updated.groupName- - The logical name of the group to which the element will be added.contextPart- - Context part object.targets- - Collection of ESITarget objects.accountabilitykeys- - AccountabilityKey object.- Throws:
ESIRendererException
-
adjustContentPartElement
protected com.infoengine.object.factory.Element adjustContentPartElement(com.infoengine.object.factory.Element element, String groupName, WTPart contentPart, Collection<ESITarget> targets) throws ESIRendererException Allow subclasses to fix the contents of an element.
Supported API: true- Parameters:
element- - The element to be updated.groupName- - The logical name of the group to which the element will be added.targets- - Collection of ESITarget objects.contextPart- - Context part.- Throws:
ESIRendererException
-
getPreviousExportedIterationAssociations
protected Map<ESISmartCollectionRenderer.PreviousExportedIterationKey,Collection<ESITargetAssociation>> getPreviousExportedIterationAssociations(AccountabilityMap accMap, Collection<ESITargetAssociation> tgtAssociations) throws WTException Computes the previous exported iteration for the input target associations. Invokes the API.invalid reference
ESITransactionUtility#latestObjectExport(Collection)Computing a previous exported iteration is target sensitive because each target is not guaranteed to have the same previously exported iteration. For example, an accountabilityMap could be associated with target 1, then exported, then associated with target 2, and exported a second time. In the case of the second export, target 1 has a previous exported iteration, while target 2 does not. Therefore, the output map contains a previous exported iteration mapped to collection of targets.
Supported API: true- Parameters:
accMap- - AccountabilityMap being processed. Currently not used. But this may be useful for customizers.tgtAssociations- - Collection of distribution target associations. Typically the target association between the input part and current distribution target being processed.- Throws:
WTException
-