Package com.ptc.windchill.esi.ecn
Class ESIWTChangeOrder2Renderer
java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.ecn.ESIWTChangeOrder2Renderer
- All Implemented Interfaces:
ESIRenderer
This class renders the output of ECN, which includes ECN header , part and BOM.
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 voidBesides performing certain validations, the method calls buildHeader() to create the ECN header group and buildDetail() to process the resulting objects in the change notice.getChangeableParts(WTChangeOrder2 changeOrder, String multi_level) Fetches the resulting objects of type WTPart associated with the passed WTChangeOrder2 object and populates a Hashtable with the fetched information; the fetched resulting objects constitute the keys while the value in the argument multi_level is used for populating the values in the Hashtable.protected Map<Releasable, String> getChangeables(WTChangeOrder2 changeOrder, String multi_level) Fetches the resulting objects associated with the input WTChangeOrder2 object and populates a HashMap with the fetched information; the fetched resulting objects (of type Releasable) constitute the keys while the value in the argument multi_level is used for populating the values in the HashMap.protected StringGets the value of the attribute: configSpec; The Config Spec.com.infoengine.object.IeCollectiongetECN(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter) Creates a VdbBuilder instance for the input transaction, renders the input change notice and creates release activities as appropriate for each of the distribution targets in tgts.protected StringGets the value of the attribute: multiLevel; The number of levels of BOM.protected StringGets the value of the attribute: objectID; The UFID of a WTChangeOrder 2.protected StringGets the value of the attribute: suboperationDepth; Number of levels of sub operations.protected StringGets the value of the attribute: transactionID; The number of the transaction to associate with the output from renderer.protected StringDeprecated.protected booleanGets the value of the attribute: alternates; When parts are exported, should the alternates of the parts (if any are defined) be exported?
Supported API: trueprotected booleanDeprecated.Deprecated as of 10.2 M020.protected booleanGets the value of the attribute: componentParts; When BOMs are exported, should parts be created for BOM components?
Supported API: trueprotected booleanisDelta()Gets the value of the attribute: delta; Should RPC responses contain only information that has changed since the last time objects were released?
Supported API: trueprotected booleanGets the value of the attribute: documents; If "true", returns associated documents info, default is "false".protected booleanGets the value of the attribute: lineNumbers; If "true", returns line numbers info, otherwise no line numbers info is returned.protected booleanGets the value of the attribute: operatedOnPart; If true returns the operated on parts associated with the operation.protected booleanGets the value of the attribute: processPlanParts; If "true", returns the parts/boms associated with the Process Plan.protected booleanGets the value of the attribute: referenceDesignators; If "true", returns Reference Designator data.protected booleanGets the value of the attribute: resources; If "true", returns the resources associated with the operation in a process plan.protected booleanGets the value of the attribute: sequences; If "true", returns the sequences associated with the process plan.protected booleanGets the value of the attribute: standardProcedures; Indicates if the associated Standard Procedures need to be rendered.protected booleanGets the value of the attribute: substitutes; If "true", returns substitute data.protected booleanGets the value of the attribute: workInstructions; If "true", returns the work instructions default is "false".protected booleanGets the value of the attribute: processPlanBOMParts; If true, returns the assembly parts of the BOMs associated with the process plan.voidsetData(String objectID, boolean delta, boolean bomParts, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String multiLevel, boolean documents, boolean buildProcessPlanParts, boolean resources, boolean sequences, boolean standardProcedures, String suboperationDepth, boolean processPlanBOMParts, boolean operatedOnParts, boolean workInstructions, String configSpec, String auth, String wcAdapter, String transactionID) Initializes this renderer instance appropriately.voidsetData(String objectID, boolean delta, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String multiLevel, boolean documents, boolean buildProcessPlanParts, boolean resources, boolean sequences, boolean standardProcedures, String suboperationDepth, boolean processPlanBOMParts, boolean operatedOnParts, boolean workInstructions, String configSpec, String auth, String wcAdapter, String transactionID) Initializes this renderer instance appropriately.voidsetData(String objectID, boolean delta, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String multiLevel, boolean documents, String configSpec, String auth, String wcAdapter, String transactionID) Initializes this renderer instance appropriately.protected voidvalidate()Makes sure that WTChangeOrder2 is in proper state for release to ERP.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
-
getObjectID
Gets the value of the attribute: objectID; The UFID of a WTChangeOrder 2.
Supported API: true- Returns:
- String
-
isDelta
protected boolean isDelta()Gets the value of the attribute: delta; Should RPC responses contain only information that has changed since the last time objects were released?
Supported API: true- Returns:
- boolean
-
isComponentParts
protected boolean isComponentParts()Gets the value of the attribute: componentParts; When BOMs are exported, should parts be created for BOM components?
Supported API: true- Returns:
- boolean
-
isAlternates
protected boolean isAlternates()Gets the value of the attribute: alternates; When parts are exported, should the alternates of the parts (if any are defined) be exported?
Supported API: true- Returns:
- boolean
-
isSubstitutes
protected boolean isSubstitutes()Gets the value of the attribute: substitutes; If "true", returns substitute data.
Supported API: true- Returns:
- boolean
-
isReferenceDesignators
protected boolean isReferenceDesignators()Gets the value of the attribute: referenceDesignators; If "true", returns Reference Designator data.
Supported API: true- Returns:
- boolean
-
isLineNumbers
protected boolean isLineNumbers()Gets the value of the attribute: lineNumbers; If "true", returns line numbers info, otherwise no line numbers info is returned.
Supported API: true- Returns:
- boolean
-
getMultiLevel
Gets the value of the attribute: multiLevel; The number of levels of BOM.
Supported API: true- Returns:
- String
-
isDocuments
protected boolean isDocuments()Gets the value of the attribute: documents; If "true", returns associated documents info, default is "false".
Supported API: true- Returns:
- boolean
-
isProcessPlanParts
protected boolean isProcessPlanParts()Gets the value of the attribute: processPlanParts; If "true", returns the parts/boms associated with the Process Plan.
Supported API: true- Returns:
- boolean
-
isResources
protected boolean isResources()Gets the value of the attribute: resources; If "true", returns the resources associated with the operation in a process plan.
Supported API: true- Returns:
- boolean
-
isSequences
protected boolean isSequences()Gets the value of the attribute: sequences; If "true", returns the sequences associated with the process plan.
Supported API: true- Returns:
- boolean
-
isStandardProcedures
protected boolean isStandardProcedures()Gets the value of the attribute: standardProcedures; Indicates if the associated Standard Procedures need to be rendered.
Supported API: true- Returns:
- boolean
-
getSuboperationDepth
Gets the value of the attribute: suboperationDepth; Number of levels of sub operations.
Supported API: true- Returns:
- String
-
isBomAllocatedParts
Deprecated.Deprecated as of 10.2 M020. Use the APIpublishProcessPlanBOMParts()instead.Gets the value of the attribute: processPlanBOMParts; If true, returns the assembly parts of the BOMs associated with the process plan.
Supported API: true- Returns:
- boolean
-
publishProcessPlanBOMParts
protected boolean publishProcessPlanBOMParts()Gets the value of the attribute: processPlanBOMParts; If true, returns the assembly parts of the BOMs associated with the process plan.
Supported API: true- Returns:
- boolean
-
isOperatedOnPart
protected boolean isOperatedOnPart()Gets the value of the attribute: operatedOnPart; If true returns the operated on parts associated with the operation.
Supported API: true- Returns:
- boolean
-
isWorkInstructions
protected boolean isWorkInstructions()Gets the value of the attribute: workInstructions; If "true", returns the work instructions default is "false".
Supported API: true- Returns:
- boolean
-
getConfigSpec
Gets the value of the attribute: configSpec; The Config Spec. value to use when navigating BOMs. See the Query-Tree Webject documentation for acceptable and default values.
Supported API: true- Returns:
- String
-
getWcAdapter
Deprecated.Returns the value of the attribute adapterName. This attribute holds the name of the Windchill Adapter instance where the Query-Objects webject is to be executed.- Returns:
- The value stored in the field adapterName.
-
getTransactionID
Gets the value of the attribute: transactionID; The number of the transaction to associate with the output from renderer.
Supported API: true- Returns:
- String
-
validate
Makes sure that WTChangeOrder2 is in proper state for release to ERP.
Supported API: true- Specified by:
validatein classBasicESIRenderer- Throws:
ESIRendererException
-
buildGroups
Besides performing certain validations, the method calls buildHeader() to create the ECN header group and buildDetail() to process the resulting objects in the change notice.
Supported API: true- Specified by:
buildGroupsin classBasicESIRenderer- Throws:
ESIRendererException
-
setData
public void setData(String objectID, boolean delta, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String multiLevel, boolean documents, String configSpec, String auth, String wcAdapter, String transactionID) Initializes this renderer instance appropriately.
Supported API: true- Parameters:
objectID- The UFID of a WTChangeOrder2 instance.delta- Specifies whether or not the ESI response should contain only information that has changed since the last time objects were released.componentParts- Specifies whether or not part information for BOM components should be sent when BOMs are exported.alternates- Specifies whether or not alternates (if any) should be exported when parts are exported.substitutes- If "true", returns substitutes data.referenceDesignators- If "true", returns Reference Designators data.lineNumbers- If "true", returns line numbers info, otherwise no line numbers info is returned.multiLevel- The number of levels in a BOM to process.documents- If "true", returns associated documents info, default is "false". Only operative if parts in a BOM are processed.configSpec- The Config Spec. value to use when navigating a BOM. See the Query-Tree Webject documentation for acceptable and default values.auth- Authentication information for Info*Engine tasks.wcAdapter- The name of the Windchill adapter instance.transactionID- The number of the transaction to associate with the output from this renderer.
-
setData
public void setData(String objectID, boolean delta, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String multiLevel, boolean documents, boolean buildProcessPlanParts, boolean resources, boolean sequences, boolean standardProcedures, String suboperationDepth, boolean processPlanBOMParts, boolean operatedOnParts, boolean workInstructions, String configSpec, String auth, String wcAdapter, String transactionID) throws WTException Initializes this renderer instance appropriately.
Supported API: true- Parameters:
objectID- - The UFID of a WTChangeOrder2 instance.delta- - Specifies whether or not the ESI response should contain only information that has changed since the last time objects were released.componentParts- - Specifies whether or not part information for BOM components should be sent when BOMs are exported.alternates- - Specifies whether or not alternates (if any) should be exported when parts are exported.substitutes- - If "true", returns substitutes data.referenceDesignators- - If "true", returns Reference Designators data.lineNumbers- - If "true", returns line numbers info, otherwise no line numbers info is returned.multiLevel- - The number of levels in a BOM to process.documents- - If "true", returns associated documents info, default is "false". Only operative if parts or resources are processed.buildProcessPlanParts- - If "true", returns the parts/BOMs associated with a process plan.resources- - If "true", returns the resources associated with an operation in a process plan.sequences- - If "true", returns the sequences associated with a process plan.standardProcedures- - If "true", returns the Standard Procedures associated with process plans, operations and sequences.suboperationDepth- - Number of levels of sub-operations to process.processPlanBOMParts- - If true returns part information for the BOM associated with a process plan.operatedOnParts- - If "true", returns operated on parts for an operation in a process plan.workInstructions- - If "true", returns the work instructions, default is "false".configSpec- - The Config Spec. value to use when navigating a BOM. See the Query-Tree Webject documentation for acceptable and default values.auth- - Authentication information for Info*Engine tasks.wcAdapter- - The name of the Windchill adapter instance to use for executing a webject.transactionID- - The number of the transaction to associate with the output from this renderer.- Throws:
WTException
-
setData
public void setData(String objectID, boolean delta, boolean bomParts, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumbers, String multiLevel, boolean documents, boolean buildProcessPlanParts, boolean resources, boolean sequences, boolean standardProcedures, String suboperationDepth, boolean processPlanBOMParts, boolean operatedOnParts, boolean workInstructions, String configSpec, String auth, String wcAdapter, String transactionID) throws WTException Initializes this renderer instance appropriately.
Supported API: true- Parameters:
objectID- - The UFID of a WTChangeOrder2 instance.delta- - Specifies whether or not the ESI response should contain only information that has changed since the last time objects were released.bomParts- - Specifies whether or not part information for the BOM should be sent when BOMs are exported.componentParts- - Specifies whether or not part information for BOM components should be sent when BOMs are exported.alternates- - Specifies whether or not alternates (if any) should be exported when parts are exported.substitutes- - If "true", returns substitutes data.referenceDesignators- - If "true", returns Reference Designators data.lineNumbers- - If "true", returns line numbers info, otherwise no line numbers info is returned.multiLevel- - The number of levels in a BOM to process.documents- - If "true", returns associated documents info, default is "false". Only operative if parts or resources are processed.buildProcessPlanParts- - If "true", returns the parts/BOMs associated with a process plan.resources- - If "true", returns the resources associated with an operation in a process plan.sequences- - If "true", returns the sequences associated with a process plan.standardProcedures- - If "true", returns the Standard Procedures associated with process plans, operations and sequences.suboperationDepth- - Number of levels of sub-operations to process.processPlanBOMParts- - If true returns part information for the BOM associated with a process plan.operatedOnParts- - If "true", returns operated on parts for an operation in a process plan.workInstructions- - If "true", returns the work instructions, default is "false".configSpec- - The Config Spec. value to use when navigating a BOM. See the Query-Tree Webject documentation for acceptable and default values.auth- - Authentication information for Info*Engine tasks.wcAdapter- - The name of the Windchill adapter instance to use for executing a webject.transactionID- - The number of the transaction to associate with the output from this renderer.- Throws:
WTException
-
getChangeableParts
protected static Hashtable<WTPart,String> getChangeableParts(WTChangeOrder2 changeOrder, String multi_level) throws WTException Fetches the resulting objects of type WTPart associated with the passed WTChangeOrder2 object and populates a Hashtable with the fetched information; the fetched resulting objects constitute the keys while the value in the argument multi_level is used for populating the values in the Hashtable. The thus populated Hashtable is then returned to the caller.
Supported API: true- Parameters:
changeOrder- WTChangeOrder2 object for which to populate the output Hashtable.multi_level- String representation of the number of levels that are to be processed when rendering a BOM; this is used to populate the value portion of the Hashtable.- Returns:
- A Hashtable holding the resulting objects (of type WTPart) and the value of multi_level as keys and values respectively.
- Throws:
WTException- - if any of the invoked methods throws this exception.
-
getChangeables
protected Map<Releasable,String> getChangeables(WTChangeOrder2 changeOrder, String multi_level) throws WTException Fetches the resulting objects associated with the input WTChangeOrder2 object and populates a HashMap with the fetched information; the fetched resulting objects (of type Releasable) constitute the keys while the value in the argument multi_level is used for populating the values in the HashMap. The thus populated HashMap is then returned to the caller.
Note:
1) If the input WTChangeOrder2 object has one or more EnterpriseData objects as resulting objects, the parts associated with these objects are fetched and added to the output Map as well. However, this is done provided certain preferences are set.
2) The method populates the Lists in the instance variables resultingObjects and partsWithEDs as well.
3) If any of the resulting objects are new objects in a workspace, these are not returned in the output Map.
Supported API: true- Parameters:
changeOrder- WTChangeOrder2 object for which to populate the output HashMap.multi_level- String representation of the number of levels that are to be processed when rendering a BOM; this is used to populate the value portion of the HashMap.- Returns:
- A Map where each key is a resulting object and each value is the input value in multi_level. If the input WTChangeOrder2 object has EnterpriseData objects as resulting objects, parts associated to these objects will be added as keys to this Map as well under certain conditions. See Note #3 in the method description as well.
- Throws:
WTException- - if any of the invoked methods throws this exception.
-
getECN
public com.infoengine.object.IeCollection getECN(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter) throws WTException Creates a VdbBuilder instance for the input transaction, renders the input change notice and creates release activities as appropriate for each of the distribution targets in tgts. 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. Additionally this method renders the children of the assembly which is added as a changeable to the input change notice, if they are associated with any additional targets than their parent.
Supported API: true- Parameters:
objectID- UFID of the change notice to be rendered.txn- ESITransaction object that represents the delivery of data to the distribution targets in tgts; can be null.tgts- Collection of distribution targets that represent a given destination, such as an ERP instance.auth- Authentication information required for executing certain Windchill adapter webjects as part of the rendering process.wcAdapter- 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.
-
BasicESIRenderer.getAdapterName()instead.Supported API: true