Class Permissions

  • All Implemented Interfaces:
    Cloneable

    public class Permissions
    extends Object
    implements Cloneable
    Since:
    4.0.0
    Version:
    $Revision: 10753 $ $Date: 2009-07-27 20:08:07 -0300 (Mon, 27 Jul 2009) $
    • Constructor Detail

      • Permissions

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

      • hashCode

        public int hashCode()
        Overrides:
        hashCode 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)
      • 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.
      • getRecursiveImplies

        public static <T extends Enum<T>> String getRecursiveImplies​(Class<T> permissionsEnumClass,
                                                                     IPermission permission)