Process Class Relationships

filenet.vw.api
Class VWFieldType

java.lang.Object
  |
  +--filenet.vw.api.VWFieldType

public final class VWFieldType
extends java.lang.Object

Use this class to determine the data field types available in a workflow. You can validate a field type value or validate and retrieve the field type of an object.

The methods of this class perform the following:

Since:
VWWS3.10
See Also:
VWParameter, VWParameterDefinition, VWExposedFieldDefinition, VWDataField, VWFieldDefinition

Field Summary
static int ALL_FIELD_TYPES
          Integer value representing the result of the following field values combined logically using an OR function: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, FIELD_TYPE_TIME, FIELD_TYPE_ATTACHMENT, and FIELD_TYPE_PARTICIPANT.
static int BASIC_FIELD_TYPES
          Integer value representing the result of the following basic field values combined logically using an OR function: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, and FIELD_TYPE_TIME.
static int FIELD_TYPE_ATTACHMENT
          Value of 32. Indicates a workflow field of type Attachment(an attached document).
static int FIELD_TYPE_BOOLEAN
          Value of 4. Indicates a workflow field of type java.lang.Boolean.
static int FIELD_TYPE_FLOAT
          Value of 8. Indicates a workflow field of type java.lang.Double.
static int FIELD_TYPE_INT
          Value of 1. Indicates a workflow field of type java.lang.Integer.
static int FIELD_TYPE_PARTICIPANT
          Value of 64. Indicates a workflow field of type participant.
static int FIELD_TYPE_STRING
          Value of 2. Indicates a workflow field of type java.lang.String.
static int FIELD_TYPE_TIME
          Value of 16. Indicates a workflow field of type java.util.Date.
 
Constructor Summary
VWFieldType()
           
 
Method Summary
static java.lang.String getLocalizedString(int theFieldType)
          Retrieves the localized string containing the value of the field type.
static int getVWFieldType(java.lang.Object theValue)
          Gets the field type of the passed object.
static boolean isValid(int fieldType)
          Validates an integer to insure that it is valid field type.
static boolean isValid(java.lang.Object theValue)
          Validates whether the passed object type matches one of valid the field types.
static boolean isValidName(java.lang.String theName)
          Validates the input string as a properly formed field name.
static int lValue(java.lang.String theExpr, VWWorkflowSignature theSig, VWWorkflowDefinition theWF)
          Determines whether an expression is a valid as an array or single value on the left (target) side of an assignment statement.
static java.lang.Object stringToValue(java.lang.String theString, int theType, boolean isArray)
          Returns an object or an array of objects of the specified type, as denoted by an input String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_TYPE_INT

public static final int FIELD_TYPE_INT
Value of 1. Indicates a workflow field of type java.lang.Integer.

FIELD_TYPE_STRING

public static final int FIELD_TYPE_STRING
Value of 2. Indicates a workflow field of type java.lang.String.

FIELD_TYPE_BOOLEAN

public static final int FIELD_TYPE_BOOLEAN
Value of 4. Indicates a workflow field of type java.lang.Boolean.

FIELD_TYPE_FLOAT

public static final int FIELD_TYPE_FLOAT
Value of 8. Indicates a workflow field of type java.lang.Double.

FIELD_TYPE_TIME

public static final int FIELD_TYPE_TIME
Value of 16. Indicates a workflow field of type java.util.Date.

FIELD_TYPE_ATTACHMENT

public static final int FIELD_TYPE_ATTACHMENT
Value of 32. Indicates a workflow field of type Attachment(an attached document).
See Also:
VWAttachment

FIELD_TYPE_PARTICIPANT

public static final int FIELD_TYPE_PARTICIPANT
Value of 64. Indicates a workflow field of type participant.
See Also:
VWParticipant

ALL_FIELD_TYPES

public static final int ALL_FIELD_TYPES
Integer value representing the result of the following field values combined logically using an OR function: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, FIELD_TYPE_TIME, FIELD_TYPE_ATTACHMENT, and FIELD_TYPE_PARTICIPANT. This type is used for API calls that retrieve multiple fields or for input parameters of multiple types.

BASIC_FIELD_TYPES

public static final int BASIC_FIELD_TYPES
Integer value representing the result of the following basic field values combined logically using an OR function: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, and FIELD_TYPE_TIME. This type is used for API calls that retrieve multiple fields or parameters of basic types.
Constructor Detail

VWFieldType

public VWFieldType()
Method Detail

getLocalizedString

public static java.lang.String getLocalizedString(int theFieldType)
                                           throws VWException
Retrieves the localized string containing the value of the field type.
Parameters:
theFieldType - An integer value associated with the field type value, in accord with the VWFieldType field summary.
Returns:
A String containing the localized data field type.
Throws:
VWException - Thrown if the field type is not valid.

isValidName

public static boolean isValidName(java.lang.String theName)
Validates the input string as a properly formed field name.

Valid field names must conform with the following guidelines:

Parameters:
theName - A string contain the field name value to be validated.
Returns:
A Boolean value: TRUE if the field name is valid; FALSE if the field name is invalid.

isValid

public static boolean isValid(int fieldType)
Validates an integer to insure that it is valid field type.
Parameters:
fieldType - An integer to be tested to see if it is a field type, as shown in the VWFieldType field summary.
Returns:
A Boolean value: TRUE if the fieldType parameter value is valid; FALSE if the fieldType parameter value is invalid.

isValid

public static boolean isValid(java.lang.Object theValue)
Validates whether the passed object type matches one of valid the field types.
Parameters:
theValue - An object to validate against the field types shown in the VWFieldType field summary.
Returns:
A Boolean value: TRUE if the object matches a valid field type; FALSE if null or if the object does not match a valid field type.

getVWFieldType

public static int getVWFieldType(java.lang.Object theValue)
Gets the field type of the passed object.
Parameters:
theValue - An object to check for a valid data type.
Returns:
An integer value associated with the field type that corresponds to the input object's type, as shown in the VWFieldType field summary, if the object has a valid field type. If the input object is null or does not have a valid field type, this method returns "-1".

stringToValue

public static java.lang.Object stringToValue(java.lang.String theString,
                                             int theType,
                                             boolean isArray)
                                      throws VWException
Returns an object or an array of objects of the specified type, as denoted by an input String. Value(s) shown in the String must represent literal values, not expressions.

The String specified in the theString parameter must conform to the following formatting rules:

Parameters:
theString - An input String value to be parsed.
theType - The integer value associated with the field type, as shown in the VWFieldType field summary.
isArray - A Boolean value: TRUE if the input string represents an array of values; FALSE if the input string contains a single value.
Returns:
An object of the specified type, or an array of such objects. The method returns null if any among the following conditions occurs:

  • The value in the theType parameter is invalid.
  • The string is null.
  • The string length is zero (0).
  • The string contains an expression which the system cannot convert to an object. For example, the system cannot convert "SystemTime()" into a Java Date object, because the String contains a function call.
Throws:
VWException - Thrown if the specified object cannot be constructed from the supplied String and isArray flag input information.

lValue

public static int lValue(java.lang.String theExpr,
                         VWWorkflowSignature theSig,
                         VWWorkflowDefinition theWF)
                  throws VWException
Determines whether an expression is a valid as an array or single value on the left (target) side of an assignment statement. This can provide validation to prepare for various assignments which occur in situations like single and compound step processing, wait-for-event processes, object creation, and parameter definition of "in/out" or "out" parameter definitions.
Parameters:
theExpr - An expression to be tested as a value on the left (target) side of an assignment statement.
theSig - the signature of a work class containing field definitions to be used to evaluate whether the expression can be used on the left (target) side of an assignment statement. Such a signature could be a base work class signature, or in cases like assignments in wait for event, it could be the signature of the alternate work class. Null is a valid value for this argument.
theWF - the workflow that contains the expression being validated, for looking up the list of valid fields. This parameter could be null if argument theSig is non-null and the assignment applies to an alternate work class field.
Returns:
An integer that belongs to one of the following groups of possibilities:

  • 0 if the expression is not a valid when used on the left (target) side of an assignment statement
  • A positive integer whose value represents a field type for the input expression, where the expression is valid on the left side of an assignment statement.
  • A negative integer whose absolute value represents the field type of the array denoted by the input expression, where the array is valid on the left side of an assignment statement.

Note that valid field types are shown in the VWFieldType field summary.

For example, where "I" is an integer field and "FA" is a float array field, An input expression "I + FA[1]" would return 0 (not an lvalue). Similarly the expression "I" would return the value of FIELD_TYPE_INT, and the expression "FA" would return the value of (-1) * FIELD_TYPE_FLOAT.


Process Class Relationships

Copyright © 2002 FileNET Corporation. All rights reserved.