org.apache.jackrabbit.webdav.lock
Class Scope

java.lang.Object
  extended by org.apache.jackrabbit.webdav.lock.Scope
All Implemented Interfaces:
XmlSerializable

public class Scope
extends Object
implements XmlSerializable

The Scope class abstracts the lock scope as defined by RFC 2518.


Field Summary
static Scope EXCLUSIVE
           
static Scope SHARED
           
 
Method Summary
static Scope create(String localName, Namespace namespace)
          Create a Scope object from the given name and namespace.
static Scope createFromXml(Element lockScope)
          Create a Scope object from the given Xml element.
 boolean equals(Object obj)
          Returns true if this Scope is equal to the given one.
 Element toXml(Document document)
          Return the Xml representation of the lock scope object as present in the LOCK request and response body and in the LockDiscovery.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCLUSIVE

public static final Scope EXCLUSIVE

SHARED

public static final Scope SHARED
Method Detail

toXml

public Element toXml(Document document)
Return the Xml representation of the lock scope object as present in the LOCK request and response body and in the LockDiscovery.

Specified by:
toXml in interface XmlSerializable
Parameters:
document - to be used as factory.
Returns:
Xml representation
See Also:
XmlSerializable.toXml(Document)

equals

public boolean equals(Object obj)
Returns true if this Scope is equal to the given one.

Overrides:
equals in class Object
Parameters:
obj -
Returns:

createFromXml

public static Scope createFromXml(Element lockScope)
Create a Scope object from the given Xml element.

Parameters:
lockScope -
Returns:
Scope object.

create

public static Scope create(String localName,
                           Namespace namespace)
Create a Scope object from the given name and namespace.

Parameters:
localName -
namespace -
Returns:
Scope object.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.