Process Class Relationships

filenet.vw.api
Class VWDataField

java.lang.Object
  |
  +--filenet.vw.api.VWDataField
All Implemented Interfaces:
IVWField

public final class VWDataField
extends java.lang.Object
implements IVWField

Use this class to access a workflow object data field. Once you have access to the field you can determine or set the field value, determine the type, and determine if the field is an array. Use the Java type when setting the value of a field. Process Engine and Visual Basic types map to Java types in the following manner:

Java * Process Engine Visual Basic
java.lang.Integer VW_Integer Long
java.lang.Short VW_Integer Long
java.lang.Float VW_Float Double
java.lang.Float VW_Double Double
java.lang.String VW_String String
java.lang.Double VW_Float Double
java.lang.Boolean VW_Boolean Integer
java.util.Date VW_Time Long
Java Object array (Object[]) VW_Array Variant

The Java Object array (Object[]) can contain a heterogeneous collection of the basic types, mentioned above.

Call this class from the following:

Since:
VWWS3.10
See Also:
VWFieldType, VWAttachment

Method Summary
 int getFieldType()
          Gets an integer value associated with a valid data field type.
 boolean getIsSystemField()
          Determines if the field is a system field.
 boolean getIsWritable()
          Determines if the field is editable (writable).
 int getMode()
          Returns the integer value associated with the mode of the data field.
 java.lang.String getName()
          Gets the long name of a field.
 java.lang.String getStringValue()
          Gets the data field value as a String.
 java.lang.Object getValue()
          Gets the value of a field as a valid field type object.
 boolean isArray()
          Determines whether the data field is an array.
 void setValue(java.lang.Object newValue)
          Sets the value of data contained in an editable field.
Note If the field is an array, you can cast the array to an Object to pass it to this method.
 java.lang.String toString()
          Gets the data field value as a String.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends a description of this object's properties, formatted as an XML string, to the specified input buffer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getFieldType

public int getFieldType()
Gets an integer value associated with a valid data field type.
Specified by:
getFieldType in interface IVWField
Returns:
An integer value that represents the data field type.
See Also:
VWFieldType

getIsSystemField

public boolean getIsSystemField()
Determines if the field is a system field.
Returns:
True if the field is a system field; false otherwise.

getIsWritable

public boolean getIsWritable()
Determines if the field is editable (writable).
Returns:
True if the field can be modified; false otherwise.

getName

public java.lang.String getName()
Gets the long name of a field. If a field name contains more than 30 characters, use this method to access the full String, which can contain spaces.
Returns:
A String containing the field name.
See Also:
VWFieldType.isValidName( String ) for more information on field naming conventions.

getValue

public java.lang.Object getValue()
                          throws VWException
Gets the value of a field as a valid field type object. If this value is an array (testable with isArray()), cast the returned value to the correct array type to access individual elements.
Specified by:
getValue in interface IVWField
Returns:
The value contained in the data field or null if the type is invalid.
Throws:
VWException -  
See Also:
VWFieldType

isArray

public boolean isArray()
Determines whether the data field is an array.
Specified by:
isArray in interface IVWField
Returns:
True if the data field is an array; false otherwise.

setValue

public void setValue(java.lang.Object newValue)
              throws VWException
Sets the value of data contained in an editable field.
Note If the field is an array, you can cast the array to an Object to pass it to this method.
Specified by:
setValue in interface IVWField
Parameters:
newValue - An Object containing the new value for the field.
Throws:
VWException - Causes include the following conditions:

  • 1) The field is a system field. System fields are not editable.
  • 2) The field is an invalid type.
  • 3) The field is a FIELD_TYPE_ATTACHMENT type.
  • 4) The field is a FIELD_TYPE_WORKFLOW_GROUP type.


toString

public java.lang.String toString()
Gets the data field value as a String.
Overrides:
toString in class java.lang.Object
Returns:
A String representation of the data field's value property.

getStringValue

public java.lang.String getStringValue()
Gets the data field value as a String. This method is consistent with the equivalent design-time method VWFieldDefinition.getStringValue.
Specified by:
getStringValue in interface IVWField
Returns:
A String representation of the data field's value property.

getMode

public int getMode()
Returns the integer value associated with the mode of the data field. Valid modes are:

Returns:
An integer value that indicates the data field mode.
See Also:
VWModeType

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends a description of this object's properties, formatted as an XML string, to the specified input buffer.

This description includes Name, Type, IsSystemField Flag, Mode, IsArray Flag, and either field values or string representations of attachments.

Warning: This general list of properties currently contained in the appended string is subject to change without notice.

Parameters:
theBuffer - A string buffer that this method will append with XML content.
Throws:
VWException -  
See Also:
VWXMLUtil


Copyright © 2002, 2003 FileNet Corporation. All rights reserved.