org.eclipse.webdav.dom
Class MultiStatus

java.lang.Object
  extended by org.eclipse.webdav.dom.ElementEditor
      extended by org.eclipse.webdav.dom.MultiStatus

public class MultiStatus
extends ElementEditor

An element editor for the WebDAV multistatus element. See RFC2518 section 12.9 for the element's definition.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

See Also:
ResponseBody

Field Summary
protected static String[] childNames
          An ordered collection of the element names of the multistatus element's children.
 
Fields inherited from class org.eclipse.webdav.dom.ElementEditor
DAV_NS, root, XML_NS_NAME, XML_NS_PREFIX, XML_PREFIX
 
Constructor Summary
MultiStatus(Element root)
          Creates a new editor on the given WebDAV multistatus element.
 
Method Summary
 ResponseBody addResponse()
          Creates and adds a response element to this multistatus and returns an editor on it.
static MultiStatus create(Document document)
          Creates a new WebDAV multistatus element and sets it as the root of the given document.
 String getResponseDescription()
          Returns this multistatus' response description, or null if it has none.
 Enumeration getResponses()
          Returns an Enumeration over this multistatus' responses.
 void setResponseDescription(String value)
          Sets this multistatus' response description to the given value.
 
Methods inherited from class org.eclipse.webdav.dom.ElementEditor
addChild, addChild, addChild, appendChild, appendChild, cloneNode, create, declareNS, decodeHref, encodeHref, ensure, ensure, ensureDAVElement, ensureDAVElement, ensureNotNull, ensureNull, ensureText, extractElement, extractNode, getChild, getChildElement, getChildText, getDAVChild, getElement, getFirstChild, getFirstChild, getFirstText, getLastChild, getNamespaces, getNamespaces, getNextSibling, getNextSibling, getNextSibling, getNSLocalName, getNSLocalName, getNSName, getNSPrefix, getNSPrefix, getQualifiedName, getSibling, getText, getTwin, hasChild, insertBefore, insertBefore, isDAVElement, isDAVElement, isElement, isText, makeNSStandalone, reduceNS, reduceNS, resolve, setChild, setChild, setChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

childNames

protected static final String[] childNames
An ordered collection of the element names of the multistatus element's children.

Constructor Detail

MultiStatus

public MultiStatus(Element root)
            throws MalformedElementException
Creates a new editor on the given WebDAV multistatus element. The element is assumed to be well formed.

Parameters:
root - a multistatus element
Throws:
MalformedElementException - if there is reason to believe that the element is not well formed
Method Detail

addResponse

public ResponseBody addResponse()
Creates and adds a response element to this multistatus and returns an editor on it.

Returns:
an editor on a response element

create

public static MultiStatus create(Document document)
Creates a new WebDAV multistatus element and sets it as the root of the given document. Returns an editor on the new multistatus element.

The document must not be null, and must not already have a root element.

Parameters:
document - the document that will become the root of a new multistatus element
Returns:
an element editor on a multistatus element

getResponseDescription

public String getResponseDescription()
                              throws MalformedElementException
Returns this multistatus' response description, or null if it has none.

Returns:
this multistatus' response description, or null
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

getResponses

public Enumeration getResponses()
                         throws MalformedElementException
Returns an Enumeration over this multistatus' responses.

Returns:
an Enumeration of ResponseBodys
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

setResponseDescription

public void setResponseDescription(String value)
Sets this multistatus' response description to the given value. If the value is null and a response description has already been set, it is removed.

Parameters:
value - a response description, or null


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.