|
Collaboration API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes that implement the BsoContentBinder
interface encapsulate
support for marshaling and unmarshaling of XML content to and from Java objects.
They also provide a way to get a BsoElements
interface, which has
methods for manipulating these Java objects.
Each derived concrete class encapsulates knowledge of how to marshal and unmarshal XML content into a hierarchy of Java objects.
Method Summary | |
void |
clearContent()
Clears the XML-based object hierarchy. |
BsoElements |
getElements()
Returns an element manager that implements the BsoElements interface. |
boolean |
getGuidsValid()
Returns whether the Content Engine GUIDs in the elements are valid or not. |
java.lang.Object |
getRootObject()
Returns the root object in the XML-based object hierarchy. |
java.lang.String |
marshalContent()
Returns XML representing the current state of the XML-based Java objects. |
java.lang.String |
marshalElement(BsoElement elem)
Returns the XML for an upper-level object. |
void |
setGuidsValid(boolean guidsValid)
Sets whether the Content Engine GUIDs in the elements are valid or not. |
void |
unmarshalContent(java.lang.String xml)
Sets XML content into the binder, which creates the XML-based Java objects. |
BsoElement |
unmarshalElement(java.lang.String xml,
int type)
Returns a BsoElement created from XML. |
Method Detail |
public void unmarshalContent(java.lang.String xml)
xml
- A String
containing valid, well-formed XML
for the content.public java.lang.String marshalContent()
String
containing the XML content of all Java objects.public java.lang.Object getRootObject()
Consumers of this API must cast the returned object to a specific Java class.
Object
of the XML-based object hierarchy.public void clearContent()
public BsoElement unmarshalElement(java.lang.String xml, int type)
BsoElement
created from XML. Use this method
to create the Java objects for upper-level elements in the object
hierarchy. The input XML must
be valid for the type of object being created. In the case manifest
implementation, an example is:
BsoCaseManifest manifest = (BsoCaseManifest) binder.getRootObject(); String xml = "<document-ordering ManifestID='1234'>" + "<order-id>5678</order-id>" + "<order-id>9ABC</order-id>" + "</document-ordering>"; BsoElement elem = binder.unmarshalElement(xml, BsoManifest.TYPE_DOCUMENT_ORDERING); manifest.setDocumentOrdering((BsoDocumentOrdering) elem);
xml
- A String
containing valid, well-formed
XML for a particular upper-level element.
type
- An integer
representing the type of
element. Valid values vary with the implementation.
(Constants for the element type are defined in
BsoManifest
class.)
BsoElement
interface.public java.lang.String marshalElement(BsoElement elem)
elem
- An upper-level XML-based Java object.
String
containing the XML for the requested object.public boolean getGuidsValid()
True
if valid and false
if not.public void setGuidsValid(boolean guidsValid)
guidsValid
- True
if valid and false
if not.public BsoElements getElements()
BsoElements
interface.
This manager provides useful methods that return an iterator over the upper-level
content elements and also allow you to get, set, add, and remove
elements.
BsoElement
,
BsoElements
|
Collaboration API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |