public interface ProfileAPI
ProfileAPI
gives access to some of the
profile administation: adding / removing members to / from a profile, retrieving / searching for profiles. SearchResult for general knowledege on Search mechanism in Bonita BPM.
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.
|
SearchResult<ProfileEntry> |
searchProfileEntries(SearchOptions options)
Searches profile entries according to the criteria containing in the options.
|
SearchResult<ProfileMember> |
searchProfileMembers(String memberType,
SearchOptions options)
Searches profile members according to the criteria containing in the options.
|
SearchResult<Profile> |
searchProfiles(SearchOptions options)
Searches profiles according to the criteria containing in the options.
|
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, ...)ProfileAPI#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, ...)SearchResult<Profile> searchProfiles(SearchOptions options) throws SearchException
options
- The search criteriaSearchException
- If an exception occurs during the profile searchingInvalidSessionException
- If the session is invalid (expired, unknown, ...)Map<Long,Long> getNumberOfProfileMembers(List<Long> profileIds)
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
memberType
- The member type, it can be: user, role, group, roleAndGroup.options
- The search criteriaSearchException
- If an exception occurs during the profile searchingInvalidSessionException
- If the session is invalid (expired, unknown, ...)SearchResult<ProfileEntry> searchProfileEntries(SearchOptions options) throws SearchException
options
- The search criteriaSearchException
- If an exception occurs during the profile searchingInvalidSessionException
- If the session is invalid (expired, unknown, ...)ProfileEntry 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
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 © 2014 Bonitasoft S.A.. All rights reserved.