org.acegisecurity.acls.domain
Class CumulativePermission

java.lang.Object
  extended by org.acegisecurity.acls.domain.CumulativePermission
All Implemented Interfaces:
Permission

public class CumulativePermission
extends Object
implements Permission

Represents a Permission that is constructed at runtime from other permissions.

Methods return this, in order to facilitate method chaining.

Version:
$Id: CumulativePermission.java 1868 2007-05-25 02:28:40Z benalex $
Author:
Ben Alex

Field Summary
 
Fields inherited from interface org.acegisecurity.acls.Permission
RESERVED_OFF, RESERVED_ON, THIRTY_TWO_RESERVED_OFF
 
Constructor Summary
CumulativePermission()
           
 
Method Summary
 CumulativePermission clear()
           
 CumulativePermission clear(Permission permission)
           
 boolean equals(Object arg0)
           
 int getMask()
          Returns the bits that represents the permission.
 String getPattern()
          Returns a 32-character long bit pattern String representing this permission.
 int hashCode()
           
 CumulativePermission set(Permission permission)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CumulativePermission

public CumulativePermission()
Method Detail

clear

public CumulativePermission clear(Permission permission)

clear

public CumulativePermission clear()

equals

public boolean equals(Object arg0)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getMask

public int getMask()
Description copied from interface: Permission
Returns the bits that represents the permission.

Specified by:
getMask in interface Permission
Returns:
the bits that represent the permission

getPattern

public String getPattern()
Description copied from interface: Permission
Returns a 32-character long bit pattern String representing this permission.

Implementations are free to format the pattern as they see fit, although under no circumstances may Permission.RESERVED_OFF or Permission.RESERVED_ON be used within the pattern. An exemption is in the case of Permission.RESERVED_OFF which is used to denote a bit that is off (clear). Implementations may also elect to use Permission.RESERVED_ON internally for computation purposes, although this method may not return any String containing Permission.RESERVED_ON.

The returned String must be 32 characters in length.

This method is only used for user interface and logging purposes. It is not used in any permission calculations. Therefore, duplication of characters within the output is permitted.

Specified by:
getPattern in interface Permission
Returns:
a 32-character bit pattern

set

public CumulativePermission set(Permission permission)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2009 Interface21, Inc. All Rights Reserved.