com.ptc.core.components.beans
Class ObjectBean

java.lang.Object
  extended by com.ptc.core.components.beans.ObjectBean
All Implemented Interfaces:
com.ptc.core.components.beans.FormDataHolder, Externalizable, Serializable

public class ObjectBean
extends Object
implements com.ptc.core.components.beans.FormDataHolder, Externalizable

A class used to access the form data specific to a single object being created or updated by a HTML wizard and the form data common to all target objects. Also contains the instance of the object created during the processing of the wizard.

See the Windchill Customizers' Guide for more information on wizard processing.

Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
 void addChild(ObjectBean child)
          Adds a child ObjectBean to this ObjectBean.
 NmOid getActionOid()
          Gets the object that is the target of the action.
 List getAddedItemsByName(String param_name)
          Returns a the list of NmOids for objects which were added to the component with the name param_name.
 Map<String,List<String>> getChangedComboBox()
          Returns the combo box input fields that were modified by the user.
 Map<String,String> getChangedRadio()
          Returns the radio button input fields that were modified by the user.
 Map<String,String> getChangedText()
          Returns the textbox input fields that were modified by the user.
 Map<String,String> getChangedTextArea()
          Returns the textarea input fields that were modified by the user.
 Map<String,List<String>> getChecked()
          Returns the checkbox input fields that were checked by the user.
 List<ObjectBean> getChildren()
          Gets the value of the attribute: children.
 Map<String,List<String>> getNewChecked()
          

Supported API: true
 Object getObject()
          Gets the value of the attribute: object.
 String getObjectHandle()
          Gets the value of the attribute: objectHandle.
 ObjectBean getParent()
          Gets the value of the attribute: parent.
 List getRemovedItemsByName(String param_name)
          Returns a list of the objects that were removed from a component.
 String getTextParameter(String key)
          Gets a HTTP request parameter value in UTF8 format.
 String[] getTextParameterValues(String key)
          Gets all the HTTP request parameter values for the given key in UTF8 format.
 Map<String,List<String>> getUnChecked()
          Returns a hashMap of all the un-checked checkboxes on the page.
 boolean hasChildren()
          Returns true if this ObjectBean has child ObjectBeans; false otherwise.
 void setChildren(List<ObjectBean> a_Children)
          Sets the value of the attribute: children.
 void setObject(Object a_Object)
          Sets the value of the attribute: object.
 void setParent(ObjectBean a_Parent)
          Sets the value of the attribute: parent.
 String toString()
          Dumps the contents of this ObjectBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getChildren

public List<ObjectBean> getChildren()
Gets the value of the attribute: children. These are the children of this ObjectBean. They typically represent related objects that are dependent on this object or that should be processed after this object. For example, if this ObjectBean represents a ChangeRequest it might have have children that are the related ChangeActivities.

Supported API: true

Returns:
List

setChildren

public void setChildren(List<ObjectBean> a_Children)
Sets the value of the attribute: children. These are the children of this ObjectBean. They typically represent related objects that are dependent on this object or that should be processed after this object. For example, if this ObjectBean represents a ChangeRequest it might have have children that are the related ChangeActivities.

Supported API: true

Parameters:
a_Children -

getObject

public Object getObject()
Gets the value of the attribute: object. This is an instance of the target object whose attributes are set to the values in the form data.

Supported API: true

Returns:
Object

setObject

public void setObject(Object a_Object)
Sets the value of the attribute: object. This is an instance of the target object whose attributes are set to the values in the form data.

Supported API: true

Parameters:
a_Object -

getObjectHandle

public String getObjectHandle()
Gets the value of the attribute: objectHandle. This is the string used in form field names to identify the data of the object represented by this ObjectBean.

Supported API: true

Returns:
String

getParent

public ObjectBean getParent()
Gets the value of the attribute: parent. This is the parent of this ObjectBean. It typically represents a related object on which this object depends or that should be processed before this object. For example, if this ObjectBean represents a ChangeActivity it's parent might be the ChangeRequest with which it is associated.

