Record Class InvolvedUsersData

java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.records.InvolvedUsersData
Record Components:
stepManagerRef - The reference (usually a String ID) pointing to a process step from which the manager of the step's user will be retrieved.
stepUserRef - The reference (usually a String ID) pointing to a process step from which the user directly assigned to that step will be retrieved.
memberships - A list of membership references (e.g., group or role names/IDs) used to find candidate users.

public record InvolvedUsersData(String stepManagerRef, String stepUserRef, List<String> memberships) extends Record
A record to hold the parsed configuration data for finding candidate users (actors) involved in a process step. Records are a clean way to model immutable data in modern Java.
  • Constructor Details

    • InvolvedUsersData

      public InvolvedUsersData(String stepManagerRef, String stepUserRef, List<String> memberships)
      The compact constructor for this record. It creates a defensive copy of the mutable lists to ensure the record's immutability.
      Parameters:
      stepManagerRef - The reference (usually a String ID) pointing to a process step from which the manager of the step's user will be retrieved.
      stepUserRef - The reference (usually a String ID) pointing to a process step from which the user directly assigned to that step will be retrieved.
      memberships - A list of membership references (e.g., group or role names/IDs) used to find candidate users.
  • Method Details

    • getRefStepsArray

      public String[] getRefStepsArray()
      Constructs an array containing the step references (stepManagerRef and stepUserRef) after filtering out any null or empty strings. * This method leverages the Java Stream API for clean, concise, and optimized filtering.
      Returns:
      A String array containing only the valid (non-null and non-empty) step references.
    • memberships

      public List<String> memberships()
      Returns a read-only view (unmodifiable list) of the membership references to prevent external modification of the record's internal state.
      Returns:
      An unmodifiable List containing the membership reference strings.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stepManagerRef

      public String stepManagerRef()
      Returns the value of the stepManagerRef record component.
      Returns:
      the value of the stepManagerRef record component
    • stepUserRef

      public String stepUserRef()
      Returns the value of the stepUserRef record component.
      Returns:
      the value of the stepUserRef record component