Class ProfileManager.ApiPermission

  • All Implemented Interfaces:
    java.security.Principal
    Enclosing class:
    ProfileManager

    public static final class ProfileManager.ApiPermission
    extends java.lang.Object
    implements java.security.Principal
    A representation of the level of permissions granted to a user.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRole​(java.lang.String role)
      Add a role to this permission.
      ProfileManager.ApiPermission.Level getLevel()  
      java.lang.String getName()  
      Profile getProfile()  
      boolean isInRole​(java.lang.String role)
      True if the permission granted includes access to this role.
      boolean isRO()  
      boolean isRW()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        equals, hashCode, implies, toString
    • Method Detail

      • getProfile

        public Profile getProfile()
        Returns:
        The profile associated with this level of permission.
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface java.security.Principal
      • isRW

        public boolean isRW()
        Returns:
        True if this user has been granted RW permissions.
      • isRO

        public boolean isRO()
        Returns:
        True if this user has been granted RO permissions.
      • addRole

        public void addRole​(java.lang.String role)
        Add a role to this permission.
        Parameters:
        role - The role to add.
      • isInRole

        public boolean isInRole​(java.lang.String role)
        True if the permission granted includes access to this role.
        Parameters:
        role - The role in question.
        Returns:
        Whether or not this user has access to the given role.