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

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

public class DocTemplateAttributePopulator
extends com.ptc.core.components.forms.DefaultAttributePopulator
implements Serializable

Populator class for creating a document template.

Supported API: true

Extendable: true

See Also:
Serialized Form

Method Summary
 List<String> getAttributeList()
          Retrieve the list of attributes which are to be processed.
 boolean isTypeOverridable()
          Specify the type is overridable.
protected  void setAttribute(TypeInstance ti, AttributeIdentifier ai, Object value)
          Set the value specified against the attribute identifier in the TypeInstance.
 void setAttributeList(List<String> atts)
          Set the attribute list to process.
 TypeInstance setAttributeValues(TypeInstance ti, NmCommandBean cb)
          Prepopulate the TypeInstance of the Document based on the search results.
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

getAttributeList

public List<String> getAttributeList()
Retrieve the list of attributes which are to be processed.

Supported API: true

Returns:
List 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

isTypeOverridable

public boolean isTypeOverridable()
Specify the type is overridable.

Supported API: true

Overrides:
isTypeOverridable in class com.ptc.core.components.forms.DefaultAttributePopulator

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: