Package org.jboss.security.acl
Class CompositeACLPermission
- java.lang.Object
-
- org.jboss.security.acl.CompositeACLPermission
-
- All Implemented Interfaces:
ACLPermission
,BitMaskPermission
,Permission
public class CompositeACLPermission extends Object implements BitMaskPermission
This class represents a composite permission - a permission that contains one or more basic permissions. The bitmask value of this permission is calculated by combining (logical or) the bitmask values of the basic permissions it contains. Thus, a composite permission's bitmask can have more than one bit on, and each bit corresponds to one of the basic permissions that are part of the composite permission.
- Author:
- Stefan Guilhen
-
-
Constructor Summary
Constructors Constructor Description CompositeACLPermission(int mask)
Builds an instance ofCompositeACLPermission
with the specified bitmask value.CompositeACLPermission(BasicACLPermission... permissions)
Builds an instance ofCompositeACLPermission
with the given basic permissions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getMaskValue()
Obtains the bitmask value of the permission.int
hashCode()
String
toBinaryString()
Returns the binary representation of this permission.String
toString()
-
-
-
Constructor Detail
-
CompositeACLPermission
public CompositeACLPermission(int mask)
Builds an instance of
CompositeACLPermission
with the specified bitmask value.- Parameters:
mask
- anint
representing the bitmask value of the permission being created.
-
CompositeACLPermission
public CompositeACLPermission(BasicACLPermission... permissions)
Builds an instance of
CompositeACLPermission
with the given basic permissions.- Parameters:
permissions
- a comma-separated list ofBasicACLPermission
s.
-
-
Method Detail
-
getMaskValue
public int getMaskValue()
Description copied from interface:BitMaskPermission
Obtains the bitmask value of the permission.
- Specified by:
getMaskValue
in interfaceBitMaskPermission
- Returns:
- an
int
representing the value of the bitmask.
-
toBinaryString
public String toBinaryString()
Returns the binary representation of this permission.
- Returns:
- a
String
containing this permission's binary representation.
-
-