Class CreateFromTemplateAttributePopulator
java.lang.Object
com.ptc.core.components.forms.DefaultAttributePopulator
com.ptc.windchill.enterprise.doc.forms.CreateFromTemplateAttributePopulator
- All Implemented Interfaces:
com.ptc.core.components.forms.AttributePopulator,Externalizable,Serializable
public class CreateFromTemplateAttributePopulator
extends com.ptc.core.components.forms.DefaultAttributePopulator
implements Serializable
Populator class for creating a document from template.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionPrepopulates attribute values for the document created from the template.protected voidsetAttribute(TypeInstance ti, AttributeIdentifier ai, Object value) Set the value specified against the attribute identifier in the TypeInstance.protected voidsetNewAttribute(TypeInstance ti, AttributeIdentifier ai, Object value) Set the value specified against the attribute identifier in the TypeInstance.Methods inherited from class com.ptc.core.components.forms.DefaultAttributePopulator
setAttributeState
-
Method Details
-
prePopulateAttributeDisplayValues
Prepopulates attribute values for the document created from the template. The target TypeInstance is filled in with default values from the document template, for the soft/modeled attributes on the document being created. This method only modifies attributes at state DEFAULT or UNITIALIZED.
Supported API: true- Specified by:
prePopulateAttributeDisplayValuesin interfacecom.ptc.core.components.forms.AttributePopulator- Overrides:
prePopulateAttributeDisplayValuesin classcom.ptc.core.components.forms.DefaultAttributePopulator- Parameters:
ti- - type instancecb- - command bean.- Returns:
- new type instance with prepopulated values
-
setNewAttribute
protected void setNewAttribute(TypeInstance ti, AttributeIdentifier ai, Object value) throws WTException Set the value specified against the attribute identifier in the TypeInstance. Upon setting the value in the TypeInstance, the state of the attribute will be set toState.NEW.
Supported API: true- Parameters:
ti- The type instance.ai- The attribute to set in the type instancevalue- The value to set for the attribute in the type instance.- 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. 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 for the attribute in the type instance.- Throws:
WTException
-