Class DocAttributePopulator
java.lang.Object
com.ptc.core.components.forms.DefaultAttributePopulator
com.ptc.windchill.enterprise.doc.forms.DocAttributePopulator
- All Implemented Interfaces:
com.ptc.core.components.forms.AttributePopulator,Externalizable,Serializable
Populator class used for populating document attributes for the insert
document action.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
- See Also:
-
Field Summary
Fields inherited from class com.ptc.core.components.forms.DefaultAttributePopulator
EXTERNALIZATION_VERSION_UID -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the list of attributes which are to be processed.Prepopulate the TypeInstance of the Doc based on the search results.voidprocessAttribute(WTDocumentMaster dm, String key, TypeInstance ti, AttributeIdentifier ai) Method responsible for processing the specified attribute against the current change request and storing this attribute value in the TypeInstance.protected voidsetAttribute(TypeInstance ti, AttributeIdentifier ai, Object value) Set the value specified against the attribute identifier in the TypeInstance.voidsetAttributeList(List<String> atts) Set the attribute list to process.Prepopulate the TypeInstance of the Document based on the search results.Methods inherited from class com.ptc.core.components.forms.DefaultAttributePopulator
attemptToSetAttrValueFromFormData, getAllValueChangedAttributes, getAttrValueFromFormData, getContainerRef, getContainerRef, getFolderFromLaunchContext, isContainerOverridable, readExternal, setAttributeState, writeExternal
-
Method Details
-
getAttributeList
Retrieve the list of attributes which are to be processed.
Supported API: true- Returns:
- List <String> The list of attributes which require processing.
-
setAttributeList
Set the attribute list to process.
Supported API: true- Parameters:
atts- The attribute list to process
-
prePopulateAttributeDisplayValues
Prepopulate the TypeInstance of the Doc based on the search results. If the launching point object is not a part master this method will return the unmodified TypeInstance.
The following fields will be propagated:- Name
- Number
- docType
getAttributeList()andprocessAttribute()methods should be overloaded and provided with the additional implementation.
Supported API: true- Specified by:
prePopulateAttributeDisplayValuesin interfacecom.ptc.core.components.forms.AttributePopulator- Overrides:
prePopulateAttributeDisplayValuesin classDefaultAttributePopulator- Parameters:
ti- The type instance returned prior to creating attributes step.cb- The current command bean.- Returns:
- the modified type instance if the conditions above are satisfied.
-
processAttribute
public void processAttribute(WTDocumentMaster dm, String key, TypeInstance ti, AttributeIdentifier ai) throws WTException Method responsible for processing the specified attribute against the current change request and storing this attribute value in the TypeInstance. Overriding this method in a subclass can override the attributes which are propagated. Currently thename,descriptionandneedDateattributes are handled. The methodsetAttribute(TypeInstance,AttributeIdentifier,Object)is used to store the attribute in the type instance only if the current state of the attribute isState.UNITIALIZEDorState.DEFAULT
Supported API: true- Parameters:
dm- The change request used to obtain the valueskey- The attribute value.ti- The TypeInstance to store the value in.ai- The attribute identifer representing the attribute defined by the key- Throws:
WTException
-
setAttribute
protected void setAttribute(TypeInstance ti, AttributeIdentifier ai, Object value) throws WTException Set the value specified against the attribute identifier in the TypeInstance. The value will only be set if the state of the attribute in the TypeInstance is set toState.UNINITIALIZEDorState.DEFAULT. Upon setting the value in the TypeInstance, the state of the attribute will be set toState.DEFAULT.
Supported API: true- Parameters:
ti- The type instance.ai- The attribute to set in the type instancevalue- The value to set to attribute in the type instance to.- Throws:
WTException
-
setAttributeValues
Prepopulate the TypeInstance of the Document based on the search results. If the launching point object is not a Document master this method will return the unmodified TypeInstance.
The following fields will be propagated:- Name
- Number
Supported API: true- Specified by:
setAttributeValuesin interfacecom.ptc.core.components.forms.AttributePopulator- Overrides:
setAttributeValuesin classDefaultAttributePopulator- Parameters:
ti- The type instance returned prior to creating attributes step.cb- The current command bean.- Returns:
- the modified type instance if the conditions above are satisfied.
-