Package lumis.util.security.acl
Class Permissions
- java.lang.Object
-
- lumis.util.security.acl.Permissions
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Permissions extends java.lang.Object implements java.lang.Cloneable
- Since:
- 4.0.0
- Version:
- $Revision: 10753 $ $Date: 2009-07-27 20:08:07 -0300 (Mon, 27 Jul 2009) $
-
-
Constructor Summary
Constructors Constructor Description Permissions(int allowPermissions, int allowPermissionsInheriting, int denyPermissions, int denyPermissionsInheriting)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkPermission(IPermission permission)
boolean
checkPermissionByPosition(int position)
protected Permissions
clone()
protected void
deserialize(org.w3c.dom.Node permissionsNode)
boolean
equals(java.lang.Object obj)
int
getAllowPermissions()
int
getAllowPermissionsInheriting()
int
getDenyPermissions()
int
getDenyPermissionsInheriting()
static <T extends java.lang.Enum<T>>
int[]getImplies(java.lang.Class<T> permissionsEnumClass)
static <T extends java.lang.Enum<T>>
java.lang.StringgetRecursiveImplies(java.lang.Class<T> permissionsEnumClass, IPermission permission)
static <T extends IPermission>
intgetRequiredPermissions(java.lang.Class<T> permissionsEnumClass)
boolean
hasDenyPermission(IPermission permission)
int
hashCode()
void
inherit(Permissions inheritPermission)
void
inherit(Permissions inheritPermission, java.util.HashMap<java.lang.Integer,java.lang.Integer> permissionsMapping)
void
merge(Permissions mergePermissions)
void
removeInheriting()
protected void
serialize(Permissions permissions, java.lang.StringBuilder stringBuilder)
void
setAllowPermissions(int allowPermissions)
void
setAllowPermissionsInheriting(int allowPermissionsInheriting)
void
setDenyPermissions(int denyPermissions)
void
setDenyPermissionsInheriting(int denyPermissionsInheriting)
void
setImpliedPermissions(int[] permissionImplies)
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getAllowPermissions
public int getAllowPermissions()
-
getAllowPermissionsInheriting
public int getAllowPermissionsInheriting()
-
getDenyPermissions
public int getDenyPermissions()
-
getDenyPermissionsInheriting
public int getDenyPermissionsInheriting()
-
setImpliedPermissions
public void setImpliedPermissions(int[] permissionImplies)
-
inherit
public void inherit(Permissions inheritPermission, java.util.HashMap<java.lang.Integer,java.lang.Integer> permissionsMapping)
-
inherit
public void inherit(Permissions inheritPermission)
-
removeInheriting
public void removeInheriting()
-
merge
public void merge(Permissions mergePermissions)
-
checkPermission
public boolean checkPermission(IPermission permission)
-
hasDenyPermission
public boolean hasDenyPermission(IPermission permission)
-
checkPermissionByPosition
public boolean checkPermissionByPosition(int position)
-
setAllowPermissions
public void setAllowPermissions(int allowPermissions)
- Parameters:
allowPermissions
- The allowPermissions to set.
-
setAllowPermissionsInheriting
public void setAllowPermissionsInheriting(int allowPermissionsInheriting)
- Parameters:
allowPermissionsInheriting
- The allowPermissionsInheriting to set.
-
setDenyPermissions
public void setDenyPermissions(int denyPermissions)
- Parameters:
denyPermissions
- The denyPermissions to set.
-
setDenyPermissionsInheriting
public void setDenyPermissionsInheriting(int denyPermissionsInheriting)
- Parameters:
denyPermissionsInheriting
- The denyPermissionsInheriting to set.
-
serialize
protected void serialize(Permissions permissions, java.lang.StringBuilder stringBuilder)
-
deserialize
protected void deserialize(org.w3c.dom.Node permissionsNode) throws PortalException
- Throws:
PortalException
-
getImplies
public static <T extends java.lang.Enum<T>> int[] getImplies(java.lang.Class<T> permissionsEnumClass) throws PortalException
- Throws:
PortalException
-
getRequiredPermissions
public static <T extends IPermission> int getRequiredPermissions(java.lang.Class<T> permissionsEnumClass) throws PortalException
- Throws:
PortalException
-
getRecursiveImplies
public static <T extends java.lang.Enum<T>> java.lang.String getRecursiveImplies(java.lang.Class<T> permissionsEnumClass, IPermission permission)
-
clone
protected Permissions clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
-