Process Class Relationships

filenet.vw.api
Class VWAttachment

java.lang.Object
  |
  +--filenet.vw.api.VWAttachment
All Implemented Interfaces:
java.io.Serializable

public final class VWAttachment
extends java.lang.Object
implements java.io.Serializable

Use this class to access the identity, associated library or object store, type, Document ID, and version series of an attachment used in a workflow process.

Since:
VWWS3.10
See Also:
VWDataField, VWParameter, Serialized Form

Field Summary
static char SEPARATOR
          Insert this separator ('|' or hex 7C) between attributes of a string-formatted attachment, as in an XML file or an XML transfer stream to the server.
 
Constructor Summary
VWAttachment()
          Creates a VWAttachment object with empty values, initially.
VWAttachment(java.lang.String theValue)
          Creates a VWAttachment object and sets the initial value.
 
Method Summary
 java.lang.String getAttachmentDescription()
          Gets the description for an attachment.
 java.lang.String getAttachmentName()
          Gets the document name associated with this attachment.
 java.lang.String getId()
          Gets the object or document ID for the attachment.
 java.lang.String getLibraryName()
          Gets the name of the library or object store where the attachment resides.
 int getLibraryType()
          Gets the library type of the library or object store that contains this attachment.
 int getType()
          Gets the attachment type value for the associated attachement.
 java.lang.String getVersion()
          Gets the version of this attachment.
 void setAttachmentDescription(java.lang.String theAttachmentDescription)
          Sets the description for an attachment.
 void setAttachmentName(java.lang.String theAttachmentName)
          Sets the document name for this attachment.
 void setId(java.lang.String theId)
          Sets the document ID associated with the attachment.
 void setLibraryName(java.lang.String theLibraryName)
          Sets the name of the library or object store associated with this attachment.
 void setLibraryType(int theLibraryType)
          Sets the library or object store type for the library or object store containing this attachment.
 void setType(int theAttachmentType)
          Sets the attachment type value for the associated attachment.
 void setVersion(java.lang.String theVersion)
          Sets the GUID for the attachment version for this attachment document.
 java.lang.String toString()
          Gets the String representation of a VWAttachment object associated with a document contained in library or object store The String contains seven elements; each element is delimited by the SEPARATOR.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends a description of this object's properties, formatted as an XML string, to the specified input buffer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

public static final char SEPARATOR
Insert this separator ('|' or hex 7C) between attributes of a string-formatted attachment, as in an XML file or an XML transfer stream to the server. You cannot use this character in String data members of this class.
Constructor Detail

VWAttachment

public VWAttachment()
Creates a VWAttachment object with empty values, initially.

VWAttachment

public VWAttachment(java.lang.String theValue)
             throws VWException
Creates a VWAttachment object and sets the initial value.
Parameters:
theValue - A String representation of the attachment values in the format produced by toString().
Throws:
VWException - Thrown if the passed in value is not valid, due to either format or content.
See Also:
VWAttachmentType, VWLibraryType, toString()
Method Detail

getId

public java.lang.String getId()
Gets the object or document ID for the attachment.
Returns:
The document ID or version series GUID of the attachment
See Also:
getVersion()

setId

public void setId(java.lang.String theId)
           throws VWException
Sets the document ID associated with the attachment.
Parameters:
theId - The document ID or version series GUID. You cannot include the SEPARATOR character, which is reserved for internal use.
Throws:
VWException - This method throws an exception if the restricted <SEPARATOR> character is found in the String.

getVersion

public java.lang.String getVersion()
Gets the version of this attachment. A version is a unique instance of a document or stored search. Each time a document is updated, a new version is created.
Returns:
A String containing the GUID for the attachment version, null if the current version is selected, and null if the document type is not a document or stored search.

setVersion

public void setVersion(java.lang.String theVersion)
                throws VWException
Sets the GUID for the attachment version for this attachment document.
Parameters:
theVersion - The String value of the new version GUID for the attachment.
Throws:
VWException - Thrown if the method fails to set the attachment version information.

