Class DocTemplateAttributePopulator

java.lang.Object
com.ptc.core.components.forms.DefaultAttributePopulator
com.ptc.windchill.enterprise.doc.forms.DocTemplateAttributePopulator
All Implemented Interfaces:
com.ptc.core.components.forms.AttributePopulator, Externalizable, Serializable

public class DocTemplateAttributePopulator extends DefaultAttributePopulator implements Serializable
Populator class for creating a document template.

Supported API: true

Extendable: true
See Also:
  • Method Details

    • getAttributeList

      public List<String> 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

      public void setAttributeList(List<String> atts)
      Set the attribute list to process.

      Supported API: true
      Parameters:
      atts - The attribute list to process
    • 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 to State.UNINITIALIZED or State.DEFAULT. 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 to attribute in the type instance to.
      Throws:
      WTException
    • 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
    • setAttributeValues

      public TypeInstance setAttributeValues(TypeInstance ti, NmCommandBean cb)
      Prepopulate the TypeInstance of the Document based on the search results. If the launching point object is not a Document, this method will return the unmodified TypeInstance.

      The following fields will be propagated:
      • Name
      • Number


      Supported API: true
      Specified by:
      setAttributeValues in interface com.ptc.core.components.forms.AttributePopulator
      Overrides:
      setAttributeValues in class DefaultAttributePopulator
      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.