Package lumis.util.security.acl
Class Permissions
- java.lang.Object
-
- lumis.util.security.acl.Permissions
-
-
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(Node permissionsNode)
boolean
equals(Object obj)
int
getAllowPermissions()
int
getAllowPermissionsInheriting()
int
getDenyPermissions()
int
getDenyPermissionsInheriting()
static <T extends Enum<T>>
int[]getImplies(Class<T> permissionsEnumClass)
static <T extends Enum<T>>
StringgetRecursiveImplies(Class<T> permissionsEnumClass, IPermission permission)
static <T extends IPermission>
intgetRequiredPermissions(Class<T> permissionsEnumClass)
boolean
hasDenyPermission(IPermission permission)
int
hashCode()
void
inherit(Permissions inheritPermission)
void
inherit(Permissions inheritPermission, HashMap<Integer,Integer> permissionsMapping)
void
merge(Permissions mergePermissions)
void
removeInheriting()
protected void
serialize(Permissions permissions, StringBuilder stringBuilder)
void
setAllowPermissions(int allowPermissions)
void
setAllowPermissionsInheriting(int allowPermissionsInheriting)
void
setDenyPermissions(int denyPermissions)
void
setDenyPermissionsInheriting(int denyPermissionsInheriting)
void
setImpliedPermissions(int[] permissionImplies)
-
-
-
Method Detail
-
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, HashMap<Integer,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, StringBuilder stringBuilder)
-
deserialize
protected void deserialize(Node permissionsNode) throws PortalException
- Throws:
PortalException
-
getImplies
public static <T extends Enum<T>> int[] getImplies(Class<T> permissionsEnumClass) throws PortalException
- Throws:
PortalException
-
getRequiredPermissions
public static <T extends IPermission> int getRequiredPermissions(Class<T> permissionsEnumClass) throws PortalException
- Throws:
PortalException
-
getRecursiveImplies
public static <T extends Enum<T>> String getRecursiveImplies(Class<T> permissionsEnumClass, IPermission permission)
-
clone
protected Permissions clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
-