javax.wvcm
Class AccessControlElement

java.lang.Object
  extended by javax.wvcm.AccessControlElement

public class AccessControlElement
extends java.lang.Object

NOT YET STANDARD

Access Control List (ACL): An "ACL" is a list of access control elements that define access control to a particular resource.

Access Control Element (ACE): An "ACE" either grants or denies a particular set of (non-abstract) privileges for a particular principal.

Inherited ACE: An "inherited ACE" is an ACE that is dynamically shared from the ACL of another resource. When a shared ACE changes on the primary resource, it is also changed on inheriting resources.


Nested Class Summary
static interface AccessControlElement.Privilege
          NOT YET STANDARD Privilege: A "privilege" controls access to a particular set of HTTP operations on a resource.
 
Constructor Summary
AccessControlElement(Principal principal, java.util.List privileges, boolean grant)
           
 
Method Summary
 boolean equals(java.lang.Object that)
           
 Resource getInheritedFrom()
          Get the resource from which this ACE is inherited from.
 Principal getPrincipal()
          Get the principal of this ACE
 java.util.List getPrivileges()
          Set the List of Privilege objects which are granted or denied by this ACE
 int hashCode()
           
 boolean isGrant()
          Returns true, if the privileges of this ACE are all granted, and false if the privileges of this ACE are all denied.
 void setGrant(boolean grant)
          Set whether the privileges of this ACE are granted (grant=true) or denied (grant=false)
 void setInheritedFrom(Resource inheritedFrom)
          Set the resource this ACE is inherited from.
 void setPrincipal(Principal principal)
          Set the principal of this ACE
 void setPrivileges(java.util.List privileges)
          Set the List of Privilege objects to be granted or denied by this ACE
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessControlElement

public AccessControlElement(Principal principal,
                            java.util.List privileges,
                            boolean grant)
Method Detail

setPrincipal

public void setPrincipal(Principal principal)
Set the principal of this ACE

Parameters:
principal - a Principal object

getPrincipal

public Principal getPrincipal()
Get the principal of this ACE

Returns:
a Principal object

setPrivileges

public void setPrivileges(java.util.List privileges)
Set the List of Privilege objects to be granted or denied by this ACE

Parameters:
privileges - a List of Privilege objects

getPrivileges

public java.util.List getPrivileges()
Set the List of Privilege objects which are granted or denied by this ACE

Returns:
a List of Privilege objects

setGrant

public void setGrant(boolean grant)
Set whether the privileges of this ACE are granted (grant=true) or denied (grant=false)

Parameters:
grant - true to grant, false to deny

isGrant

public boolean isGrant()
Returns true, if the privileges of this ACE are all granted, and false if the privileges of this ACE are all denied.

Returns:
true, if all privileges of this resource are granted false, if all privileges of this resource are denied

setInheritedFrom

public void setInheritedFrom(Resource inheritedFrom)
Set the resource this ACE is inherited from.

Parameters:
inheritedFrom - a Resource

getInheritedFrom

public Resource getInheritedFrom()
Get the resource from which this ACE is inherited from.

Returns:
a Resource

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright (c) 2003 - Apache Software Foundation