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
See Also:
  • Method Details

    • 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
      Specified by:
      prePopulateAttributeDisplayValues in interface com.ptc.core.components.forms.AttributePopulator
      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