Collaboration API Documentation

com.filenet.bso.api.util
Interface BsoElement


public interface BsoElement

Interface of common fields and methods in all upper-level elements of the content. This interface simplifies the handling of these upper-level elements, which for the reference implementation include <manifest-document>, <manifest-package> and <document-ordering> XML elements.


Field Summary
static int CHANGE_ADDED
          Value of 2; integer constant showing that the element has been added.
static int CHANGE_DELETED
          Value of 4; integer constant showing that the element has been deleted.
static int CHANGE_LOCKED
          Value of 1; integer constant showing that the element has been locked in preparation for updating or deleting.
static int CHANGE_NONE
          Value of 0; integer constant showing that the element is unchanged.
static int CHANGE_UPDATED
          Value of 3; integer constant showing that the element has been updated.
 
Method Summary
 void deleteSeq()
          Marks the update sequence number to "unset" for this element.
 int getChange()
          Returns the changed flag for this element.
 java.lang.String getGuid()
          Returns the Content Engine GUID for this element.
 java.lang.String getManifestID()
          Returns the manifest identifier for this element.
 int getSeq()
          Returns the update sequence number for this element.
 int getType()
          Returns this element's type.
 boolean hasSeq()
          Determines whether or not the update sequence number is set for this element.
 void marshal(java.io.BufferedWriter out)
          Writes a "marshaled" version of the element to an OutputStream object.
 void setChange(int change)
          Sets the changed flag for this element.
 void setGuid(java.lang.String guid)
          Sets the Content Engine GUID for this element.
 void setManifestID(java.lang.String manifestID)
          Sets the manifest identifier for this element.
 void setSeq(int seq)
          Sets the update sequence number for this element.
 

Field Detail

CHANGE_NONE

public static final int CHANGE_NONE
Value of 0; integer constant showing that the element is unchanged.

CHANGE_LOCKED

public static final int CHANGE_LOCKED
Value of 1; integer constant showing that the element has been locked in preparation for updating or deleting.

CHANGE_ADDED

public static final int CHANGE_ADDED
Value of 2; integer constant showing that the element has been added.

CHANGE_UPDATED

public static final int CHANGE_UPDATED
Value of 3; integer constant showing that the element has been updated.

CHANGE_DELETED

public static final int CHANGE_DELETED
Value of 4; integer constant showing that the element has been deleted.
Method Detail

getType

public int getType()
Returns this element's type.

Returns:
An integer that represents the element type, specific to the application.

getChange

public int getChange()
Returns the changed flag for this element. This flag will be one of the CHANGE_ constants, for example, CHANGE_NONE to indicate that this element has not been changed.

Returns:
An integer representing the value of the change flag.

setChange

public void setChange(int change)
Sets the changed flag for this element.

Parameters:
change - An integer value indicating the type of change.

getGuid

public java.lang.String getGuid()
Returns the Content Engine GUID for this element.

Returns:
A String containing the element's GUID.

setGuid

public void setGuid(java.lang.String guid)
Sets the Content Engine GUID for this element.

Parameters:
guid - A String containing the Content Engine's ID for this element.

getManifestID

public java.lang.String getManifestID()
Returns the manifest identifier for this element.

Returns:
The manifest ID, which is a unique identifier for this element.

setManifestID

public void setManifestID(java.lang.String manifestID)
Sets the manifest identifier for this element. Use with caution since the manifest identifier must uniquely identify this element. A unique value can be generated with the BsoUID object.

Parameters:
manifestID - A String that contains the unique identifier for this element.

getSeq

public int getSeq()
Returns the update sequence number for this element. This number is incremented by 1 each time the element is updated and is used to detect whether or not an update conflict has occurred. This field might not always be present, so before calling this method, first call the hasSeq() method to determine if the field is present.

Returns:
An integer that represents the update sequence number.

setSeq

public void setSeq(int seq)
Sets the update sequence number for this element.

Parameters:
seq - An integer that represents the new value for the update sequence number.

hasSeq

public boolean hasSeq()
Determines whether or not the update sequence number is set for this element.

Returns:
true if the value has been set; otherwise, returns false.

deleteSeq

public void deleteSeq()
Marks the update sequence number to "unset" for this element.

marshal

public void marshal(java.io.BufferedWriter out)
             throws java.io.IOException
Writes a "marshaled" version of the element to an OutputStream object. In this implementation, the marshaled output will always be an XML representation.

Parameters:
out - The BufferedWriter object to which the XML is written.

Throws:
java.io.IOException - Thrown if the marshaling operation fails.

Collaboration API Documentation

Copyright ?2002 - 2005 FileNet Corporation. All rights reserved.