|
Collaboration API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The BsoElements
interface aids in manipulating the upper-level elements
of the content (manifest information). This interface treats the content as
if it were like a collection of BsoElement
entries. It provides
low-level methods that are internally called to get, set, add, and remove
element functions, and two methods that return iterators over the collection.
Method Summary | |
void |
addElement(BsoElement elem)
Adds an element to the content and sets the element's change flag. |
void |
addElementUnchanged(BsoElement elem)
Adds an element to the content without modifying its change flag. |
boolean |
checkUpdateConflict(BsoElement elem,
BsoElement newElem)
Internally called to check for update conflicts between a modified element and the given recently-persisted element. |
void |
clearDeletedList()
Clears the list of deleted elements. |
java.util.List |
getAllElements()
Returns a list of all of the upper-level elements in the content. |
java.util.List |
getChangedElements()
Returns a list of all of the changed upper-level elements in the content. |
BsoElement |
getElement(BsoElement elem)
Retrieves an element in the content given another element. |
BsoElement |
getElement(java.lang.String id,
int type)
Retrieves an element in the content given another element. |
boolean |
postLoad()
Sets up content after loading it. |
void |
preStore()
Sets up content before persisting it. |
void |
preUpdateProcess()
Sets up content at the beginning of the update process. |
boolean |
removeElement(BsoElement elem)
Removes an element from the content and sets the element's change flag. |
boolean |
removeElement(java.lang.String id,
int type)
Removes an element from the content and sets the element's change flag. |
boolean |
reorderElements()
Reorders the elements. |
BsoElement |
setElement(BsoElement elem)
Replaces an existing element with another. |
void |
setElementChanged(BsoElement elem)
Sets the change flag of the given element. |
Method Detail |
public java.util.List getAllElements()
List
object.public java.util.List getChangedElements()
List
object.public void clearDeletedList()
public BsoElement getElement(BsoElement elem)
null
if an element cannot be found.
elem
- A similar element to find.
null
.public BsoElement getElement(java.lang.String id, int type)
null
if an element of the
given type and ID cannot be found.
id
- A String
containing the element's manifest ID.
type
- The element type, specified as BsoManifest.TYPE_DOCUMENT_ORDERING
,
BsoManifest.TYPE_MANIFEST_DOCUMENT
, or BsoManifest.TYPE_MANIFEST_PACKAGE
.
null
.public void addElement(BsoElement elem)
addElementUnchanged
method.
elem
- The BsoElement
object to add.public void addElementUnchanged(BsoElement elem)
addElement
method.
elem
- The element to add.public boolean removeElement(BsoElement elem)
elem
- The element to be removed.
true
if the element was found and removed; otherwise,
returns false
.public boolean removeElement(java.lang.String id, int type)
id
- A String
containing the element's manifest ID.type
- An integer
that represents the element type
(BsoManifest.TYPE_DOCUMENT_ORDERING
,
BsoManifest.TYPE_MANIFEST_DOCUMENT
, or
BsoManifest.TYPE_MANIFEST_PACKAGE
).true
if the element was found and removed; otherwise,
returns false
.public BsoElement setElement(BsoElement elem)
elem
- The replacement element.
null
if the replacement
failed.public void setElementChanged(BsoElement elem)
elem
- The BsoElement
object to change.public boolean reorderElements()
false
if the reordering failed.
true
if element reordering and content validation succeed;
otherwise, returns false
.public void preUpdateProcess()
public boolean postLoad()
reorderElements()
method.
true
if the method succeeds; otherwise, returns false
public void preStore()
public boolean checkUpdateConflict(BsoElement elem, BsoElement newElem)
An update conflict is a situation in which you want to update an element, but someone else has concurrently updated the same element. This check allows you to disregard, for instance, a recent concurrent change to document ordering.
elem
- The updated element to check.
newElem
- The recently persisted copy of the same element.
true
if an update conflict exists; otherwise, returns false
.
|
Collaboration API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |