Class VWFieldDefinition
- java.lang.Object
-
- 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:- A data field with a basic type (FIELD_TYPE_INT, FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_FLOAT, and FIELD_TYPE_TIME)
- A data field with a special-purpose type (FIELD_TYPE_ATTACHMENT, FIELD_TYPE_PARTICIPANT, FIELD_TYPE_XML or FIELD_TYPE_ID)
- An array of data fields comprised of data types that are either basic or special-purpose
- Since:
- VWWS3.10
- See Also:
VWException,VWMergeType,VWFieldType,VWWorkflowDefinition,VWParameterDefinition,VWParticipant,VWAttachment,IVWField, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description java.lang.Objectclone()Creates a clone of thisVWFieldDefinitionobject.booleangetCanAssign()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.filenet.vw.base.solution.CEObjectInfogetCEObjectInfo()Return a CEObjectInfo associated with a guid field, this method will only return an CEObjectInfo in the context of certain validation operations.java.lang.StringgetDescription()Gets the description of the data field.intgetFieldType()Gets the integer value that represents the field's field type.intgetMergeType()Gets the merge type property for the data field.java.lang.StringgetName()Gets the String from the name property on the data field.VWGuidgetRequiredClass()Gets the required class.java.lang.StringgetStringValue()Gets the initial value of the field type definition in String format, converted from any valid field type.java.lang.ObjectgetValue()Gets the value of the field in the format of any valid field type, as a Java Object.java.lang.StringgetXMLSchemaElement()Gets the XML Schema Element.java.lang.StringgetXMLSchemaName()Gets the XML Schema Name.booleanisArray()Gets the value of the isArray flag.voidsetDescription(java.lang.String theDescription)Modifies the String containing the description for the data field.voidsetMergeType(int theMergeType)Modifies the merge type property for the data field.voidsetName(java.lang.String theName)Changes the data field name property.voidsetRequiredClass(VWGuid theRequiredClass)Sets the required class.voidsetValue(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.voidsetValue(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.voidsetXMLSchemaElement(java.lang.String theSchemaElement)Sets the XML Schema Element.voidsetXMLSchemaName(java.lang.String theSchemaName)Sets the XML Schema Name.java.lang.StringtoString()Gets the name of the data field.voidtoXML(java.lang.StringBuffer theBuffer)voidtoXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)voidvalidate(VWSession theSession, java.util.Vector EDefVector)
-
-
-
Method Detail
-
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 run time. 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.
-
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 VWExceptionModifies 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 run time, 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:
getFieldTypein interfaceIVWField- Specified by:
getFieldTypein interfacefilenet.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:
toStringin classjava.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 run time, so will not appear in design-time applications (such as the Process Designer or Configuration Console).
- Specified by:
getNamein interfacefilenet.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 VWExceptionChanges 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 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:
getStringValuein interfaceIVWField- 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:
getValuein interfaceIVWField- Specified by:
getValuein interfacefilenet.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 VWExceptionModifies the value of the field, ensuring that the field type of this field definition matches the field type of the input value.- Specified by:
setValuein interfaceIVWField- Specified by:
setValuein interfacefilenet.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 VWExceptionModifies 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 VWExceptionSets 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. Attempting to get or set the schema name 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- A String containing the new schema name value for this XML field definition.- Throws:
VWException- Thrown if the field type of this field definition is not FIELD_TYPE_XML.
-
getXMLSchemaName
public java.lang.String getXMLSchemaName() throws VWExceptionGets 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. Attempting to get or set the schema name for non-XML fields will result in an exception. The schema name should the name of a VWSchema in the containing workflow definition.- Returns:
- A String containing 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 VWExceptionSets 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. Attempting to get or set the schema name 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- Thrown if the field type of this field definition is not FIELD_TYPE_XML.
-
getXMLSchemaElement
public java.lang.String getXMLSchemaElement() throws VWExceptionGets 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. Attempting to get or set the schema name 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- Thrown if the field type of this field definition is not FIELD_TYPE_XML.
-
setRequiredClass
public void setRequiredClass(VWGuid theRequiredClass) throws VWException
Sets the required class. If the field type is FIELD_TYPE_GUID it may have an associated required class. This will be null for all other field types. Attempting to get or set the required class for non-guid fields will result in an exception.- Parameters:
theRequiredClass- A VWGuid object representing the required class for this field definition.- Throws:
VWException- Thrown if the field type of this field definition is not FIELD_TYPE_GUID.- Since:
- PE 4.6.0
-
getRequiredClass
public VWGuid getRequiredClass() throws VWException
Gets the required class. If the field type is FIELD_TYPE_GUID it may have an associated required class. This will be null for all other field types. Attempting to get or set the required class for non-guid fields will result in an exception.- Returns:
- A VWGuid containing the required class for this field definition.
- Throws:
VWException- Thrown if the field type of this field definition is not FIELD_TYPE_GUID.- Since:
- PE 4.6.0
-
toXML
public void toXML(java.lang.StringBuffer theBuffer) throws VWExceptionDeprecated. UseVWWorkflowDefinition.write(java.io.OutputStream)orVWWorkflowDefinition.writeToFile(String).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:
VWWorkflowDefinition
-
toXPDL
public void toXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer) throws VWExceptionDeprecated. UseVWWorkflowCollectionDefinition.write(java.io.OutputStream)orVWWorkflowCollectionDefinition.writeToFile(String).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:
VWWorkflowCollectionDefinition
-
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 thisVWFieldDefinitionobject.- Overrides:
clonein classjava.lang.Object- Returns:
- An clone of this instance.
-
getCEObjectInfo
public filenet.vw.base.solution.CEObjectInfo getCEObjectInfo()
Return a CEObjectInfo associated with a guid field, this method will only return an CEObjectInfo in the context of certain validation operations. It will always return null for non-guid fields, and will often return null even for valid guid fields if the code that constructed the IFieldCollection containing the IField object did not set the CEObjectInfo value.- Specified by:
getCEObjectInfoin interfacefilenet.vw.base.exprcomp.IField- Returns:
- a CEObjectInfo object
- Since:
- PE 4.6.0
-
-