Class ProfileUtis
java.lang.Object
com.bonitasoft.processbuilder.extension.ProfileUtis
Utility class for retrieving user information based on Bonita profiles.
Provides static methods to collect all user IDs associated with a profile through
direct membership, roles, groups, and role-group combinations (memberships).
- Since:
- 1.0
- Author:
- Bonitasoft
-
Method Summary
Modifier and TypeMethodDescriptiongetUserIdsInProfile(org.bonitasoft.engine.api.APIAccessor apiAccessor, String profileName) Retrieves all unique user IDs associated with a given profile name.
-
Method Details
-
getUserIdsInProfile
public static List<Long> getUserIdsInProfile(org.bonitasoft.engine.api.APIAccessor apiAccessor, String profileName) Retrieves all unique user IDs associated with a given profile name.This method collects users from all membership types:
- USER: Users directly assigned to the profile
- ROLE: Users belonging to roles assigned to the profile
- GROUP: Users belonging to groups assigned to the profile
- MEMBERSHIP: Users with specific role-group combinations assigned to the profile
- Parameters:
apiAccessor- The Bonita API accessor to obtain ProfileAPI and IdentityAPI.profileName- The name of the profile to search for (e.g., "Administrator", "User").- Returns:
- A list of unique user IDs associated with the profile, or an empty list if the profile is not found or an error occurs.
- Throws:
IllegalArgumentException- if apiAccessor is null or profileName is null/empty.
-