|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.acls.domain.AbstractPermission
public abstract class AbstractPermission
Provides an abstract superclass for Permission
implementations.
Field Summary | |
---|---|
protected char |
code
|
protected int |
mask
|
Fields inherited from interface org.springframework.security.acls.model.Permission |
---|
RESERVED_OFF, RESERVED_ON, THIRTY_TWO_RESERVED_OFF |
Constructor Summary | |
---|---|
protected |
AbstractPermission(int mask)
Sets the permission mask and uses the '*' character to represent active bits when represented as a bit pattern string. |
protected |
AbstractPermission(int mask,
char code)
Sets the permission mask and uses the specified character for active bits. |
Method Summary | |
---|---|
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()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected char code
protected int mask
Constructor Detail |
---|
protected AbstractPermission(int mask)
mask
- the integer bit mask for the permissionprotected AbstractPermission(int mask, char code)
mask
- the integer bit mask for the permissioncode
- the character to print for each active bit in the mask (see Permission.getPattern()
)Method Detail |
---|
public final boolean equals(Object arg0)
equals
in class Object
public final int getMask()
Permission
getMask
in interface Permission
public String getPattern()
Permission
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.
getPattern
in interface Permission
public final String toString()
toString
in class Object
public final int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |