filenet.vw.api

Class VWAttributeInfo

  • java.lang.Object
    • filenet.vw.api.VWAttributeInfo
  • All Implemented Interfaces:
    java.io.Serializable


    public final class VWAttributeInfo
    extends java.lang.Object
    implements java.io.Serializable
    VWAttributeInfo objects contain a set of name-value pairs; the VWAttributeInfo class enables users to associate properties they define with VWOperationDefinition, VWQueueDefinition, VWStepDefinition, VWSystemAdministration, VWSystemConfiguration, and VWWorkflowDefinition objects.

    Initialize or modify an instance of this class using the setAttributeInfo method in any of these associated classes; get an instance of this class with the getAttributeInfo method of any of these associated classes. Individual values held in a VWAttributeInfo object may be accessed and maintained with the methods documented here.

    Other workflow-related applications, such as System Console, may also use attributes to hold settings or other functional results. These applications may initialize or maintain attributes whose names are prefixed with "F_".

    Contents of a VWSystemAdministration-produced VWAttributeInfo object are saved to the workflow server with VWSystemAdministration.commit(). Contents of a VWAttributeInfo object associated with a VWSystemConfiguration or VWQueueDefinition object is saved to the workflow server with VWSystemConfiguration.commit(). The VWAttributeInfo objects associated with the VWWorkflowDefinition, VWStepDefinition, and VWOperation classes are saved to the workflow server with a session transfer, using VWSession.transfer(VWWorkflowDefinition, String, boolean, boolean).

    Since:
    VWWS3.10
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      VWAttributeInfo()
      Constructor for creating a VWAttributeInfo Object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void deleteField(java.lang.String fieldName)
      Deletes a field entry, specified by name.
      java.lang.String[] getAttributeNames()
      Gets the attribute names.
      int getFieldType(java.lang.String fieldName)
      Returns the field type of the input field name.
      java.lang.Object getFieldValue(java.lang.String fieldName)
      Gets the object value for the input field name.
      boolean isFieldArray(java.lang.String fieldName)
      Determines whether a field is an array.
      void setFieldValue(java.lang.String fieldName, java.lang.Object fieldValue)
      Initializes, updates, or deletes an attribute.
      void toXML(java.lang.StringBuffer theBuffer)
      Appends an XML string representing this instance to the buffer specified.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setFieldValue

        public void setFieldValue(java.lang.String fieldName,
                         java.lang.Object fieldValue)
                           throws VWException
        Initializes, updates, or deletes an attribute. The action performed depends on the input parameters as follows:
        • If the input attribute name does not already exist, this method creates an attribute whose value is set to that of the input fieldValue object.
        • If the attribute name exists and the fieldValue parameter is not null, this method updates the named attribute value to the valid fieldValue object's value.
          Note: To be valid, the input fieldValue object type must match that of the update target. Currently, only String types are valid for VWAttributeInfo objects that pertain to QueueDefinition, OperationDefinition, and WorkflowDefinition objects.
        • If the fieldValue parameter is null and the attribute named by the fieldName parameter exists, this method removes the named attribute.
        Note: Do not initialize, update, or delete attributes whose names begin with "F_". This is because other workflow-related applications, such as System Console, may use attributes with such names to hold system settings or other functional results.
        Parameters:
        fieldName - The name of the attribute whose value is to be set. This may not be null.
        fieldValue - The object value for the named attribute. The type for this object must be one of the basic field types or VWFieldType.FIELD_TYPE_GUID. Null is not permitted if the fieldName parameter does not name an existing attribute.
        Throws:
        VWException - Thrown due to conditions which may include the following:
        • The fieldValue object is non-null and is not one of the VWFieldType basic field types.
        • The specified fieldName exists, but has a different object type from that of the specified fieldValue object.
        • The specified fieldName does not exist and the fieldValue parameter is null.
        • The specified fieldName is null.
        • The specified fieldValue object is an array that has a length of 0 or contains one or more null elements.
        See Also:
        VWAttributeInfo.getFieldType(String), VWFieldType
      • getFieldValue

        public java.lang.Object getFieldValue(java.lang.String fieldName)
                                       throws VWException
        Gets the object value for the input field name.
        Parameters:
        fieldName - The input name to specify the attribute (VWAttributeInfo field).
        Returns:
        An object whose value that is that of the named VWAttributeInfo named field. A name that does correspond to any attribute will return null.
        Throws:
        VWException - Thrown if the fieldName parameter is null.
        See Also:
        VWAttributeInfo.getFieldType(String), VWAttributeInfo.setFieldValue(String, Object)
      • getFieldType

        public int getFieldType(java.lang.String fieldName)
                         throws VWException
        Returns the field type of the input field name.
        Parameters:
        fieldName - The name of the field whose type will be returned.
        Returns:
        An integer value that represents the field type, VWFieldType.FIELD_TYPE_GUID, or -1 if the field value is null.

        If successful, one of the following field type values is returned:

        • 1 (VWFieldType.FIELD_TYPE_INT)
        • 2 (VWFieldType.FIELD_TYPE_STRING)
        • 4 (VWFieldType.FIELD_TYPE_BOOLEAN)
        • 8 (VWFieldType.FIELD_TYPE_FLOAT)
        • 16 (VWFieldType.FIELD_TYPE_TIME)
        • 512 (VWFieldType.FIELD_TYPE_GUID)
        Throws:
        VWException - Thrown if the fieldName parameter is null.
      • isFieldArray

        public boolean isFieldArray(java.lang.String fieldName)
                             throws VWException
        Determines whether a field is an array.
        Parameters:
        fieldName - The name of the field to check.
        Returns:
        A boolean value: 'true' if the field is an array; 'false' if the field is not an array.
        Throws:
        VWException - Thrown if the fieldName parameter is null.
      • deleteField

        public void deleteField(java.lang.String fieldName)
                         throws VWException
        Deletes a field entry, specified by name.
        Parameters:
        fieldName - The name of the field to be deleted.
        Throws:
        VWException - Thrown if it cannot delete the specified field entry--for example, if the field name does not exist.
      • getAttributeNames

        public java.lang.String[] getAttributeNames()
                                             throws VWException
        Gets the attribute names.
        Returns:
        List of attribute names for this object. Null is returned if there are no attributes.
        Throws:
        VWException
      • 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

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