org.eclipse.webdav.dom
Class LockInfo

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

public class LockInfo
extends ElementEditor

An element editor for the WebDAV lockinfo element. See RFC2518 section 12.6 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:
Owner

Field Summary
static String[] childNames
          An ordered collection of the element names of the lockinfo 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
LockInfo(Element root)
          Creates a new editor on the given WebDAV lockinfo element.
 
Method Summary
static LockInfo create(Document document)
          Creates a new WebDAV lockinfo element and sets it as the root of the given document.
 Owner getOwner()
          Returns this lockinfo's owner, or null if this lockinfo has no owner.
 boolean isShared()
          Returns true if this lockinfo is shared and false if it is exclusive.
 void setIsShared(boolean isShared)
          Sets whether this lockinfo is shared or exclusive.
 Owner setOwner()
          Sets the owner on this lockinfo and returns an editor on it.
 
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 final String[] childNames
An ordered collection of the element names of the lockinfo element's children.

Constructor Detail

LockInfo

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

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

create

public static LockInfo create(Document document)
Creates a new WebDAV lockinfo element and sets it as the root of the given document. Returns an editor on the new lockinfo 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 lockinfo element
Returns:
an element editor on a lockinfo element

getOwner

public Owner getOwner()
               throws MalformedElementException
Returns this lockinfo's owner, or null if this lockinfo has no owner.

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

isShared

public boolean isShared()
                 throws MalformedElementException
Returns true if this lockinfo is shared and false if it is exclusive.

Returns:
a boolean indicating whether this lockinfo is shared or exclusive
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

setIsShared

public void setIsShared(boolean isShared)
Sets whether this lockinfo is shared or exclusive. If isShared is true, the lockinfo is set as shared, otherwise, the lockinfo is set as exclusive.

Parameters:
isShared - a boolean indicating whether this lockinfo will be set to be shared or exclusive

setOwner

public Owner setOwner()
Sets the owner on this lockinfo and returns an editor on it.



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