Class Grants


  • public final class Grants
    extends java.lang.Object
    Author:
    javaito
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Grants.Grant
      System grant representation.
    • Constructor Summary

      Constructors 
      Constructor Description
      Grants()  
    • Method Summary

      Modifier and Type Method Description
      static Grants.Grant getGrant​(java.lang.Class targetClass, java.lang.String permissionName)
      Returns the grant instance for the specific target class and permission name.
      static Grants.Grant getGrant​(java.lang.String permissionId)
      Returns the grant instance for the specific permission id.
      static java.util.Collection<Grants.Grant> getGrants()
      Returns all the grants stored into the framework instance.
      static void publishGrant​(SecurityPermissions.SecurityPermission permission)
      Publish the new grant associated to the permission as parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Grants

        public Grants()
    • Method Detail

      • publishGrant

        public static void publishGrant​(SecurityPermissions.SecurityPermission permission)
        Publish the new grant associated to the permission as parameter.
        Parameters:
        permission - Permission instance as parameter.
      • getGrant

        public static Grants.Grant getGrant​(java.lang.Class targetClass,
                                            java.lang.String permissionName)
        Returns the grant instance for the specific target class and permission name.
        Parameters:
        targetClass - Target class.
        permissionName - Permission name.
        Returns:
        Returns the grant instance.
      • getGrant

        public static Grants.Grant getGrant​(java.lang.String permissionId)
        Returns the grant instance for the specific permission id.
        Parameters:
        permissionId - Permission id.
        Returns:
        Grant instance.
      • getGrants

        public static java.util.Collection<Grants.Grant> getGrants()
        Returns all the grants stored into the framework instance.
        Returns:
        Collection of grants.