org.eclipse.webdav.dom
Class PropStat

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

public class PropStat
extends ElementEditor

An element editor for the WebDAV propstat element. See RFC2518 section 12.9.1.1 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:
Response, Prop

Field Summary
protected static String[] childNames
          An ordered collection of the element names of the propstat 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
PropStat(Element root)
          Creates a new editor on the given WebDAV propstat element.
 
Method Summary
 Prop getProp()
          Returns this propstat's prop.
 String getResponseDescription()
          Returns this propstat's response description.
 String getStatus()
          Returns this propstat's status.
 int getStatusCode()
          Returns this propstat's status code.
 Prop setProp()
          Creates and sets a new prop on this propstat and returns an editor on it.
 void setResponseDescription(String value)
          Sets this propstat's response description to the given value.
 void setStatus(String status)
          Sets the status on this propstat to the given status.
 
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 propstat element's children.

Constructor Detail

PropStat

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

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

getProp

public Prop getProp()
             throws MalformedElementException
Returns this propstat's prop.

Returns:
this propstat's prop
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

getResponseDescription

public String getResponseDescription()
                              throws MalformedElementException
Returns this propstat's response description.

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

getStatus

public String getStatus()
                 throws MalformedElementException
Returns this propstat's status.

Returns:
this propstat's status
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

getStatusCode

public int getStatusCode()
                  throws MalformedElementException
Returns this propstat's status code.

Returns:
this propstat's status code
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

setProp

public Prop setProp()
Creates and sets a new prop on this propstat and returns an editor on it.

Returns:
an editor on a new prop element

setResponseDescription

public void setResponseDescription(String value)
Sets this propstat's 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

setStatus

public void setStatus(String status)
Sets the status on this propstat to the given status. The status must not be null.

Parameters:
status - the status for this propstat


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