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 ofCompositeACLPermissionwith the specified bitmask value.CompositeACLPermission(BasicACLPermission... permissions)Builds an instance ofCompositeACLPermissionwith the given basic permissions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetMaskValue()Obtains the bitmask value of the permission.inthashCode()StringtoBinaryString()Returns the binary representation of this permission.StringtoString()
-
-
-
Constructor Detail
-
CompositeACLPermission
public CompositeACLPermission(int mask)
Builds an instance of
CompositeACLPermissionwith the specified bitmask value.- Parameters:
mask- anintrepresenting the bitmask value of the permission being created.
-
CompositeACLPermission
public CompositeACLPermission(BasicACLPermission... permissions)
Builds an instance of
CompositeACLPermissionwith the given basic permissions.- Parameters:
permissions- a comma-separated list ofBasicACLPermissions.
-
-
Method Detail
-
getMaskValue
public int getMaskValue()
Description copied from interface:BitMaskPermissionObtains the bitmask value of the permission.
- Specified by:
getMaskValuein interfaceBitMaskPermission- Returns:
- an
intrepresenting the value of the bitmask.
-
toBinaryString
public String toBinaryString()
Returns the binary representation of this permission.
- Returns:
- a
Stringcontaining this permission's binary representation.
-
-