public class ProfileServiceImpl extends java.lang.Object implements ProfileService
ENTRY_PROFILE, PROFILE, PROFILE_MEMBER| Constructor and Description |
|---|
ProfileServiceImpl(PersistenceService persistenceService,
Recorder recorder,
QueriableLoggerService queriableLoggerService,
ReadSessionAccessor sessionAccessor,
SessionService sessionService) |
| Modifier and Type | Method and Description |
|---|---|
SProfileMember |
addGroupToProfile(long profileId,
long groupId,
java.lang.String groupName,
java.lang.String parentPath)
Add a group to exist profile
|
SProfileMember |
addRoleAndGroupToProfile(long profileId,
long roleId,
long groupId,
java.lang.String roleName,
java.lang.String groupName,
java.lang.String groupParentPath)
Add a role and a group to exist profile
|
SProfileMember |
addRoleToProfile(long profileId,
long roleId,
java.lang.String roleName)
Add a role to exist profile
|
SProfileMember |
addUserToProfile(long profileId,
long userId,
java.lang.String firstName,
java.lang.String lastName,
java.lang.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
|
java.util.List<SProfileEntry> |
getEntriesOfProfile(java.lang.String profileName) |
long |
getNumberOfProfileEntries(QueryOptions queryOptions) |
long |
getNumberOfProfileMembers(java.lang.String querySuffix,
QueryOptions countOptions)
Get the total number of profile members
|
long |
getNumberOfProfiles(QueryOptions queryOptions) |
SProfile |
getProfile(long profileId)
Get profile by its id
|
SProfile |
getProfileByName(java.lang.String profileName)
Get profile by given name
|
SProfileEntry |
getProfileEntry(long profileEntryId)
Get profile entry by its id
|
java.util.List<SProfileMember> |
getProfileMembers(java.util.List<java.lang.Long> profileIds)
Get the total number of sProfileMember by a list contains profileIds
|
java.util.List<SProfileMember> |
getProfileMembers(long profileId,
QueryOptions queryOptions)
Get a list of profileMembers by the given profileId
|
java.util.List<SProfileMember> |
getProfileMembersOfGroup(long groupId,
int fromIndex,
int numberOfElements,
java.lang.String field,
OrderByType order)
Get all sProfileMembers with same group having the given value for the given int index
|
java.util.List<SProfileMember> |
getProfileMembersOfRole(long roleId,
int fromIndex,
int numberOfElements,
java.lang.String field,
OrderByType order)
Get all sProfileMembers with same group having the given value for the given int index
|
java.util.List<SProfileMember> |
getProfileMembersOfUser(long userId,
int fromIndex,
int numberOfElements,
java.lang.String field,
OrderByType order)
Get all sProfileMembers with same user having the given value for the given int index
|
SProfileMember |
getProfileMemberWithoutDisplayName(long profileMemberId) |
java.util.List<SProfile> |
getProfiles(java.util.List<java.lang.Long> profileIds)
Get all profiles by given ids
|
java.util.List<SProfile> |
getProfilesOfUser(long userId) |
java.util.List<SProfileEntry> |
searchProfileEntries(QueryOptions queryOptions) |
java.util.List<SProfileMember> |
searchProfileMembers(java.lang.String querySuffix,
QueryOptions queryOptions)
Get all sProfileMember by profileId and queryOptions
|
java.util.List<SProfile> |
searchProfiles(QueryOptions queryOptions) |
java.util.List<SProfile> |
searchProfilesOfUser(long userId,
int fromIndex,
int numberOfElements,
java.lang.String field,
OrderByType order)
Get all profiles of the user by userId
|
java.util.List<SProfile> |
searchProfilesWithNavigationOfUser(long userId,
int fromIndex,
int numberOfElements,
java.lang.String field,
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(PersistenceService persistenceService, Recorder recorder, 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(java.lang.String profileName) throws SProfileNotFoundException, SBonitaReadException
ProfileServicegetProfileByName in interface ProfileServiceSProfileNotFoundException - occurs when the identifier does not refer to an existing sProfileSBonitaReadExceptionpublic java.util.List<SProfile> getProfiles(java.util.List<java.lang.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 java.util.List<SProfileEntry> getEntriesOfProfile(java.lang.String profileName) throws SBonitaReadException, SProfileNotFoundException
getEntriesOfProfile in interface ProfileServiceSBonitaReadExceptionSProfileNotFoundExceptionpublic 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, java.lang.String firstName, java.lang.String lastName, java.lang.String userName) throws SProfileMemberCreationException
ProfileServiceaddUserToProfile in interface ProfileServiceprofileId - the identifier of profileuserId - the identifier of userSProfileMemberCreationExceptionpublic SProfileMember addGroupToProfile(long profileId, long groupId, java.lang.String groupName, java.lang.String parentPath) throws SProfileMemberCreationException
ProfileServiceaddGroupToProfile in interface ProfileServiceprofileId - the identifier of profilegroupId - the identifier of groupSProfileMemberCreationException - TODOpublic SProfileMember addRoleToProfile(long profileId, long roleId, java.lang.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, java.lang.String roleName, java.lang.String groupName, java.lang.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 java.util.List<SProfileMember> getProfileMembersOfUser(long userId, int fromIndex, int numberOfElements, java.lang.String field, OrderByType order) throws SBonitaReadException
ProfileServicegetProfileMembersOfUser in interface ProfileServiceuserId - the identifier of userfromIndex - first result to be considered(>=0)SBonitaReadException - occurs when an exception is thrown during sProfileMember creationpublic java.util.List<SProfileMember> getProfileMembersOfGroup(long groupId, int fromIndex, int numberOfElements, java.lang.String field, OrderByType order) throws SBonitaReadException
ProfileServicegetProfileMembersOfGroup in interface ProfileServicegroupId - the identifier of groupfromIndex - first result to be considered(>=0)SBonitaReadException - occurs when an exception is thrown during sProfileMember creationpublic java.util.List<SProfileMember> getProfileMembersOfRole(long roleId, int fromIndex, int numberOfElements, java.lang.String field, OrderByType order) throws SBonitaReadException
ProfileServicegetProfileMembersOfRole in interface ProfileServiceroleId - the identifier of rolefromIndex - first result to be considered(>=0)SBonitaReadException - occurs when an exception is thrown during sProfileMember creationpublic java.util.List<SProfile> searchProfilesOfUser(long userId, int fromIndex, int numberOfElements, java.lang.String field, OrderByType order) throws SBonitaReadException
ProfileServicesearchProfilesOfUser in interface ProfileServicefromIndex - first result to be considered(>=0)SBonitaReadExceptionpublic java.util.List<SProfile> getProfilesOfUser(long userId) throws SBonitaReadException
getProfilesOfUser in interface ProfileServiceSBonitaReadExceptionpublic java.util.List<SProfile> searchProfilesWithNavigationOfUser(long userId, int fromIndex, int numberOfElements, java.lang.String field, OrderByType order) throws SBonitaReadException
ProfileServicesearchProfilesWithNavigationOfUser in interface ProfileServicefromIndex - first result to be considered(>=0)SBonitaReadExceptionpublic java.util.List<SProfileMember> getProfileMembers(long profileId, QueryOptions queryOptions) throws SProfileMemberNotFoundException
ProfileServicegetProfileMembers in interface ProfileServiceSProfileMemberNotFoundExceptionpublic java.util.List<SProfileMember> searchProfileMembers(java.lang.String querySuffix, QueryOptions queryOptions) throws SBonitaReadException
ProfileServicesearchProfileMembers in interface ProfileServicequerySuffix - the suffix of query stringSBonitaReadExceptionpublic long getNumberOfProfileMembers(java.lang.String querySuffix,
QueryOptions countOptions)
throws SBonitaReadException
ProfileServicegetNumberOfProfileMembers in interface ProfileServicequerySuffix - the suffix of query stringcountOptions - The criterion used to search profileMembersSBonitaReadExceptionpublic java.util.List<SProfileMember> getProfileMembers(java.util.List<java.lang.Long> profileIds) throws SBonitaReadException
ProfileServicegetProfileMembers in interface ProfileServiceSBonitaReadExceptionpublic void deleteAllProfileMembers()
throws SProfileMemberDeletionException
ProfileServicedeleteAllProfileMembers in interface ProfileServiceSProfileMemberDeletionExceptionpublic long getNumberOfProfiles(QueryOptions queryOptions) throws SBonitaReadException
getNumberOfProfiles in interface ProfileServiceSBonitaReadExceptionpublic java.util.List<SProfile> searchProfiles(QueryOptions queryOptions) throws SBonitaReadException
searchProfiles in interface ProfileServiceSBonitaReadExceptionpublic long getNumberOfProfileEntries(QueryOptions queryOptions) throws SBonitaReadException
getNumberOfProfileEntries in interface ProfileServiceSBonitaReadExceptionpublic java.util.List<SProfileEntry> searchProfileEntries(QueryOptions queryOptions) throws SBonitaReadException
searchProfileEntries in interface ProfileServiceSBonitaReadExceptionpublic void updateProfileMetaData(long profileId)
throws SProfileUpdateException
ProfileServiceupdateProfileMetaData in interface ProfileServiceSProfileUpdateException - when given profileId is not found