Interface RoleService

All Known Implementing Classes:
RoleServiceImpl

public interface RoleService
  • Method Details

    • defineRole

      @Deprecated Role defineRole(String authority, String name, Collection<String> permissions)
      Deprecated.
      Ensures a Role with the specified permissions exists. The name is the unique key of the role.
      Parameters:
      authority - Unique authority of the Role entity.
      name - Descriptive name of the Role.
      permissions - Permission names to apply to the role.
      Returns:
      Role instance that was created or updated.
    • defineRole

      Role defineRole(String authority, String name, String description, Collection<String> permissions)
      Ensures a Role with the specified permissions exists. The name is the unique key of the role.
      Parameters:
      authority - Unique authority of the Role entity.
      name - Descriptive name of the Role.
      description - Description of what the role should be used for.
      permissions - Permission names to apply to the role.
      Returns:
      Role instance that was created or updated.
    • defineRole

      Role defineRole(Role role)
      Ensures the given Role exists based on the unique name.
      Parameters:
      role - Role entity that should exist.
    • getRoles

      Collection<Role> getRoles()
      Get all defined Roles.
      Returns:
      Collection of Role entities.
    • getRole

      Role getRole(String authority)
      Get the Role entity with the given authority.
      Parameters:
      authority - Unique authority of the Role.
      Returns:
      Role entity or null;
    • save

      Role save(Role role)
      Save the given Role entity.
      Parameters:
      role - Entity to save.
    • delete

      void delete(Role role)
      Delete the given Role entity.
      Parameters:
      role - Entity to delete.