Class SuperUserProfileService
java.lang.Object
dev.getelements.elements.service.profile.SuperUserProfileService
- All Implemented Interfaces:
ProfileService
Provides full access to the
Profile and related types. Should be
used in conjunction with users SUPERUSER level access.
Created by patricktwohig on 6/28/17.-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.service.profile.ProfileService
PROFILE_CREATED_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProfile(CreateProfileRequest createProfileRequest) Creates a new profile.voiddeleteProfile(String profileId) Deletes theProfilewith the supplied profile ID.Finds the currently active profile, if any.Returns theProfileof the currently logged-in user.getProfile(String profileId) Fetches a specificProfileinstance based on ID.getProfiles(int offset, int count, String search) Lists allProfileinstances, specifying a search query.getProfiles(int offset, int count, String applicationNameOrId, String userId, Long lowerBoundTimestamp, Long upperBoundTimestamp) Lists allProfileinstances starting with the offset and count.voidsetApplicationDao(ApplicationDao applicationDao) voidsetCurrentProfileOptional(Optional<Profile> currentProfileOptional) voidsetCurrentProfileSupplier(Supplier<Profile> currentProfileSupplier) voidsetElementRegistry(ElementRegistry elementRegistry) voidsetLargeObjectDao(LargeObjectDao largeObjectDao) voidsetNameService(NameService nameService) voidsetProfileDao(ProfileDao profileDao) voidsetProfileImageObjectUtils(ProfileImageObjectUtils profileImageObjectUtils) voidsetProfileServiceUtils(ProfileServiceUtils profileServiceUtils) voidsetUserDao(UserDao userDao) updateProfile(String profileId, UpdateProfileRequest profileRequest) Updates the suppliedProfile.updateProfileImage(String profileId, UpdateProfileImageRequest updateProfileImageRequest) Update profile image related fieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.sdk.service.profile.ProfileService
redactPrivateInformation
-
Constructor Details
-
SuperUserProfileService
public SuperUserProfileService()
-
-
Method Details
-
getProfiles
public Pagination<Profile> getProfiles(int offset, int count, String applicationNameOrId, String userId, Long lowerBoundTimestamp, Long upperBoundTimestamp) Description copied from interface:ProfileServiceLists allProfileinstances starting with the offset and count.- Specified by:
getProfilesin interfaceProfileService- Parameters:
offset- the offsetcount- the countapplicationNameOrId- the application name or ID to use when fetching the profilesuserId- the userId which to use when filtering. If null, then no filtering will be applied.lowerBoundTimestamp-upperBoundTimestamp-- Returns:
- a
PaginationofProfileinstances
-
getProfiles
Description copied from interface:ProfileServiceLists allProfileinstances, specifying a search query.- Specified by:
getProfilesin interfaceProfileService- Parameters:
offset-count-search-- Returns:
-
getProfile
Description copied from interface:ProfileServiceFetches a specificProfileinstance based on ID. If not found, an exception is raised.- Specified by:
getProfilein interfaceProfileService- Parameters:
profileId- the profile ID- Returns:
- the
Profile, never null
-
getCurrentProfile
Description copied from interface:ProfileServiceReturns theProfileof the currently logged-in user. If the user has no profile, or that information is not available, then this will throw an exception. Using a profile is not required for all calls. Therefore, it should be expected that this will throwNotFoundExceptionunder normal circumstances.- Specified by:
getCurrentProfilein interfaceProfileService- Returns:
- the
Profile, or null, if no profile is found.
-
findCurrentProfile
Description copied from interface:ProfileServiceFinds the currently active profile, if any.- Specified by:
findCurrentProfilein interfaceProfileService- Returns:
- an
Optional<Profile>
-
updateProfile
Description copied from interface:ProfileService- Specified by:
updateProfilein interfaceProfileService- Parameters:
profileId- the profile id of theProfileto updateprofileRequest- theUpdateProfileRequestwith the information to update- Returns:
- the
Profileas it was changed by the service.
-
createProfile
Description copied from interface:ProfileServiceCreates a new profile. The ID of the profile, as specified byProfile.getId(), should be null and will be assigned.- Specified by:
createProfilein interfaceProfileService- Parameters:
createProfileRequest- theCreateProfileRequestwith the information to create- Returns:
- the
Profileas it was created by the service.
-
deleteProfile
Description copied from interface:ProfileServiceDeletes theProfilewith the supplied profile ID.- Specified by:
deleteProfilein interfaceProfileService- Parameters:
profileId- the profile ID.
-
updateProfileImage
public Profile updateProfileImage(String profileId, UpdateProfileImageRequest updateProfileImageRequest) throws IOException Description copied from interface:ProfileServiceUpdate profile image related fields- Specified by:
updateProfileImagein interfaceProfileService- Parameters:
updateProfileImageRequest- request with image object values- Throws:
IOException
-
getProfileDao
-
getUserDao
-
setUserDao
-
setProfileDao
-
getApplicationDao
-
getNameService
-
setNameService
@Inject public void setNameService(@Named("dev.getelements.elements.service.unscoped") NameService nameService) -
setApplicationDao
-
getCurrentProfileOptional
-
setCurrentProfileOptional
-
getCurrentProfileSupplier
-
setCurrentProfileSupplier
-
getProfileServiceUtils
-
setProfileServiceUtils
-
getProfileImageObjectUtils
-
setProfileImageObjectUtils
-
getLargeObjectDao
-
setLargeObjectDao
-
getElementRegistry
-
setElementRegistry
-