public class ProfileServiceImpl extends Object implements ProfileService
ENTRY_PROFILE, PROFILE, PROFILE_MEMBER| Constructor and Description |
|---|
ProfileServiceImpl(org.bonitasoft.engine.services.PersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
ReadSessionAccessor sessionAccessor,
SessionService sessionService) |
| Modifier and Type | Method and Description |
|---|---|
SProfileMember |
addGroupToProfile(long profileId,
long groupId,
String groupName,
String parentPath)
Add a group to exist profile
|
SProfileMember |
addRoleAndGroupToProfile(long profileId,
long roleId,
long groupId,
String roleName,
String groupName,
String groupParentPath)
Add a role and a group to exist profile
|
SProfileMember |
addRoleToProfile(long profileId,
long roleId,
String roleName)
Add a role to exist profile
|
SProfileMember |
addUserToProfile(long profileId,
long userId,
String firstName,
String lastName,
String userName)
Add a user to exist profile
|
SProfile |
createProfile(SProfile profile)
Add a new profile
|
SProfileEntry |
createProfileEntry(SProfileEntry profileEntry)
Add new profile entry
|
void |
deleteAllProfileEntriesOfProfile(SProfile profile) |
void |
deleteAllProfileMembers()
Delete all profile members for the connected tenant
|
void |
deleteAllProfileMembersOfProfile(SProfile profile) |
void |
deleteProfile(long profileId)
Delete profile by its id
|
void |
deleteProfile(SProfile profile)
Delete profile by given sProfile
|
void |
deleteProfileEntry(long profileEntryId)
Delete a profile entry by its id
|
void |
deleteProfileEntry(SProfileEntry profileEntry)
Delete a profileEntry by given profileEntry
|
void |
deleteProfileMember(long profileMemberId)
Delete a profile member by its id
|
void |
deleteProfileMember(SProfileMember profileMember)
Delete a profile member by given sProfile member
|
List<SProfileEntry> |
getEntriesOfProfile(long profileId,
int fromIndex,
int numberOfProfileEntries,
String field,
org.bonitasoft.engine.persistence.OrderByType order)
Get all profile entries having the given value for the given int index by profileId
|
List<SProfileEntry> |
getEntriesOfProfileByParentId(long profileId,
long parentId,
int fromIndex,
int numberOfProfileEntries,
String field,
org.bonitasoft.engine.persistence.OrderByType order)
Get a list of profileEntries by the given profileId and parentId
|
long |
getNumberOfProfileEntries(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
long |
getNumberOfProfileMembers(String querySuffix,
org.bonitasoft.engine.persistence.QueryOptions countOptions)
Get the total number of profile members
|
long |
getNumberOfProfiles(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
SProfile |
getProfile(long profileId)
Get profile by its id
|
SProfile |
getProfileByName(String profileName)
Get profile by given name
|
SProfileEntry |
getProfileEntry(long profileEntryId)
Get profile entry by its id
|
List<SProfileMember> |
getProfileMembers(int fromIndex,
int numberOfElements,
String field,
org.bonitasoft.engine.persistence.OrderByType order) |
List<SProfileMember> |
getProfileMembers(List<Long> profileIds)
Get the total number of sProfileMember by a list contains profileIds
|
List<SProfileMember> |
getProfileMembers(long profileId,
org.bonitasoft.engine.persistence.QueryOptions queryOptions)
Get a list of profileMembers by the given profileId
|
List<SProfileMember> |
getProfileMembersOfGroup(long groupId,
int fromIndex,
int numberOfElements,
String field,
org.bonitasoft.engine.persistence.OrderByType order)
Get all sProfileMembers with same group having the given value for the given int index
|
List<SProfileMember> |
getProfileMembersOfRole(long roleId,
int fromIndex,
int numberOfElements,
String field,
org.bonitasoft.engine.persistence.OrderByType order)
Get all sProfileMembers with same group having the given value for the given int index
|
List<SProfileMember> |
getProfileMembersOfUser(long userId,
int fromIndex,
int numberOfElements,
String field,
org.bonitasoft.engine.persistence.OrderByType order)
Get all sProfileMembers with same user having the given value for the given int index
|
SProfileMember |
getProfileMemberWithoutDisplayName(long profileMemberId) |
List<SProfile> |
getProfiles(List<Long> profileIds)
Get all profiles by given ids
|
List<SProfileEntry> |
searchProfileEntries(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
List<SProfileMember> |
searchProfileMembers(String querySuffix,
org.bonitasoft.engine.persistence.QueryOptions queryOptions)
Get all sProfileMember by profileId and queryOptions
|
List<SProfile> |
searchProfiles(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
List<SProfile> |
searchProfilesOfUser(long userId,
int fromIndex,
int numberOfElements,
String field,
org.bonitasoft.engine.persistence.OrderByType order)
Get all profiles of the user by userId
|
List<SProfile> |
searchProfilesWithNavigationOfUser(long userId,
int fromIndex,
int numberOfElements,
String field,
org.bonitasoft.engine.persistence.OrderByType order)
Get all profiles with portal navigation for a user
|
SProfile |
updateProfile(SProfile sProfile,
EntityUpdateDescriptor descriptor)
Update profile by given profile and new content
|
SProfileEntry |
updateProfileEntry(SProfileEntry profileEntry,
EntityUpdateDescriptor descriptor)
Update a profileEntry by given profileEntry and new content
|
void |
updateProfileMetaData(long profileId)
updates profile metaData fields lastUpdateDate and lastUpdatedBy for a given profile
|
public ProfileServiceImpl(org.bonitasoft.engine.services.PersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
ReadSessionAccessor sessionAccessor,
SessionService sessionService)
public SProfile createProfile(SProfile profile) throws SProfileCreationException
ProfileServicecreateProfile in interface ProfileServiceSProfileCreationException - occurs when an exception is thrown during sProfile creationpublic SProfile getProfile(long profileId) throws SProfileNotFoundException
ProfileServicegetProfile in interface ProfileServiceSProfileNotFoundException - occurs when the identifier does not refer to an existing sProfilepublic SProfile getProfileByName(String profileName) throws SProfileNotFoundException
ProfileServicegetProfileByName in interface ProfileServiceSProfileNotFoundException - occurs when the identifier does not refer to an existing sProfilepublic List<SProfile> getProfiles(List<Long> profileIds) throws SProfileNotFoundException
ProfileServicegetProfiles in interface ProfileServiceprofileIds - a list contains many profile idSProfileNotFoundException - occurs when the identifier does not refer to an existing sProfilepublic SProfile updateProfile(SProfile sProfile, EntityUpdateDescriptor descriptor) throws SProfileUpdateException
ProfileServiceupdateProfile in interface ProfileServiceSProfileUpdateException - occurs when an exception is thrown during sProfile updatepublic void deleteProfile(SProfile profile) throws SProfileDeletionException, SProfileEntryDeletionException, SProfileMemberDeletionException
ProfileServicedeleteProfile in interface ProfileServiceSProfileDeletionException - occurs when an exception is thrown during sProfile deletionSProfileEntryDeletionExceptionSProfileMemberDeletionExceptionpublic void deleteAllProfileMembersOfProfile(SProfile profile) throws SProfileMemberDeletionException
deleteAllProfileMembersOfProfile in interface ProfileServiceSProfileMemberDeletionExceptionpublic void deleteAllProfileEntriesOfProfile(SProfile profile) throws SProfileEntryDeletionException
deleteAllProfileEntriesOfProfile in interface ProfileServiceSProfileEntryDeletionExceptionpublic void deleteProfile(long profileId)
throws SProfileNotFoundException,
SProfileDeletionException,
SProfileEntryDeletionException,
SProfileMemberDeletionException
ProfileServicedeleteProfile in interface ProfileServiceSProfileNotFoundException - occurs when the identifier does not refer to an existing sProfileSProfileDeletionException - occurs when an exception is thrown during sProfile deletionSProfileEntryDeletionExceptionSProfileMemberDeletionExceptionpublic SProfileEntry getProfileEntry(long profileEntryId) throws SProfileEntryNotFoundException
ProfileServicegetProfileEntry in interface ProfileServiceSProfileEntryNotFoundException - occurs when the identifier does not refer to an existing sProfileEntrypublic List<SProfileEntry> getEntriesOfProfile(long profileId, int fromIndex, int numberOfProfileEntries, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicegetEntriesOfProfile in interface ProfileServicefromIndex - first result to be considered(>=0)numberOfProfileEntries - the max number of profileEntry to be returned (>=0)org.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SProfileEntry> getEntriesOfProfileByParentId(long profileId, long parentId, int fromIndex, int numberOfProfileEntries, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicegetEntriesOfProfileByParentId in interface ProfileServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic SProfileEntry createProfileEntry(SProfileEntry profileEntry) throws SProfileEntryCreationException
ProfileServicecreateProfileEntry in interface ProfileServiceSProfileEntryCreationException - occurs when an exception is thrown during sProfileEntry creationpublic SProfileEntry updateProfileEntry(SProfileEntry profileEntry, EntityUpdateDescriptor descriptor) throws SProfileEntryUpdateException
ProfileServiceupdateProfileEntry in interface ProfileServiceSProfileEntryUpdateException - occurs when an exception is thrown during sProfileEntry updatepublic void deleteProfileEntry(SProfileEntry profileEntry) throws SProfileEntryDeletionException
ProfileServicedeleteProfileEntry in interface ProfileServiceSProfileEntryDeletionException - occurs when an exception is thrown during sProfileEntry deletionpublic void deleteProfileEntry(long profileEntryId)
throws SProfileEntryNotFoundException,
SProfileEntryDeletionException
ProfileServicedeleteProfileEntry in interface ProfileServiceSProfileEntryNotFoundException - occurs when the identifier does not refer to an existing sProfileEntrySProfileEntryDeletionException - occurs when an exception is thrown during sProfileEntry deletionpublic SProfileMember addUserToProfile(long profileId, long userId, String firstName, String lastName, String userName) throws SProfileMemberCreationException
ProfileServiceaddUserToProfile in interface ProfileServiceprofileId - the identifier of profileuserId - the identifier of userSProfileMemberCreationExceptionpublic SProfileMember addGroupToProfile(long profileId, long groupId, String groupName, String parentPath) throws SProfileMemberCreationException
ProfileServiceaddGroupToProfile in interface ProfileServiceprofileId - the identifier of profilegroupId - the identifier of groupSProfileMemberCreationException - TODOpublic SProfileMember addRoleToProfile(long profileId, long roleId, String roleName) throws SProfileMemberCreationException
ProfileServiceaddRoleToProfile in interface ProfileServiceprofileId - the identifier of profileroleId - the identifier of roleSProfileMemberCreationException - TODOpublic SProfileMember addRoleAndGroupToProfile(long profileId, long roleId, long groupId, String roleName, String groupName, String groupParentPath) throws SProfileMemberCreationException
ProfileServiceaddRoleAndGroupToProfile in interface ProfileServiceprofileId - the identifier of profileroleId - the identifier of rolegroupId - the identifier of groupSProfileMemberCreationException - TODOpublic void deleteProfileMember(long profileMemberId)
throws SProfileMemberDeletionException,
SProfileMemberNotFoundException
ProfileServicedeleteProfileMember in interface ProfileServiceSProfileMemberDeletionException - occurs when an exception is thrown during sProfileMember deletionSProfileMemberNotFoundException - occurs when the identifier does not refer to an existing sProfileMemberpublic SProfileMember getProfileMemberWithoutDisplayName(long profileMemberId) throws SProfileMemberNotFoundException
getProfileMemberWithoutDisplayName in interface ProfileServiceSProfileMemberNotFoundExceptionpublic void deleteProfileMember(SProfileMember profileMember) throws SProfileMemberDeletionException
ProfileServicedeleteProfileMember in interface ProfileServiceSProfileMemberDeletionException - occurs when an exception is thrown during sProfileMember deletionpublic List<SProfileMember> getProfileMembersOfUser(long userId, int fromIndex, int numberOfElements, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicegetProfileMembersOfUser in interface ProfileServiceuserId - the identifier of userfromIndex - first result to be considered(>=0)org.bonitasoft.engine.persistence.SBonitaReadException - occurs when an exception is thrown during sProfileMember creationpublic List<SProfileMember> getProfileMembersOfGroup(long groupId, int fromIndex, int numberOfElements, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicegetProfileMembersOfGroup in interface ProfileServicegroupId - the identifier of groupfromIndex - first result to be considered(>=0)org.bonitasoft.engine.persistence.SBonitaReadException - occurs when an exception is thrown during sProfileMember creationpublic List<SProfileMember> getProfileMembersOfRole(long roleId, int fromIndex, int numberOfElements, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicegetProfileMembersOfRole in interface ProfileServiceroleId - the identifier of rolefromIndex - first result to be considered(>=0)org.bonitasoft.engine.persistence.SBonitaReadException - occurs when an exception is thrown during sProfileMember creationpublic List<SProfile> searchProfilesOfUser(long userId, int fromIndex, int numberOfElements, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicesearchProfilesOfUser in interface ProfileServicefromIndex - first result to be considered(>=0)org.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SProfile> searchProfilesWithNavigationOfUser(long userId, int fromIndex, int numberOfElements, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicesearchProfilesWithNavigationOfUser in interface ProfileServicefromIndex - first result to be considered(>=0)org.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SProfileMember> getProfileMembers(long profileId, org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws SProfileMemberNotFoundException
ProfileServicegetProfileMembers in interface ProfileServiceSProfileMemberNotFoundExceptionpublic List<SProfileMember> searchProfileMembers(String querySuffix, org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicesearchProfileMembers in interface ProfileServicequerySuffix - the suffix of query stringorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic long getNumberOfProfileMembers(String querySuffix, org.bonitasoft.engine.persistence.QueryOptions countOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicegetNumberOfProfileMembers in interface ProfileServicequerySuffix - the suffix of query stringcountOptions - The criterion used to search profileMembersorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SProfileMember> getProfileMembers(List<Long> profileIds) throws org.bonitasoft.engine.persistence.SBonitaReadException
ProfileServicegetProfileMembers in interface ProfileServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic void deleteAllProfileMembers()
throws SProfileMemberDeletionException
ProfileServicedeleteAllProfileMembers in interface ProfileServiceSProfileMemberDeletionExceptionpublic long getNumberOfProfiles(org.bonitasoft.engine.persistence.QueryOptions queryOptions)
throws org.bonitasoft.engine.persistence.SBonitaReadException
getNumberOfProfiles in interface ProfileServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SProfile> searchProfiles(org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
searchProfiles in interface ProfileServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SProfileMember> getProfileMembers(int fromIndex, int numberOfElements, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
org.bonitasoft.engine.persistence.SBonitaReadExceptionpublic long getNumberOfProfileEntries(org.bonitasoft.engine.persistence.QueryOptions queryOptions)
throws org.bonitasoft.engine.persistence.SBonitaReadException
getNumberOfProfileEntries in interface ProfileServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SProfileEntry> searchProfileEntries(org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
searchProfileEntries in interface ProfileServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic void updateProfileMetaData(long profileId)
throws SProfileUpdateException
ProfileServiceupdateProfileMetaData in interface ProfileServiceSProfileUpdateException - when given profileId is not foundCopyright © 2018 Bonitasoft S.A.. All rights reserved.