lumis.util.security.acl
Class Permissions

Package class diagram package Permissions
java.lang.Object
  extended by lumis.util.security.acl.Permissions
All Implemented Interfaces:
Cloneable

public class Permissions
extends Object
implements Cloneable

Since:
4.0.0

Constructor Summary
Permissions(int allowPermissions, int allowPermissionsInheriting, int denyPermissions, int denyPermissionsInheriting)
           
 
Method Summary
 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>>
String
getRecursiveImplies(Class<T> permissionsEnumClass, IPermission permission)
           
static
<T extends IPermission>
int
getRequiredPermissions(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)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Permissions

public Permissions(int allowPermissions,
                   int allowPermissionsInheriting,
                   int denyPermissions,
                   int denyPermissionsInheriting)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class 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,
                    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 class Object
Throws:
CloneNotSupportedException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.