public abstract class

AbstractPermission

extends Object
implements Permission
java.lang.Object
   ↳ org.springframework.security.acls.domain.AbstractPermission
Known Direct Subclasses

Class Overview

Provides an abstract superclass for Permission implementations.

Summary

[Expand]
Inherited Constants
From interface org.springframework.security.acls.model.Permission
Fields
protected final char code
protected int mask
Protected Constructors
AbstractPermission(int mask)
Sets the permission mask and uses the '*' character to represent active bits when represented as a bit pattern string.
AbstractPermission(int mask, char code)
Sets the permission mask and uses the specified character for active bits.
Public Methods
final boolean equals(Object arg0)
final int getMask()
Returns the bits that represents the permission.
String getPattern()
Returns a 32-character long bit pattern String representing this permission.
final int hashCode()
final String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.acls.model.Permission

Fields

protected final char code

protected int mask

Protected Constructors

protected AbstractPermission (int mask)

Sets the permission mask and uses the '*' character to represent active bits when represented as a bit pattern string.

Parameters
mask the integer bit mask for the permission

protected AbstractPermission (int mask, char code)

Sets the permission mask and uses the specified character for active bits.

Parameters
mask the integer bit mask for the permission
code the character to print for each active bit in the mask (see getPattern())

Public Methods

public final boolean equals (Object arg0)

public final int getMask ()

Returns the bits that represents the permission.

Returns
  • the bits that represent the permission

public String getPattern ()

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 RESERVED_OFF or RESERVED_ON be used within the pattern. An exemption is in the case of RESERVED_OFF which is used to denote a bit that is off (clear). Implementations may also elect to use RESERVED_ON internally for computation purposes, although this method may not return any String containing 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.

Returns
  • a 32-character bit pattern

public final int hashCode ()

public final String toString ()