com.ptc.windchill.enterprise.doc.forms
Class CreateFromTemplateAttributePopulator

java.lang.Object
  extended by com.ptc.core.components.forms.DefaultAttributePopulator
      extended by 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

See Also:
Serialized Form

Method Summary
 TypeInstance prePopulateAttributeDisplayValues(TypeInstance ti, NmCommandBean cb)
          Prepopulates attribute values for the document created from the template.
protected  void setAttribute(TypeInstance ti, AttributeIdentifier ai, Object value)
          Set the value specified against the attribute identifier in the TypeInstance.
protected  void setNewAttribute(TypeInstance ti, AttributeIdentifier ai, Object value)
          Set the value specified against the attribute identifier in the TypeInstance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

prePopulateAttributeDisplayValues

public TypeInstance prePopulateAttributeDisplayValues(TypeInstance ti,
                                                      NmCommandBean cb)
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

Overrides:
prePopulateAttributeDisplayValues in class com.ptc.core.components.forms.DefaultAttributePopulator
Parameters:
ti - - type instance
cb - - 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 to State.NEW.

Supported API: true

Parameters:
ti - The type instance.
ai - The attribute to set in the type instance
value - 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 to State.DEFAULT.

Supported API: true

Parameters:
ti - The type instance.
ai - The attribute to set in the type instance
value - The value to set for the attribute in the type instance.
Throws:
WTException