org.apache.jackrabbit.webdav.security
Class Privilege

java.lang.Object
  extended by org.apache.jackrabbit.webdav.security.Privilege
All Implemented Interfaces:
XmlSerializable

public class Privilege
extends Object
implements XmlSerializable

Privilege


Field Summary
static Privilege PRIVILEGE_ALL
          DAV:all is an aggregate privilege that contains the entire set of privileges that can be applied to the resource.
static Privilege PRIVILEGE_BIND
          The DAV:bind privilege allows a method to add a new member URL to the specified collection (for example via PUT or MKCOL).
static Privilege PRIVILEGE_READ
          The read privilege controls methods that return information about the state of the resource, including the resource's properties.
static Privilege PRIVILEGE_READ_ACL
          The DAV:read-acl privilege controls the use of PROPFIND to retrieve the DAV:acl property of the resource.
static Privilege PRIVILEGE_READ_CURRENT_USER_PRIVILEGE_SET
          The DAV:read-current-user-privilege-set privilege controls the use of PROPFIND to retrieve the DAV:current-user-privilege-set property of the resource.
static Privilege PRIVILEGE_UNBIND
          The DAV:unbind privilege allows a method to remove a member URL from the specified collection (for example via DELETE or MOVE).
static Privilege PRIVILEGE_UNLOCK
          The DAV:unlock privilege controls the use of the UNLOCK method by a principal other than the lock owner (the principal that created a lock can always perform an UNLOCK).
static Privilege PRIVILEGE_WRITE
          The write privilege controls methods that lock a resource or modify the content, dead properties, or (in the case of a collection) membership of the resource, such as PUT and PROPPATCH.
static Privilege PRIVILEGE_WRITE_ACL
          The DAV:write-acl privilege controls use of the ACL method to modify the DAV:acl property of the resource.
static Privilege PRIVILEGE_WRITE_CONTENT
          The DAV:write-content privilege controls methods that modify the content of an existing resource, such as PUT.
static Privilege PRIVILEGE_WRITE_PROPERTIES
          The DAV:write-properties privilege controls methods that modify the dead properties of the resource, such as PROPPATCH.
static String XML_PRIVILEGE
           
 
Method Summary
 String getName()
           
 Namespace getNamespace()
           
static Privilege getPrivilege(Element privilege)
          Factory method to create/retrieve a Privilege from the given DAV:privilege element.
static Privilege getPrivilege(String privilege, Namespace namespace)
          Factory method to create/retrieve a Privilege.
 Element toXml(Document document)
          Returns the xml representation of the implementing object as Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_PRIVILEGE

public static final String XML_PRIVILEGE
See Also:
Constant Field Values

PRIVILEGE_READ

public static final Privilege PRIVILEGE_READ
The read privilege controls methods that return information about the state of the resource, including the resource's properties. Affected methods include GET and PROPFIND and OPTIONS.

See Also:
RFC 3744 Section 3.1. DAV:read Privilege

PRIVILEGE_WRITE

public static final Privilege PRIVILEGE_WRITE
The write privilege controls methods that lock a resource or modify the content, dead properties, or (in the case of a collection) membership of the resource, such as PUT and PROPPATCH.

See Also:
RFC 3744 Section 3.2. DAV:write Privilege

PRIVILEGE_WRITE_PROPERTIES

public static final Privilege PRIVILEGE_WRITE_PROPERTIES
The DAV:write-properties privilege controls methods that modify the dead properties of the resource, such as PROPPATCH. Whether this privilege may be used to control access to any live properties is determined by the implementation.

See Also:
RFC 3744 Section 3.3. DAV:write-properties Privilege

PRIVILEGE_WRITE_CONTENT

public static final Privilege PRIVILEGE_WRITE_CONTENT
The DAV:write-content privilege controls methods that modify the content of an existing resource, such as PUT.

See Also:
RFC 3744 Section 3.4. DAV:write-content Privilege

PRIVILEGE_UNLOCK

public static final Privilege PRIVILEGE_UNLOCK
The DAV:unlock privilege controls the use of the UNLOCK method by a principal other than the lock owner (the principal that created a lock can always perform an UNLOCK).

See Also:
RFC 3744 Section 3.5. DAV:unlock Privilege

PRIVILEGE_READ_ACL

public static final Privilege PRIVILEGE_READ_ACL
The DAV:read-acl privilege controls the use of PROPFIND to retrieve the DAV:acl property of the resource.

See Also:
RFC 3744 Section 3.6. DAV:read-acl Privilege

PRIVILEGE_READ_CURRENT_USER_PRIVILEGE_SET

public static final Privilege PRIVILEGE_READ_CURRENT_USER_PRIVILEGE_SET
The DAV:read-current-user-privilege-set privilege controls the use of PROPFIND to retrieve the DAV:current-user-privilege-set property of the resource.

See Also:
RFC 3744 Section 3.7. DAV:"read-current-user-privilege-set Privilege

PRIVILEGE_WRITE_ACL

public static final Privilege PRIVILEGE_WRITE_ACL
The DAV:write-acl privilege controls use of the ACL method to modify the DAV:acl property of the resource.

See Also:
RFC 3744 Section 3.8. DAV:write-acl Privilege

PRIVILEGE_BIND

public static final Privilege PRIVILEGE_BIND
The DAV:bind privilege allows a method to add a new member URL to the specified collection (for example via PUT or MKCOL). It is ignored for resources that are not collections.

See Also:
RFC 3744 Section 3.9. DAV:bind Privilege

PRIVILEGE_UNBIND

public static final Privilege PRIVILEGE_UNBIND
The DAV:unbind privilege allows a method to remove a member URL from the specified collection (for example via DELETE or MOVE). It is ignored for resources that are not collections.

See Also:
RFC 3744 Section 3.10. DAV:unbind Privilege

PRIVILEGE_ALL

public static final Privilege PRIVILEGE_ALL
DAV:all is an aggregate privilege that contains the entire set of privileges that can be applied to the resource.

See Also:
RFC 3744 Section 3.11. DAV:all Privilege
Method Detail

getName

public String getName()
Returns:
The local name of this Privilege.

getNamespace

public Namespace getNamespace()
Returns:
The namespace of this Privilege.

toXml

public Element toXml(Document document)
Description copied from interface: XmlSerializable
Returns the xml representation of the implementing object as Element. The given Document is used as factory and represents the owner document of the returned DOM element.

Specified by:
toXml in interface XmlSerializable
Parameters:
document - to be used as factory.
Returns:
a w3c element representing this object
See Also:
XmlSerializable.toXml(Document)

getPrivilege

public static Privilege getPrivilege(String privilege,
                                     Namespace namespace)
Factory method to create/retrieve a Privilege.

Parameters:
privilege -
namespace -
Returns:

getPrivilege

public static Privilege getPrivilege(Element privilege)
                              throws DavException
Factory method to create/retrieve a Privilege from the given DAV:privilege element.

Parameters:
privilege -
Returns:
Throws:
DavException


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