org.jbpm.services.task.wih.util

## Class PeopleAssignmentHelper

- java.lang.Object
- - org.jbpm.services.task.wih.util.PeopleAssignmentHelper

-     public class PeopleAssignmentHelper
      extends Object

  A class responsible for assigning the various ownerships (actors, groups, business administrators, and task stakeholders) from a `WorkItem` to a `Task`. This class consolidates common code for reuse across multiple `WorkItemHandler`s.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ACTOR_ID`
    `static String` | `BUSINESSADMINISTRATOR_GROUP_ID`
    `static String` | `BUSINESSADMINISTRATOR_ID`
    `static String` | `DEFAULT_ADMIN_GROUP`
    `static String` | `DEFAULT_ADMIN_USER`
    `static String` | `EXCLUDED_OWNER_ID`
    `static String` | `GROUP_ID`
    `static String` | `RECIPIENT_ID`
    `static String` | `TASKSTAKEHOLDER_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PeopleAssignmentHelper()`
    `PeopleAssignmentHelper(org.kie.api.runtime.process.CaseData caseFile)`
    `PeopleAssignmentHelper(String separator)`
    `PeopleAssignmentHelper(String adminUser, String adminGroup)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Object` | `adjustParam(Object currentValue, Predicate<? super org.kie.api.task.model.OrganizationalEntity> filter)`
    `protected void` | `assignActors(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.task.model.PeopleAssignments peopleAssignments, org.kie.internal.task.api.model.InternalTaskData taskData)`
    `protected void` | `assignBusinessAdministrators(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.task.model.PeopleAssignments peopleAssignments)`
    `protected void` | `assignExcludedOwners(org.kie.api.runtime.process.WorkItem workItem, org.kie.internal.task.api.model.InternalPeopleAssignments peopleAssignments)`
    `protected void` | `assignGroups(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.task.model.PeopleAssignments peopleAssignments)`
    `protected void` | `assignRecipients(org.kie.api.runtime.process.WorkItem workItem, org.kie.internal.task.api.model.InternalPeopleAssignments peopleAssignments)`
    `protected void` | `assignTaskStakeholders(org.kie.api.runtime.process.WorkItem workItem, org.kie.internal.task.api.model.InternalPeopleAssignments peopleAssignments)`
    `protected org.kie.internal.task.api.model.InternalPeopleAssignments` | `getNullSafePeopleAssignments(org.kie.api.task.model.Task task)`
    `void` | `handlePeopleAssignments(org.kie.api.runtime.process.WorkItem workItem, org.kie.internal.task.api.model.InternalTask task, org.kie.internal.task.api.model.InternalTaskData taskData)`
    `protected boolean` | `hasAdminAssigned(Collection<org.kie.api.task.model.OrganizationalEntity> businessAdmins)`
    `protected void` | `processPeopleAssignments(Collection<org.kie.api.task.model.OrganizationalEntity> peopleAssignmentIds, List<org.kie.api.task.model.OrganizationalEntity> organizationalEntities)`
    `protected void` | `processPeopleAssignments(String peopleAssignmentIds, List<org.kie.api.task.model.OrganizationalEntity> organizationalEntities, boolean user)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ACTOR_ID

          public static final String ACTOR_ID

      See Also:
        Constant Field Values

    - #### GROUP_ID

          public static final String GROUP_ID

      See Also:
        Constant Field Values

    - #### BUSINESSADMINISTRATOR_ID

          public static final String BUSINESSADMINISTRATOR_ID

      See Also:
        Constant Field Values

    - #### BUSINESSADMINISTRATOR_GROUP_ID

          public static final String BUSINESSADMINISTRATOR_GROUP_ID

      See Also:
        Constant Field Values

    - #### TASKSTAKEHOLDER_ID

          public static final String TASKSTAKEHOLDER_ID

      See Also:
        Constant Field Values

    - #### EXCLUDED_OWNER_ID

          public static final String EXCLUDED_OWNER_ID

      See Also:
        Constant Field Values

    - #### RECIPIENT_ID

          public static final String RECIPIENT_ID

      See Also:
        Constant Field Values

    - #### DEFAULT_ADMIN_USER

          public static final String DEFAULT_ADMIN_USER

    - #### DEFAULT_ADMIN_GROUP

          public static final String DEFAULT_ADMIN_GROUP

  - ### Constructor Detail

    - #### PeopleAssignmentHelper

          public PeopleAssignmentHelper()

    - #### PeopleAssignmentHelper

          public PeopleAssignmentHelper(String separator)

    - #### PeopleAssignmentHelper

          public PeopleAssignmentHelper(String adminUser,
                                        String adminGroup)

    - #### PeopleAssignmentHelper

          public PeopleAssignmentHelper(org.kie.api.runtime.process.CaseData caseFile)

  - ### Method Detail

    - #### handlePeopleAssignments

          public void handlePeopleAssignments(org.kie.api.runtime.process.WorkItem workItem,
                                              org.kie.internal.task.api.model.InternalTask task,
                                              org.kie.internal.task.api.model.InternalTaskData taskData)

    - #### assignActors

          protected void assignActors(org.kie.api.runtime.process.WorkItem workItem,
                                      org.kie.api.task.model.PeopleAssignments peopleAssignments,
                                      org.kie.internal.task.api.model.InternalTaskData taskData)

    - #### assignGroups

          protected void assignGroups(org.kie.api.runtime.process.WorkItem workItem,
                                      org.kie.api.task.model.PeopleAssignments peopleAssignments)

    - #### assignBusinessAdministrators

          protected void assignBusinessAdministrators(org.kie.api.runtime.process.WorkItem workItem,
                                                      org.kie.api.task.model.PeopleAssignments peopleAssignments)

    - #### assignTaskStakeholders

          protected void assignTaskStakeholders(org.kie.api.runtime.process.WorkItem workItem,
                                                org.kie.internal.task.api.model.InternalPeopleAssignments peopleAssignments)

    - #### assignExcludedOwners

          protected void assignExcludedOwners(org.kie.api.runtime.process.WorkItem workItem,
                                              org.kie.internal.task.api.model.InternalPeopleAssignments peopleAssignments)

    - #### assignRecipients

          protected void assignRecipients(org.kie.api.runtime.process.WorkItem workItem,
                                          org.kie.internal.task.api.model.InternalPeopleAssignments peopleAssignments)

    - #### processPeopleAssignments

          protected void processPeopleAssignments(String peopleAssignmentIds,
                                                  List<org.kie.api.task.model.OrganizationalEntity> organizationalEntities,
                                                  boolean user)

    - #### processPeopleAssignments

          protected void processPeopleAssignments(Collection<org.kie.api.task.model.OrganizationalEntity> peopleAssignmentIds,
                                                  List<org.kie.api.task.model.OrganizationalEntity> organizationalEntities)

    - #### getNullSafePeopleAssignments

          protected org.kie.internal.task.api.model.InternalPeopleAssignments getNullSafePeopleAssignments(org.kie.api.task.model.Task task)

    - #### hasAdminAssigned

          protected boolean hasAdminAssigned(Collection<org.kie.api.task.model.OrganizationalEntity> businessAdmins)

    - #### adjustParam

          protected Object adjustParam(Object currentValue,
                                       Predicate<? super org.kie.api.task.model.OrganizationalEntity> filter)

Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.