getLibraryName

public java.lang.String getLibraryName()
Gets the name of the library or object store where the attachment resides.
Returns:
A String value that contains the name of the library or object store containing the attachment.

setLibraryName

public void setLibraryName(java.lang.String theLibraryName)
                    throws VWException
Sets the name of the library or object store associated with this attachment.
Parameters:
theLibraryName - String value to set as the library or object store name. You cannot use the SEPARATOR character, which is reserved for internal use.

Library and Object store names conform to the database naming convention rules for your database. In general, this means that an object store name may be up to 64 characters long and cannot contain any of the following characters:

    \ / : * ? " < > |

See the documentation for your database for information on further restrictions that apply.

Throws:
VWException - This method throws an exception if the restricted <SEPARATOR> character is found in the String.

getAttachmentName

public java.lang.String getAttachmentName()
Gets the document name associated with this attachment.
Returns:
A String containing the document name for this attachment.

setAttachmentName

public void setAttachmentName(java.lang.String theAttachmentName)
                       throws VWException
Sets the document name for this attachment.
Parameters:
theAttachmentName - A String containing the attachment name. You cannot use the SEPARATOR character, which is reserved for internal use.
Throws:
VWException - This method throws an exception if the restricted <SEPARATOR> character is found in the String.

getAttachmentDescription

public java.lang.String getAttachmentDescription()
Gets the description for an attachment.
Returns:
A String containing the description associated with the attachment.

setAttachmentDescription

public void setAttachmentDescription(java.lang.String theAttachmentDescription)
                              throws VWException
Sets the description for an attachment.
Parameters:
theAttachmentDescription - A String containing the attachment description. You cannot use the SEPARATOR character, which is reserved for internal use.
Throws:
VWException - This method throws an exception if the restricted <SEPARATOR> character is found in the String.

getType

public int getType()
Gets the attachment type value for the associated attachement.
Returns:
An integer value associated with the associated attachement's attachment type description.
See Also:
VWAttachmentType

setType

public void setType(int theAttachmentType)
             throws VWException
Sets the attachment type value for the associated attachment.
Parameters:
theAttachmentType - Integer value of the new type for the associated attachment. You cannot use the SEPARATOR character, which is reserved for internal use.
Throws:
VWException - Thrown if the restricted <SEPARATOR> character is found in the String.
See Also:
VWAttachmentType

getLibraryType

public int getLibraryType()
Gets the library type of the library or object store that contains this attachment.
Returns:
An integer value associated with the localizable library or object store type description.
See Also:
VWLibraryType, setLibraryType(int)

setLibraryType

public void setLibraryType(int theLibraryType)
                    throws VWException
Sets the library or object store type for the library or object store containing this attachment.
Parameters:
thelibraryType - An integer value for the new library or object store type of the attachment.
Throws:
VWException - Thrown if the library or object store type is invalid.
See Also:
VWLibraryType

toString

public java.lang.String toString()
Gets the String representation of a VWAttachment object associated with a document contained in library or object store The String contains seven elements; each element is delimited by the SEPARATOR. The String elements are:

  1. Attachment name
  2. Attachment description
  3. Attachment type
  4. Type of * library or object store that has the attachment
  5. Name of the * library or object store that has the attachment
  6. Attachment ID
  7. (Optional) version, if the attachment is a document or stored search

Overrides:
toString in class java.lang.Object
Returns:
A String representation of a VWAttachment object.
See Also:
VWAttachmentType, VWLibraryType

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends a description of this object's properties, formatted as an XML string, to the specified input buffer.

This description includes Name, Description, Library, Id, Library Type, Type, and Version.

Warning: This general list of properties currently contained in the appended string is subject to change without notice.

Parameters:
theBuffer - A string buffer that this method will append with XML content.
Throws:
VWException -  
See Also:
VWXMLUtil


Copyright © 2002, 2003 FileNet Corporation. All rights reserved.