Class Permission


  • public final class Permission
    extends java.lang.Object
    • Method Summary

      Modifier and Type Method Description
      static void checkPermission​(Permission permission)
      Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
      static void checkPermission​(Permission permission, Grant defaultGrant)
      Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
      static void checkPermission​(java.lang.String node)
      Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
      static void checkPermission​(java.lang.String node, Grant defaultGrant)
      Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
      boolean equals​(java.lang.Object b)  
      static Permission get​(java.lang.String node)
      Gets or creates a permission in the permission node tree.
      java.lang.String getNode()  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getNode

        public java.lang.String getNode()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

        public boolean equals​(java.lang.Object b)
        Overrides:
        equals in class java.lang.Object
      • get

        public static Permission get​(java.lang.String node)
        Gets or creates a permission in the permission node tree.
        Parameters:
        node - node to create.
        Returns:
        Permission instance.
      • checkPermission

        public static void checkPermission​(java.lang.String node)
                                    throws java.lang.IllegalStateException,
                                           java.lang.SecurityException
        Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
        Parameters:
        node - node to check.
        Throws:
        java.lang.IllegalStateException - if the current thread is not a member of the virtual process system, or if that thread is not logged in.
        java.lang.SecurityException - if the user associated with the current thread does not have the permission node.
      • checkPermission

        public static void checkPermission​(java.lang.String node,
                                           Grant defaultGrant)
                                    throws java.lang.IllegalStateException,
                                           java.lang.SecurityException
        Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
        Parameters:
        node - node to check.
        defaultGrant - default grant behavior. When DENY, users with no matching permission node are denied. When ALLOW, these users are allowed.
        Throws:
        java.lang.IllegalStateException - if the current thread is not a member of the virtual process system, or if that thread is not logged in.
        java.lang.SecurityException - if the user associated with the current thread does not have the permission node.
      • checkPermission

        public static void checkPermission​(Permission permission)
                                    throws java.lang.IllegalStateException,
                                           java.lang.SecurityException
        Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
        Parameters:
        permission - Permission instance to check.
        Throws:
        java.lang.IllegalStateException - if the current thread is not a member of the virtual process system, or if that thread is not logged in.
        java.lang.SecurityException - if the user associated with the current thread does not have the permission node.
      • checkPermission

        public static void checkPermission​(Permission permission,
                                           Grant defaultGrant)
                                    throws java.lang.IllegalStateException,
                                           java.lang.SecurityException
        Checks that the current process has a specific permission, defaulting to deny if no permission is defined.
        Parameters:
        permission - Permission instance to check.
        defaultGrant - default grant behavior. When DENY, users with no matching permission node are denied. When ALLOW, these users are allowed.
        Throws:
        java.lang.IllegalStateException - if the current thread is not a member of the virtual process system, or if that thread is not logged in.
        java.lang.SecurityException - if the user associated with the current thread does not have the permission node.