org.eclipse.webdav.dom
Class Update

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

public class Update
extends ElementEditor

An element editor for the WebDAV update element.

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.


Field Summary
static String[] childNames
           
 
Fields inherited from class org.eclipse.webdav.dom.ElementEditor
DAV_NS, root, XML_NS_NAME, XML_NS_PREFIX, XML_PREFIX
 
Constructor Summary
Update(Element root)
          Creates a new editor on the given WebDAV set target element.
 
Method Summary
static Update createLabel(Document document, String label)
          Creates a new WebDAV update element and sets it as the root of the given document.
static Update createVersion(Document document, String href)
          Creates a new WebDAV update element and sets it as the root of the given document.
 String getLabel()
           
 String getVersion()
          Returns this response's first DAV:version child element.
 boolean isVersion()
           
 void setLabelName(String label)
          Sets the DAV:label child element.
 void setVersion(String href)
          Sets the DAV:version child element.
 
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

public static String[] childNames
Constructor Detail

Update

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

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

createLabel

public static Update createLabel(Document document,
                                 String label)
Creates a new WebDAV update element and sets it as the root of the given document. Returns an editor on the new 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 update element.
Returns:
an element editor on an update element.

createVersion

public static Update createVersion(Document document,
                                   String href)
Creates a new WebDAV update element and sets it as the root of the given document. Returns an editor on the new 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 update element
Returns:
an element editor on a set-target element

getLabel

public String getLabel()
                throws MalformedElementException
Throws:
MalformedElementException

getVersion

public String getVersion()
                  throws MalformedElementException
Returns this response's first DAV:version child element.

Returns:
this response's first version href.
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

isVersion

public boolean isVersion()
                  throws MalformedElementException
Throws:
MalformedElementException

setLabelName

public void setLabelName(String label)
                  throws MalformedElementException
Sets the DAV:label child element.

Parameters:
label - the string label to the version.
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

setVersion

public void setVersion(String href)
                throws MalformedElementException
Sets the DAV:version child element.

Parameters:
href - the string href to the version.
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed


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