public interface ProfileAPI
ProfileAPI gives access to some of the
profile administration: adding / removing members to / from a profile, retrieving / searching for profiles. SearchResult for general knowledege on Search mechanism in Bonita.| Modifier and Type | Method and Description |
|---|---|
ProfileMember |
createProfileMember(Long profileId,
Long userId,
Long groupId,
Long roleId)
Creates a profile member.
|
ProfileMember |
createProfileMember(ProfileMemberCreator creator)
Creates a profile member.
|
void |
deleteProfileMember(Long id)
Deletes the profile member.
|
Map<Long,Long> |
getNumberOfProfileMembers(List<Long> profileIds)
Retrieves the number of profile members for the profiles.
|
Profile |
getProfile(long id)
Retrieves the profile.
|
ProfileEntry |
getProfileEntry(long id)
Retrieves the profile entry.
|
List<Profile> |
getProfilesForUser(long userId)
Deprecated.
since 6.3
|
List<Profile> |
getProfilesForUser(long userId,
int startIndex,
int maxResults,
ProfileCriterion criterion)
Retrieves the profiles of the user.
|
List<Profile> |
getProfilesWithNavigationForUser(long userId,
int startIndex,
int maxResults,
ProfileCriterion criterion)
Retrieves the profiles with portal navigation for the user.
|
SearchResult<ProfileEntry> |
searchProfileEntries(SearchOptions options)
Searches for
ProfileEntrys with specific search criteria. |
SearchResult<ProfileMember> |
searchProfileMembers(String memberType,
SearchOptions options)
Searches for
ProfileMembers with specific search criteria. |
SearchResult<Profile> |
searchProfiles(SearchOptions options)
Searches for
Profiles with specific search criteria. |
Profile getProfile(long id) throws ProfileNotFoundException
id - The identifier of the profileProfileNotFoundException - If the identifier does not refer to an existing profileRetrieveException - If an exception occurs during the profile retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)@Deprecated List<Profile> getProfilesForUser(long userId) throws UserNotFoundException
userId - The identifier of the userUserNotFoundException - If the user identifier does not refer to an existing userRetrieveException - If an exception occurs during the profile retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)getProfilesForUser(long, int, int, ProfileCriterion)List<Profile> getProfilesForUser(long userId, int startIndex, int maxResults, ProfileCriterion criterion)
userId - The identifier of the userstartIndex - The index of the first result (starting from 0).maxResults - The maximum number of elements to get per page.criterion - The criterion for sorting the items over pages.RetrieveException - If an exception occurs during the profile retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)List<Profile> getProfilesWithNavigationForUser(long userId, int startIndex, int maxResults, ProfileCriterion criterion)
userId - The identifier of the userstartIndex - The index of the first result (starting from 0).maxResults - The maximum number of elements to get per page.criterion - The criterion for sorting the items over pages.RetrieveException - If an exception occurs during the profile retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)SearchResult<Profile> searchProfiles(SearchOptions options) throws SearchException
Profiles with specific search criteria. Use ProfileSearchDescriptor to
know the available filters.options - The search criteriaSearchResult containing the list of Profiles matching the search criteria.SearchException - If an exception occurs during the profile searchingInvalidSessionException - If the session is invalid (expired, unknown, ...)Profile,
ProfileSearchDescriptor,
SearchResultMap<Long,Long> getNumberOfProfileMembers(List<Long> profileIds)
If a profile does not exist, no exception is thrown and no value is added in the map.
profileIds - The identifiers of the profilesRetrieveException - If an exception occurs during the profile retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)SearchResult<ProfileMember> searchProfileMembers(String memberType, SearchOptions options) throws SearchException
ProfileMembers with specific search criteria. Use ProfileMemberSearchDescriptor to
know the available filters.memberType - The member type, it can be: user, role, group, roleAndGroup.options - The search criteriaSearchResult containing the list of ProfileMembers matching the search criteria.SearchException - If an exception occurs during the profile searchingInvalidSessionException - If the session is invalid (expired, unknown, ...)ProfileMember,
ProfileMemberSearchDescriptor,
SearchResultSearchResult<ProfileEntry> searchProfileEntries(SearchOptions options) throws SearchException
ProfileEntrys with specific search criteria. Use ProfileEntrySearchDescriptor to
know the available filters.options - The search criteria.SearchResult containing the list of ProfileEntrys matching the search criteria.SearchException - If an exception occurs during the profile searchingInvalidSessionException - If the session is invalid (expired, unknown, ...)ProfileEntry,
ProfileEntrySearchDescriptor,
SearchResultProfileEntry getProfileEntry(long id) throws ProfileEntryNotFoundException
id - The identifier of the profile entryProfileEntryNotFoundException - If the profile entry identifier does not refer to an existing userRetrieveException - If an exception occurs during the user retrievingInvalidSessionException - If the session is invalid (expired, unknown, ...)ProfileMember createProfileMember(Long profileId, Long userId, Long groupId, Long roleId) throws CreationException, AlreadyExistsException
profileId - The identifier of the profileuserId - The identifier of the usergroupId - The identifier of the grouproleId - The identifier of the roleAlreadyExistsException - If the tuple profileId/userId/roleId/groupId is already taken by an existing profile memberCreationException - If an exception occurs during the profile member creationInvalidSessionException - If the session is invalid (expired, unknown, ...)ProfileMember createProfileMember(ProfileMemberCreator creator) throws CreationException, AlreadyExistsException
It takes the values of the creator in order to create the profile member.
creator - The profile member to createAlreadyExistsException - If the tuple profileId/userId/roleId/groupId is already taken by an existing profile memberCreationException - If an exception occurs during the profile member creationInvalidSessionException - If the session is invalid (expired, unknown, ...)void deleteProfileMember(Long id) throws DeletionException
id - The identifier of the profile memberDeletionException - If an exception occurs during the profile member deletionInvalidSessionException - If the session is invalid (expired, unknown, ...)Copyright © 2018 Bonitasoft S.A.. All rights reserved.