Package org.bonitasoft.engine.profile
Interface ProfileService
- All Known Implementing Classes:
ProfileServiceImpl
public interface ProfileService
- Author:
- Matthieu Chaffotte, Elias Ricken de Medeiros, Celine Souchet
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddGroupToProfile(long profileId, long groupId, String groupName, String parentPath) Add a group to exist profileaddRoleAndGroupToProfile(long profileId, long roleId, long groupId, String roleName, String groupName, String groupParentPath) Add a role and a group to exist profileaddRoleToProfile(long profileId, long roleId, String roleName) Add a role to exist profileaddUserToProfile(long profileId, long userId, String firstName, String lastName, String userName) Add a user to exist profilecreateProfile(SProfile profile) Add a new profilevoidDelete all profile members for the connected tenantvoiddeleteAllProfileMembersOfProfile(SProfile profile) voiddeleteProfile(long profileId) Delete profile by its idvoiddeleteProfile(SProfile profile) Delete profile by given sProfilevoiddeleteProfileMember(long profileMemberId) Delete a profile member by its idvoiddeleteProfileMember(SProfileMember profileMember) Delete a profile member by given sProfile memberlonggetNumberOfProfileMembers(String querySuffix, QueryOptions countOptions) Get the total number of profile memberslonggetNumberOfProfiles(QueryOptions queryOptions) getProfile(long profileId) Get profile by its idgetProfileByName(String profileName) Get profile by given namegetProfileMembers(long profileId, QueryOptions queryOptions) Get a list of profileMembers by the given profileIdgetProfileMembers(List<Long> profileIds) Get the total number of sProfileMember by a list contains profileIdsgetProfileMembersOfGroup(long groupId, int fromIndex, int numberOfElements, String field, OrderByType order) Get all sProfileMembers with same group having the given value for the given int indexgetProfileMembersOfRole(long roleId, int fromIndex, int numberOfElements, String field, OrderByType order) Get all sProfileMembers with same group having the given value for the given int indexgetProfileMembersOfUser(long userId, int fromIndex, int numberOfElements, String field, OrderByType order) Get all sProfileMembers with same user having the given value for the given int indexgetProfileMemberWithoutDisplayName(long profileMemberId) getProfiles(List<Long> profileIds) Get all profiles by given idsgetProfilesOfUser(long userId) searchProfileMembers(String querySuffix, QueryOptions searchOptions) Get all sProfileMember by profileId and queryOptionssearchProfiles(QueryOptions queryOptions) searchProfilesOfUser(long userId, int fromIndex, int numberOfElements, String field, OrderByType order) Get all profiles of the user by userIdupdateProfile(SProfile profile, EntityUpdateDescriptor descriptor) Update profile by given profile and new contentvoidupdateProfileMetaData(long profileId) updates profile metaData fields lastUpdateDate and lastUpdatedBy for a given profile
-
Field Details
-
PROFILE
- See Also:
-
PROFILE_MEMBER
- See Also:
-
-
Method Details
-
getProfile
Get profile by its id- Parameters:
profileId-- Returns:
- sProfile
- Throws:
SProfileNotFoundException- occurs when the identifier does not refer to an existing sProfile- Since:
- 6.0
-
getProfiles
Get all profiles by given ids- Parameters:
profileIds- a list contains many profile id- Returns:
- Throws:
SProfileNotFoundException- occurs when the identifier does not refer to an existing sProfile- Since:
- 6.0
-
createProfile
Add a new profile- Parameters:
profile-- Returns:
- sProfile
- Throws:
SProfileCreationException- occurs when an exception is thrown during sProfile creation- Since:
- 6.0
-
updateProfile
SProfile updateProfile(SProfile profile, EntityUpdateDescriptor descriptor) throws SProfileUpdateException Update profile by given profile and new content- Parameters:
profile-descriptor-- Returns:
- The updated profile
- Throws:
SProfileUpdateException- occurs when an exception is thrown during sProfile update- Since:
- 6.0
-
deleteProfile
void deleteProfile(SProfile profile) throws SProfileNotFoundException, SProfileDeletionException, SProfileMemberDeletionException Delete profile by given sProfile- Parameters:
profile-- Throws:
SProfileNotFoundException- occurs when the identifier does not refer to an existing sProfileSProfileDeletionException- occurs when an exception is thrown during sProfile deletionSProfileMemberDeletionException- Since:
- 6.0
-
deleteProfile
void deleteProfile(long profileId) throws SProfileNotFoundException, SProfileDeletionException, SProfileMemberDeletionException Delete profile by its id- Parameters:
profileId-- Throws:
SProfileNotFoundException- occurs when the identifier does not refer to an existing sProfileSProfileDeletionException- occurs when an exception is thrown during sProfile deletionSProfileMemberDeletionException- Since:
- 6.0
-
searchProfilesOfUser
List<SProfile> searchProfilesOfUser(long userId, int fromIndex, int numberOfElements, String field, OrderByType order) throws SBonitaReadException Get all profiles of the user by userId- Parameters:
userId-fromIndex- first result to be considered(>=0)numberOfElements- the max number of elementss to be returned (>=0)field-order-- Returns:
- A list of sProfile
- Throws:
SBonitaReadException- Since:
- 6.0
-
getProfilesOfUser
- Throws:
SBonitaReadException
-
addUserToProfile
SProfileMember addUserToProfile(long profileId, long userId, String firstName, String lastName, String userName) throws SProfileMemberCreationException Add a user to exist profile- Parameters:
profileId- the identifier of profileuserId- the identifier of userfirstName-lastName-userName-- Returns:
- sProfileMember
- Throws:
SProfileMemberCreationException- Since:
- 6.0
-
addGroupToProfile
SProfileMember addGroupToProfile(long profileId, long groupId, String groupName, String parentPath) throws SProfileMemberCreationException Add a group to exist profile- Parameters:
profileId- the identifier of profilegroupId- the identifier of groupgroupName-parentPath-- Returns:
- sProfileMember
- Throws:
SProfileMemberCreationException- TODO- Since:
- 6.0
-
addRoleToProfile
SProfileMember addRoleToProfile(long profileId, long roleId, String roleName) throws SProfileMemberCreationException Add a role to exist profile- Parameters:
profileId- the identifier of profileroleId- the identifier of roleroleName-- Returns:
- sProfileMember
- Throws:
SProfileMemberCreationException- TODO- Since:
- 6.0
-
addRoleAndGroupToProfile
SProfileMember addRoleAndGroupToProfile(long profileId, long roleId, long groupId, String roleName, String groupName, String groupParentPath) throws SProfileMemberCreationException Add a role and a group to exist profile- Parameters:
profileId- the identifier of profileroleId- the identifier of rolegroupId- the identifier of grouproleName-groupName-groupParentPath-- Returns:
- sProfileMember
- Throws:
SProfileMemberCreationException- TODO- Since:
- 6.0
-
getProfileMembersOfUser
List<SProfileMember> getProfileMembersOfUser(long userId, int fromIndex, int numberOfElements, String field, OrderByType order) throws SBonitaReadException Get all sProfileMembers with same user having the given value for the given int index- Parameters:
userId- the identifier of userfromIndex- first result to be considered(>=0)numberOfElements- the max number of emelents to be returned (>=0)field-order-- Returns:
- sProfileMember
- Throws:
SBonitaReadException- occurs when an exception is thrown during sProfileMember creation- Since:
- 6.0
-
getProfileMembersOfGroup
List<SProfileMember> getProfileMembersOfGroup(long groupId, int fromIndex, int numberOfElements, String field, OrderByType order) throws SBonitaReadException Get all sProfileMembers with same group having the given value for the given int index- Parameters:
groupId- the identifier of groupfromIndex- first result to be considered(>=0)numberOfElements- the max number of elements to be returned (>=0)field-order-- Returns:
- sProfileMember
- Throws:
SBonitaReadException- occurs when an exception is thrown during sProfileMember creation- Since:
- 6.0
-
getProfileMembersOfRole
List<SProfileMember> getProfileMembersOfRole(long roleId, int fromIndex, int numberOfElements, String field, OrderByType order) throws SBonitaReadException Get all sProfileMembers with same group having the given value for the given int index- Parameters:
roleId- the identifier of rolefromIndex- first result to be considered(>=0)numberOfElements- the max number of elements to be returned (>=0)field-order-- Returns:
- sProfileMember
- Throws:
SBonitaReadException- occurs when an exception is thrown during sProfileMember creation- Since:
- 6.0
-
deleteProfileMember
void deleteProfileMember(long profileMemberId) throws SProfileMemberDeletionException, SProfileMemberNotFoundException Delete a profile member by its id- Parameters:
profileMemberId-- Throws:
SProfileMemberDeletionException- occurs when an exception is thrown during sProfileMember deletionSProfileMemberNotFoundException- occurs when the identifier does not refer to an existing sProfileMember- Since:
- 6.0
-
deleteProfileMember
Delete a profile member by given sProfile member- Parameters:
profileMember-- Throws:
SProfileMemberDeletionException- occurs when an exception is thrown during sProfileMember deletion- Since:
- 6.0
-
getNumberOfProfileMembers
long getNumberOfProfileMembers(String querySuffix, QueryOptions countOptions) throws SBonitaReadException Get the total number of profile members- Parameters:
querySuffix- the suffix of query stringcountOptions- The criterion used to search profileMembers- Returns:
- the total number of profile members
- Throws:
SBonitaReadException- Since:
- 6.0
-
searchProfileMembers
List<SProfileMember> searchProfileMembers(String querySuffix, QueryOptions searchOptions) throws SBonitaReadException Get all sProfileMember by profileId and queryOptions- Parameters:
querySuffix- the suffix of query string- Returns:
- all sProfileMember by profileId and queryOptions
- Throws:
SBonitaReadException- Since:
- 6.0
-
getProfileMembers
Get the total number of sProfileMember by a list contains profileIds- Parameters:
profileIds-- Returns:
- A list of <profileId, NumberOfMemberForThatProfile>
- Throws:
SBonitaReadException- Since:
- 6.0
-
getProfileByName
SProfile getProfileByName(String profileName) throws SProfileNotFoundException, SBonitaReadException Get profile by given name- Parameters:
profileName-- Returns:
- sProfile
- Throws:
SProfileNotFoundException- occurs when the identifier does not refer to an existing sProfileSBonitaReadException- Since:
- 6.0
-
getProfileMembers
List<SProfileMember> getProfileMembers(long profileId, QueryOptions queryOptions) throws SProfileMemberNotFoundException Get a list of profileMembers by the given profileId- Parameters:
profileId-- Returns:
- a list of profileMembers
- Throws:
SProfileMemberNotFoundException
-
deleteAllProfileMembers
Delete all profile members for the connected tenant- Throws:
SProfileMemberDeletionException- Since:
- 6.1
-
getNumberOfProfiles
- Parameters:
queryOptions-- Returns:
- Throws:
SBonitaReadException
-
searchProfiles
- Parameters:
queryOptions-- Returns:
- Throws:
SBonitaReadException
-
deleteAllProfileMembersOfProfile
- Parameters:
profile-- Throws:
SProfileMemberDeletionException- Since:
- 6.3.1
-
getProfileMemberWithoutDisplayName
SProfileMember getProfileMemberWithoutDisplayName(long profileMemberId) throws SProfileMemberNotFoundException - Parameters:
profileMemberId-- Returns:
- Throws:
SProfileMemberNotFoundException- Since:
- 6.3.1
-
updateProfileMetaData
updates profile metaData fields lastUpdateDate and lastUpdatedBy for a given profile- Parameters:
profileId-- Throws:
SProfileUpdateException- when given profileId is not found
-