Package org.kie.api.runtime.process

## Interface CaseAssignment

-     public interface CaseAssignment

  Represents case assignment which usually means named role to individuals or groups.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `assign​(String roleName, OrganizationalEntity entity)` | Assigns given entity (either user or group) to given role
    `void` | `assignGroup​(String roleName, String groupId)` | Assigns given group to given role
    `void` | `assignUser​(String roleName, String userId)` | Assigns given user to given role
    `Collection<OrganizationalEntity>` | `getAssignments​(String roleName)` | Returns assigned entities for given role
    `Collection<String>` | `getRoles()` | Returns defined roles
    `void` | `remove​(String roleName, OrganizationalEntity entity)` | Removes given entity from the role

- - ### Method Detail

    - #### assign

          void assign​(String roleName,
                      OrganizationalEntity entity)

      Assigns given entity (either user or group) to given role
      Parameters:
        `roleName` - name of the role entity should be assigned to
        `entity` - user or group to be assigned

    - #### assignUser

          void assignUser​(String roleName,
                          String userId)

      Assigns given user to given role
      Parameters:
        `roleName` - name of the role user should be assigned to
        `userId` - user to be assigned

    - #### assignGroup

          void assignGroup​(String roleName,
                           String groupId)

      Assigns given group to given role
      Parameters:
        `roleName` - name of the role group should be assigned to
        `groupId` - group to be assigned

    - #### remove

          void remove​(String roleName,
                      OrganizationalEntity entity)

      Removes given entity from the role
      Parameters:
        `roleName` - name of the role that given entity should be removed from
        `entity` - use or group to be removed

    - #### getAssignments

          Collection<OrganizationalEntity> getAssignments​(String roleName)

      Returns assigned entities for given role
      Parameters:
        `roleName` - name of the role assignment should be returned for
      Returns:
        returns all assignments for the given role

    - #### getRoles

          Collection<String> getRoles()

      Returns defined roles
      Returns:
        returns all roles