Process API

filenet.vw.api
Class VWFieldDefinition

java.lang.Object
  extended by filenet.vw.api.VWFieldDefinition
All Implemented Interfaces:
IVWField, filenet.vw.base.exprcomp.IField, java.io.Serializable, java.lang.Cloneable

public final class VWFieldDefinition
extends java.lang.Object
implements java.io.Serializable, IVWField, filenet.vw.base.exprcomp.IField, java.lang.Cloneable

Use this class to access a field definition object, which is the authoring-time representation of a field in a workflow. VWFieldDefinition objects reside in VWWorkflowDefinition objects.

Workflow property values that are set at design time and workflow launch step parameters are not encoded/encrypted.

The name of a field definition must be unique within a workflow definition. The field can be one of the following:

Since:
VWWS3.10
See Also:
VWException, VWMergeType, VWFieldType, VWWorkflowDefinition, VWParameterDefinition, VWParticipant, VWAttachment, IVWField, Serialized Form

Method Summary
static java.lang.String _get_FILE_AUTHOR()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_DATE()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_REVISION()
          For FileNet internal use only, do not call.
 java.lang.Object clone()
          Creates a clone of this VWFieldDefinition object.
 boolean getCanAssign()
          Gets the value of the canAssign flag, which indicates whether or not this data field can be a left-hand value in an assignment statement.
 java.lang.String getDescription()
          Gets the description of the data field.
 int getFieldType()
          Gets the integer value that represents the field's field type.
 int getMergeType()
          Gets the merge type property for the data field.
 java.lang.String getName()
          Gets the String from the name property on the data field.
 java.lang.String getStringValue()
          Gets the initial value of the field type definition in String format, converted from any valid field type.
 java.lang.Object getValue()
          Gets the value of the field in the format of any valid field type, as a Java Object.
 java.lang.String getXMLSchemaElement()
          Get the XML Schema Element.
 java.lang.String getXMLSchemaName()
          Get the XML Schema Name.
 boolean isArray()
          Gets the value of the isArray flag.
 void setDescription(java.lang.String theDescription)
          Modifies the String containing the description for the data field.
 void setMergeType(int theMergeType)
          Modifies the merge type property for the data field.
 void setName(java.lang.String theName)
          Changes the data field name property.
 void setValue(java.lang.Object theValue)
          Modifies the value of the field, ensuring that the field type of this field definition matches the field type of the input value.
 void setValue(java.lang.String theValue, int theType, boolean theIsArray)
          Modifies the value of the data field with a String-formatted input to represent the value and an input field type. This method is especially useful for modifying a field value with an expression.
 void setXMLSchemaElement(java.lang.String theSchemaElement)
          Set the XML Schema Element.
 void setXMLSchemaName(java.lang.String theSchemaName)
          Set the XML Schema Name.
 java.lang.String toString()
          Gets the name of the data field.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string representing this instance to the buffer specified.
 void toXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)
          Appends an XPDL string representing this instance to the buffer specified.
 void validate(VWSession theSession, java.util.Vector EDefVector)
          Validates this instance, appending any validation errors found to the specified Vector object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

_get_FILE_DATE

public static java.lang.String _get_FILE_DATE()
For FileNet internal use only, do not call.

Returns:
the file date

_get_FILE_AUTHOR

public static java.lang.String _get_FILE_AUTHOR()
For FileNet internal use only, do not call.

Returns:
the file author

_get_FILE_REVISION

public static java.lang.String _get_FILE_REVISION()
For FileNet internal use only, do not call.

Returns:
the file revision

getCanAssign

public boolean getCanAssign()
Gets the value of the canAssign flag, which indicates whether or not this data field can be a left-hand value in an assignment statement. The canAssign flag is used only in VWFieldDefinitions returned from the server in a VWWorkflowSignature instance at runtime. The canAssign flag has no meaning at design time, and its value is not peristed in the XML (.pep) file.

Returns:
A boolean value: TRUE if the field can be a left-hand value in an assignment statement; FALSE if the field cannot be a left-hand value in an assignment statement.

isArray

public boolean isArray()
Gets the value of the isArray flag. Determines whether or not the data field is an array.

Specified by:
isArray in interface IVWField
Specified by:
isArray in interface filenet.vw.base.exprcomp.IField
Returns:
A boolean value. The method returns true if the field is an array; otherwise the method returns false.

getMergeType

public int getMergeType()
Gets the merge type property for the data field.

Returns:
The integer value associated with the merge type.
See Also:
VWMergeType

setMergeType

public void setMergeType(int theMergeType)
                  throws VWException
Modifies the merge type property for the data field.

Parameters:
theMergeType - A valid integer value that specifies a new merge type for the data field.
Throws:
VWException - Thrown if the data field merge type specified in the theMergeType parameter is not valid.
See Also:
VWMergeType

getDescription

public java.lang.String getDescription()
Gets the description of the data field. The String is contained in the description property of the data field. If a translation source exists, the authored description is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Returns:
A String containing the translated description of the data field, if a translation source exists; otherwise the authored description is returned.

setDescription

public void setDescription(java.lang.String theDescription)
Modifies the String containing the description for the data field. The method modifies the description property on the data field.

Parameters:
theDescription - A String containing the new description for the data field.

getFieldType

public int getFieldType()
Gets the integer value that represents the field's field type.

Specified by:
getFieldType in interface IVWField
Specified by:
getFieldType in interface filenet.vw.base.exprcomp.IField
Returns:
An integer value indicating the data field type.
See Also:
VWFieldType

toString

public java.lang.String toString()
Gets the name of the data field.

Overrides:
toString in class java.lang.Object
Returns:
A String containing the name of the data field.

getName

public java.lang.String getName()
Gets the String from the name property on the data field. If a translation source exists, the authored name is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Specified by:
getName in interface filenet.vw.base.exprcomp.IField
Returns:
A String containing the translated value of the name property, if a translation source exists; otherwise the authored value is returned.

setName

public void setName(java.lang.String theName)
             throws VWException
Changes the data field name property.

Parameters:
theName - A String containing the new name for the data field.
Throws:
VWException - The method throws an exception if one of the following conditions exist:

  • The field name is null or has a length of zero (0).
  • The field name is a duplicate of an existing field.
  • The field name is invalid because it either contains more than 31 characters, begins with a character other than a letter, or contains an invalid character (not a number, letter or underscore) as part of the name.

getStringValue

public java.lang.String getStringValue()
Gets the initial value of the field type definition in String format, converted from any valid field type.

Specified by:
getStringValue in interface IVWField
Returns:
The value of the data field, represented in String format.
See Also:
VWFieldType

getValue

public java.lang.Object getValue()
Gets the value of the field in the format of any valid field type, as a Java Object.

Specified by:
getValue in interface IVWField
Specified by:
getValue in interface filenet.vw.base.exprcomp.IField
Returns:
A Java object; null if the internal String cannot be converted into an object--for example, if the field is an arithmetic expression.

Note If the method returns null, the internal String representation may still be obtained from the getStringValue() method.

See Also:
VWFieldType

setValue

public void setValue(java.lang.Object theValue)
              throws VWException
Modifies the value of the field, ensuring that the field type of this field definition matches the field type of the input value.

Specified by:
setValue in interface IVWField
Specified by:
setValue in interface filenet.vw.base.exprcomp.IField
Parameters:
theValue - An object used to specify the value property.
Throws:
VWException - Causes include situations in which the input is an invalid type or null.
See Also:
VWFieldType

setValue

public void setValue(java.lang.String theValue,
                     int theType,
                     boolean theIsArray)
              throws VWException
Modifies the value of the data field with a String-formatted input to represent the value and an input field type. This method is especially useful for modifying a field value with an expression.

Parameters:
theValue - An expression providing a value for the field, formatted as a String.
theType - The field data type of the String expression.
theIsArray - A boolean variable indicating whether or not the String expression is an array.
Throws:
VWException - Causes include input that provides an invalid field type or a null value.
See Also:
VWFieldType

setXMLSchemaName

public void setXMLSchemaName(java.lang.String theSchemaName)
                      throws VWException
Set the XML Schema Name. If the field type is FIELD_TYPE_XML it may have an associated schema name. This will be null for all other field types, and attempting to get or set it for non-XML fields will result in an exception. The schema name should the name of a VWSchema in the containing workflow definition.

Parameters:
theSchemaName - new schema name value for this XML field definition.
Throws:
VWException - if the field type of this field definition is not FIELD_TYPE_XML

getXMLSchemaName

public java.lang.String getXMLSchemaName()
                                  throws VWException
Get the XML Schema Name. If the field type is FIELD_TYPE_XML it may have an associated schema name. This will be null for all other field types, and attempting to get or set it for non-XML fields will result in an exception. The schema name should the name of a VWSchema in the containing workflow definition.

Returns:
the schema name value for this XML field definition.
Throws:
VWException - if the field type of this field definition is not FIELD_TYPE_XML

setXMLSchemaElement

public void setXMLSchemaElement(java.lang.String theSchemaElement)
                         throws VWException
Set the XML Schema Element. If the field type is FIELD_TYPE_XML it may have an associated schema name. This will be null for all other field types, and attempting to get or set it for non-XML fields will result in an exception. The element should be the name of an element in the schema referred to by the schema name.

Parameters:
theSchemaElement - A String containing the new schema element value for this XML field definition.
Throws:
VWException - if the field type of this field definition is not FIELD_TYPE_XML.

getXMLSchemaElement

public java.lang.String getXMLSchemaElement()
                                     throws VWException
Get the XML Schema Element. If the field type is FIELD_TYPE_XML it may have an associated schema name. This will be null for all other field types, and attempting to get or set it for non-XML fields will result in an exception. The element should be the name of an element in the schema referred to by the schema name.

Returns:
A String containing the schema element value for this XML field definition.
Throws:
VWException - if the field type of this field definition is not FIELD_TYPE_XML.

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends an XML string representing this instance to the buffer specified.

Warning: This XML string is nonextensible, and cannot be modified in any way.

Parameters:
theBuffer - A StringBuffer that will be appended with the XML content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

toXPDL

public void toXPDL(java.lang.String indentA,
                   java.lang.StringBuffer theBuffer)
            throws VWException
Appends an XPDL string representing this instance to the buffer specified.

Warning: This XPDL string is nonextensible, and cannot be modified in any way.

Parameters:
indentA - A String specifying the initial indentation for this XPDL section.
theBuffer - A StringBuffer that will be appended with the XPDL content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

validate

public void validate(VWSession theSession,
                     java.util.Vector EDefVector)
              throws VWException
Validates this instance, appending any validation errors found to the specified Vector object.

Parameters:
theSession - The current VWSession object if logged on. This is needed for various parts of the validation process. This can be null; however, areas of validation requiring a logon will not be validated.
EDefVector - A Vector to which will be added a VWValidationError object for each validation error found. This can be null; in this case, a new Vector is used.

Note: Because validate methods having EDefVector in the signature also occur on other classes, the existing Vector can contain validation errors from previous validation calls.

Throws:
VWException - Thrown if an error occurs during the validation.
See Also:
VWValidationError

clone

public java.lang.Object clone()
Creates a clone of this VWFieldDefinition object.

Overrides:
clone in class java.lang.Object
Returns:
An clone of this instance.

Process API

© Copyright IBM Corporation 2002, 2008. All rights reserved.