Class 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 Detail

      • Permissions

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

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.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)
      • getImplies

        public static <T extends java.lang.Enum<T>> int[] getImplies​(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 class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException