Interface RoleService

    • Method Detail

      • create

        Role create​(Role role)
        Create a new role
        Parameters:
        role - the role
        Returns:
        the newly created role
      • create

        Role create​(String name)
        Create a new role
        Parameters:
        name - the role name
        Returns:
        the newly created role
      • update

        Role update​(Role role)
        Update a role
        Parameters:
        role - the role set to update
        Returns:
        the updated role
      • delete

        ActionResponse delete​(String roleId)
        Delete a role
        Parameters:
        roleId - the role id
        Returns:
        the ActionResponse
      • list

        List<? extends Role> list()
        Lists the global roles
        Returns:
        the list
      • get

        Role get​(String roleId)
        Get details for a role
        Parameters:
        roleId - the role id
        Returns:
        the role
      • getByName

        List<? extends Role> getByName​(String name)
        Get Role(s) filtering by Name
        Parameters:
        name - the name of the Role to filter by
        Returns:
        the list
      • listRoleAssignments

        List<? extends RoleAssignment> listRoleAssignments​(String projectId)
        list a role assignment list in project context
        Parameters:
        projectId - the project id
        Returns:
        the list
      • grantProjectUserRole

        ActionResponse grantProjectUserRole​(String projectId,
                                            String userId,
                                            String roleId)
        grants a role to a specified user in project context
        Parameters:
        projectId - the project id
        userId - the user id
        roleId - the role id
        Returns:
        the action response
      • revokeProjectUserRole

        ActionResponse revokeProjectUserRole​(String projectId,
                                             String userId,
                                             String roleId)
        revokes a role to a specified user in project context
        Parameters:
        projectId - the project id
        userId - the user id
        roleId - the role id
        Returns:
        the action response
      • checkProjectUserRole

        ActionResponse checkProjectUserRole​(String projectId,
                                            String userId,
                                            String roleId)
        checks if a user has a specific role in a given project-context
        Parameters:
        projectId - the project id
        userId - the user id
        roleId - the role id
        Returns:
        the ActionResponse
      • grantDomainUserRole

        ActionResponse grantDomainUserRole​(String domainId,
                                           String userId,
                                           String roleId)
        grants a role to a specified user in domain context
        Parameters:
        domainId - the domain id
        userId - the user id
        roleId - the role id
        Returns:
        the action response
      • revokeDomainUserRole

        ActionResponse revokeDomainUserRole​(String domainId,
                                            String userId,
                                            String roleId)
        revokes a role to a specified user in domain context
        Parameters:
        domainId - the domain id
        userId - the user id
        roleId - the role id
        Returns:
        the action response
      • checkDomainUserRole

        ActionResponse checkDomainUserRole​(String domainId,
                                           String userId,
                                           String roleId)
        checks if a user has a specific role in a given domain-context
        Parameters:
        domainId - the domain id
        userId - the user id
        roleId - the role id
        Returns:
        the ActionResponse
      • grantProjectGroupRole

        ActionResponse grantProjectGroupRole​(String projectId,
                                             String groupId,
                                             String roleId)
        grants a role to a specified group in project context
        Parameters:
        projectId - the project id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • revokeProjectGroupRole

        ActionResponse revokeProjectGroupRole​(String projectId,
                                              String groupId,
                                              String roleId)
        revokes a role from a specified group in project context
        Parameters:
        projectId - the project id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • checkProjectGroupRole

        ActionResponse checkProjectGroupRole​(String projectId,
                                             String groupId,
                                             String roleId)
        check if a group has a specific role in a given project
        Parameters:
        projectId - the project id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • grantDomainGroupRole

        ActionResponse grantDomainGroupRole​(String domainId,
                                            String groupId,
                                            String roleId)
        grant a role to a specified group in domain context
        Parameters:
        domainId - the domain id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • revokeDomainGroupRole

        ActionResponse revokeDomainGroupRole​(String domainId,
                                             String groupId,
                                             String roleId)
        revoke a role from a specified group in domain context
        Parameters:
        domainId - the domain id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • checkDomainGroupRole

        ActionResponse checkDomainGroupRole​(String domainId,
                                            String groupId,
                                            String roleId)
        checks if a group has a specific role in a given domain
        Parameters:
        domainId - the domain id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse