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 Summary
ConstructorsConstructorDescriptionInvolvedUsersData(String stepManagerRef, String stepUserRef, List<String> memberships) The compact constructor for this record. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.String[]Constructs an array containing the step references (stepManagerRef and stepUserRef) after filtering out any null or empty stringsfinal inthashCode()Returns a hash code value for this object.Returns a read-only view (unmodifiable list) of the membership references to prevent external modification of the record's internal state.Returns the value of thestepManagerRefrecord component.Returns the value of thestepUserRefrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InvolvedUsersData
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
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
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
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
stepManagerRef
Returns the value of thestepManagerRefrecord component.- Returns:
- the value of the
stepManagerRefrecord component
-
stepUserRef
Returns the value of thestepUserRefrecord component.- Returns:
- the value of the
stepUserRefrecord component
-