Class RoleServiceImpl

    • Constructor Detail

      • RoleServiceImpl

        public RoleServiceImpl()
    • Method Detail

      • grantProjectUserRole

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

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

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

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

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

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

        public List<? extends Role> list()
        Lists the global roles
        Specified by:
        list in interface RoleService
        Returns:
        the list
      • getByName

        public List<? extends Role> getByName​(String name)
        Get Role(s) filtering by Name
        Specified by:
        getByName in interface RoleService
        Parameters:
        name - the name of the Role to filter by
        Returns:
        the list
      • create

        public Role create​(Role role)
        Description copied from interface: RoleService
        Create a new role
        Specified by:
        create in interface RoleService
        Parameters:
        role - the role
        Returns:
        the newly created role
      • create

        public Role create​(String name)
        Description copied from interface: RoleService
        Create a new role
        Specified by:
        create in interface RoleService
        Parameters:
        name - the role name
        Returns:
        the newly created role
      • update

        public Role update​(Role role)
        Description copied from interface: RoleService
        Update a role
        Specified by:
        update in interface RoleService
        Parameters:
        role - the role set to update
        Returns:
        the updated role
      • get

        public Role get​(String roleId)
        Description copied from interface: RoleService
        Get details for a role
        Specified by:
        get in interface RoleService
        Parameters:
        roleId - the role id
        Returns:
        the role
      • grantProjectGroupRole

        public ActionResponse grantProjectGroupRole​(String projectId,
                                                    String groupId,
                                                    String roleId)
        Description copied from interface: RoleService
        grants a role to a specified group in project context
        Specified by:
        grantProjectGroupRole in interface RoleService
        Parameters:
        projectId - the project id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • revokeProjectGroupRole

        public ActionResponse revokeProjectGroupRole​(String projectId,
                                                     String groupId,
                                                     String roleId)
        Description copied from interface: RoleService
        revokes a role from a specified group in project context
        Specified by:
        revokeProjectGroupRole in interface RoleService
        Parameters:
        projectId - the project id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • checkProjectGroupRole

        public ActionResponse checkProjectGroupRole​(String projectId,
                                                    String groupId,
                                                    String roleId)
        Description copied from interface: RoleService
        check if a group has a specific role in a given project
        Specified by:
        checkProjectGroupRole in interface RoleService
        Parameters:
        projectId - the project id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • grantDomainGroupRole

        public ActionResponse grantDomainGroupRole​(String domainId,
                                                   String groupId,
                                                   String roleId)
        Description copied from interface: RoleService
        grant a role to a specified group in domain context
        Specified by:
        grantDomainGroupRole in interface RoleService
        Parameters:
        domainId - the domain id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • revokeDomainGroupRole

        public ActionResponse revokeDomainGroupRole​(String domainId,
                                                    String groupId,
                                                    String roleId)
        Description copied from interface: RoleService
        revoke a role from a specified group in domain context
        Specified by:
        revokeDomainGroupRole in interface RoleService
        Parameters:
        domainId - the domain id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse
      • checkDomainGroupRole

        public ActionResponse checkDomainGroupRole​(String domainId,
                                                   String groupId,
                                                   String roleId)
        Description copied from interface: RoleService
        checks if a group has a specific role in a given domain
        Specified by:
        checkDomainGroupRole in interface RoleService
        Parameters:
        domainId - the domain id
        groupId - the group id
        roleId - the role id
        Returns:
        the ActionResponse