Process API

filenet.vw.api
Class VWFieldType

java.lang.Object
  extended by 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 by using a bitwise OR operation on the following: component file types: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, FIELD_TYPE_TIME, FIELD_TYPE_ATTACHMENT, FIELD_TYPE_PARTICIPANT, FIELD_TYPE_XML.
static int BASIC_FIELD_TYPES
          Integer value representing the result of the following basic field values combined by using a bitwise OR operation on the following: component file types: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, 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.
static int FIELD_TYPE_XML
          Value of 128. Indicates a workflow field of type XML.
static int FIELD_TYPEDEF_TIME32
          Deprecated. for creation. Users are encouraged to use FIELD_TYPEDEF_TIME64 for creation of exposed fields.
static int FIELD_TYPEDEF_TIME64
          Value of 256. only for use with VWExposedFieldDefinition.
static java.lang.String TIME_MASK
          Default date time mask "MM/dd/yyyy HH:mm:ss".
 
Constructor Summary
VWFieldType()
           
 
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.
static java.lang.String getLocalizedDefinitionString(int theFieldDefinitionType)
          Retrieves the localized string containing the value of the field definition type.
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.

See Also:
Constant Field Values

FIELD_TYPE_STRING

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

See Also:
Constant Field Values

FIELD_TYPE_BOOLEAN

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

See Also:
Constant Field Values

FIELD_TYPE_FLOAT

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

See Also:
Constant Field Values

FIELD_TYPE_TIME

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

See Also:
Constant Field Values

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, Constant Field Values

FIELD_TYPE_PARTICIPANT

public static final int FIELD_TYPE_PARTICIPANT
Value of 64. Indicates a workflow field of type participant.

See Also:
VWParticipant, Constant Field Values

FIELD_TYPE_XML

public static final int FIELD_TYPE_XML
Value of 128. Indicates a workflow field of type XML.

See Also:
VWXMLData, Constant Field Values

FIELD_TYPEDEF_TIME32

public static final int FIELD_TYPEDEF_TIME32
Deprecated. for creation. Users are encouraged to use FIELD_TYPEDEF_TIME64 for creation of exposed fields.
Value of 16. only for use with VWExposedFieldDefinition. Indicates an exposed field of type java.util.Date. This exposed field type contains values that may not be valid past GMT 03:14:07, Tuesday, January 19, 2038 because the database column representation on the server is 32 bits in length.

Since:
P8 4.0.3
See Also:
Constant Field Values

FIELD_TYPEDEF_TIME64

public static final int FIELD_TYPEDEF_TIME64
Value of 256. only for use with VWExposedFieldDefinition. Indicates an exposed field of type java.util.Date. This exposed field type contains values that will be valid past GMT 03:14:07, Tuesday, January 19, 2038 because the database column representation on the server is 64 bits in length.

Since:
P8 4.0.3
See Also:
Constant Field Values

BASIC_FIELD_TYPES

public static final int BASIC_FIELD_TYPES
Integer value representing the result of the following basic field values combined by using a bitwise OR operation on the following: component file types: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, FIELD_TYPE_TIME. This type is used for API calls that retrieve multiple fields or parameters of basic types.

See Also:
Constant Field Values

ALL_FIELD_TYPES

public static final int ALL_FIELD_TYPES
Integer value representing the result of the following field values combined by using a bitwise OR operation on the following: component file types: FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, FIELD_TYPE_TIME, FIELD_TYPE_ATTACHMENT, FIELD_TYPE_PARTICIPANT, FIELD_TYPE_XML. This type is used for API calls that retrieve multiple fields or for input parameters of multiple types.

See Also:
Constant Field Values

TIME_MASK

public static final java.lang.String TIME_MASK
Default date time mask "MM/dd/yyyy HH:mm:ss".

See Also:
Constant Field Values
Constructor Detail

VWFieldType

public VWFieldType()
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 date

_get_FILE_REVISION

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

Returns:
the file date

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.

getLocalizedDefinitionString

public static java.lang.String getLocalizedDefinitionString(int theFieldDefinitionType)
                                                     throws VWException
Retrieves the localized string containing the value of the field definition type.

Parameters:
theFieldDefinitionType - 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 definition 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 that 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.

Throws:
VWException - if both of the theSig and theWF parameters are null.

Process API

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