Supported API: true

Returns:
ObjectBean

setParent

public void setParent(ObjectBean a_Parent)
Sets the value of the attribute: parent. This is the parent of this ObjectBean. It typically represents a related object on which this object depends or that should be processed before this object. For example, if this ObjectBean represents a ChangeActivity it's parent might be the ChangeRequest with which it is associated.

Supported API: true

Parameters:
a_Parent -

addChild

public void addChild(ObjectBean child)
Adds a child ObjectBean to this ObjectBean.

Supported API: true

Parameters:
child -

hasChildren

public boolean hasChildren()
Returns true if this ObjectBean has child ObjectBeans; false otherwise.

Supported API: true

Returns:
boolean

toString

public String toString()
Dumps the contents of this ObjectBean.

Supported API: true

Overrides:
toString in class Object
Returns:
String

getAddedItemsByName

public List getAddedItemsByName(String param_name)
Returns a the list of NmOids for objects which were added to the component with the name param_name.


Supported API: true

Parameters:
param_name - The name of the component to which the items were added (for example: table ID)
Returns:
a list of oids that are added from the component.

Supported API: true

getChangedComboBox

public Map<String,List<String>> getChangedComboBox()
                                            throws WTException
Returns the combo box input fields that were modified by the user.

Supported API: true

Returns:
Map - keys are the field names and values are the field values
Throws:
WTException

getChangedRadio

public Map<String,String> getChangedRadio()
                                   throws WTException
Returns the radio button input fields that were modified by the user. Buttons must have been rendered by a GuiComponent.

Supported API: true

Returns:
Map
Throws:
WTException

getChangedText

public Map<String,String> getChangedText()
                                  throws WTException
Returns the textbox input fields that were modified by the user.

Supported API: true

Returns:
Map - Keys are the field names and values are the field vales
Throws:
WTException

getChangedTextArea

public Map<String,String> getChangedTextArea()
                                      throws WTException
Returns the textarea input fields that were modified by the user.

Supported API: true

Returns:
Map - keys are the field names, values are the field values
Throws:
WTException

getChecked

public Map<String,List<String>> getChecked()
Returns the checkbox input fields that were checked by the user.

Supported API: true

Returns:
Map

getNewChecked

public Map<String,List<String>> getNewChecked()
                                       throws WTException


Supported API: true

Returns:
Map>
Throws:
WTException

getRemovedItemsByName

public List getRemovedItemsByName(String param_name)
Returns a list of the objects that were removed from a component.

Supported API: true

Parameters:
param_name - - the name of the component. E.g., table id.
Returns:
List - of NmOids

getTextParameter

public String getTextParameter(String key)
Gets a HTTP request parameter value in UTF8 format. If there is more than one value for the given key, only the first value will be returned.

Use this instead of getRequest().getParameter()

Available in the servlet container and in the Method Server

Supported API: true

Parameters:
key - - name of parameter to retrieve
Returns:
String - value of parameter

getTextParameterValues

public String[] getTextParameterValues(String key)
Gets all the HTTP request parameter values for the given key in UTF8 format.

Available in the servlet container and in the Method Server

Supported API: true

Parameters:
key - - name of parameter to retrieve
Returns:
String[] - value(s) of parameters

getUnChecked

public Map<String,List<String>> getUnChecked()
                                      throws WTException
Returns a hashMap of all the un-checked checkboxes on the page. Only returns values for fields rendered with checkbox GuiComponents. Keys in returned map are checkbox names and values are optional column names. For example, if one was to make a table of principals to access control permissions, the name would be the user, and the optional column name would be the access control permission.

Supported API: true

Returns:
Map>
Throws:
WTException

getActionOid

public NmOid getActionOid()
                   throws WTException
Gets the object that is the target of the action. This could be the elementOid for a row based action or the primaryOid for actions invoked on the details page

Supported API: true

Throws:
WTException