Class RoleInheritanceDelegate

java.lang.Object
edu.internet2.middleware.grouper.permissions.role.RoleInheritanceDelegate
All Implemented Interfaces:
Serializable

public class RoleInheritanceDelegate extends Object implements Serializable
delegate the role
See Also:
  • Constructor Details

    • RoleInheritanceDelegate

      public RoleInheritanceDelegate(Group group1)
      Parameters:
      group1 -
  • Method Details

    • getRolesInheritPermissionsFromThis

      public Set<Role> getRolesInheritPermissionsFromThis()
      permissions in this role are inherited by other roles in the set returned (immediate or effective) so if this role is loanAdministrator, then returned set has senior loan administrator
      Returns:
      set of roles not including this role, or empty set if none available
    • getRolesInheritPermissionsFromThisImmediate

      public Set<Role> getRolesInheritPermissionsFromThisImmediate()
      permissions in this role are inherited by other roles in the set returned (immediate only) so if this role is loanAdministrator, then returned set has senior loan administrator
      Returns:
      set of roles not including this role, or empty set if none available
    • getRolesInheritPermissionsToThis

      public Set<Role> getRolesInheritPermissionsToThis()
      permissions in these returned roles inherit to this role (immediate or effective) so if this role is senior loan administrator, then returned set has loanAdministrator
      Returns:
      set of roles not including this role, or empty set if none available
    • getRolesInheritPermissionsToThisImmediate

      public Set<Role> getRolesInheritPermissionsToThisImmediate()
      permissions in these returned roles inherit to this role (immediate only) so if this role is senior loan administrator, then returned set has loanAdministrator
      Returns:
      set of roles not including this role, or empty set if none available
    • addRoleToInheritFromThis

      public boolean addRoleToInheritFromThis(Role roleToAdd)
      if a user has this role, then he also inherits permissions from the roleToAdd for isntance this would be senior admin, and the argument would be admin
      Parameters:
      roleToAdd -
      Returns:
      true if added, false if already there
    • internal_addRoleToInheritFromThis

      public boolean internal_addRoleToInheritFromThis(Role roleToAdd, String uuid)
      if a user has this role, then he also inherits permissions from the roleToAdd
      Parameters:
      roleToAdd -
      uuid - is id or null if assigned
      Returns:
      true if added, false if already there
    • removeRoleFromInheritFromThis

      public boolean removeRoleFromInheritFromThis(Role roleToRemove)
      if a user has this role, and he had inheriated permissions from roleToRemove directly, then remove that relationship
      Parameters:
      roleToRemove -
      Returns:
      true if removed, false if already not there