Class PersonServiceImpl
java.lang.Object
com.atlassian.confluence.api.impl.service.people.PersonServiceImpl
- All Implemented Interfaces:
PersonService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.people.PersonService
PersonService.PersonFinder, PersonService.PersonSearcher, PersonService.SinglePersonFetcher, PersonService.Validator
-
Constructor Summary
ConstructorsConstructorDescriptionPersonServiceImpl
(PermissionManager permissionManager, PersonFactory personFactory, UserAccessorInternal userAccessorInternal, com.atlassian.user.GroupManager groupManager, FinderProxyFactory finderProxyFactory, LongRunningTaskManager longRunningTaskManager, LongTaskFactory longTaskFactory, I18NBeanFactory i18NBeanFactory, SettingsService settingsService, com.atlassian.event.api.EventPublisher eventPublisher, SpacePermissionManager spacePermissionManager, ConfluenceUserResolver confluenceUserResolver, LoginManager loginManager, PaginationService paginationService, SearchIndexAccessor contentSearchIndexAccessor, ScopesRequestCacheDelegate scopesRequestCacheDelegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMembership
(String username, String groupName) Add the givenUser
identified by username to the givenGroup
identified by groupName.void
changeMyPassword
(PasswordChangeDetails passwordChangeDetails) Change the password of the current user.void
changeUserPassword
(String userName, String newPass) Change the password of the given user.create
(UserDetailsForCreation userDetailsForCreation) Create a new active userDelete the given person.void
Disable the givenUser
identified by username.void
Enable the givenUser
identified by username.fetchActiveUsers
(PageRequest request) Fetch a page of active users (users which count towards the license limit).Create a person finder to locate persons Restrictions can be applied to the finder using the appropriate withFoo() methodgetCurrentUser
(Expansion... expansions) Get the currently logged in uservoid
removeMembership
(String username, String groupName) Remove the givenUser
identified by username from the givenGroup
identified by groupName.search()
Create a person searcher to find people matching search criteria For given search category and/or criteria, return all People matching the supplied criteria.void
update
(UserDetailsForUpdate userDetailsForUpdate) Update the current user with the supplied details (full name or email).void
update
(String username, UserDetailsForUpdate userDetailsForUpdate) Update the given user with the supplied details (full name or email).Get the validator of the Person Service.
-
Constructor Details
-
PersonServiceImpl
public PersonServiceImpl(PermissionManager permissionManager, PersonFactory personFactory, UserAccessorInternal userAccessorInternal, com.atlassian.user.GroupManager groupManager, FinderProxyFactory finderProxyFactory, LongRunningTaskManager longRunningTaskManager, LongTaskFactory longTaskFactory, I18NBeanFactory i18NBeanFactory, SettingsService settingsService, com.atlassian.event.api.EventPublisher eventPublisher, SpacePermissionManager spacePermissionManager, ConfluenceUserResolver confluenceUserResolver, LoginManager loginManager, PaginationService paginationService, @Named("contentSearchIndexAccessor") SearchIndexAccessor contentSearchIndexAccessor, ScopesRequestCacheDelegate scopesRequestCacheDelegate)
-
-
Method Details
-
create
Description copied from interface:PersonService
Create a new active user- Specified by:
create
in interfacePersonService
- Parameters:
userDetailsForCreation
- User Details- Returns:
- UserKey User Key
-
getCurrentUser
Description copied from interface:PersonService
Get the currently logged in user- Specified by:
getCurrentUser
in interfacePersonService
-
find
Description copied from interface:PersonService
Create a person finder to locate persons Restrictions can be applied to the finder using the appropriate withFoo() methodFor example:
personService.find() .withKey("DEV") .fetchOne()
- Specified by:
find
in interfacePersonService
- Returns:
- a new PersonFinder
-
fetchActiveUsers
Description copied from interface:PersonService
Fetch a page of active users (users which count towards the license limit). The page is ordered by last login date, ascending with people who never logged in first. The results will exclude users that are: - anonymous, - deactivated, - externally deleted, - shadowed - unlicensed This feature relies on search index and might not be accurate when site reindex is in progress.- Specified by:
fetchActiveUsers
in interfacePersonService
- Parameters:
request
- The page request- Returns:
- a page of active users
-
disable
Description copied from interface:PersonService
Disable the givenUser
identified by username. This method is idempotent i.e. if the user is already disabled then no action will be taken.- Specified by:
disable
in interfacePersonService
- Parameters:
username
- The username identifying the given user.
-
enable
Description copied from interface:PersonService
Enable the givenUser
identified by username. This method is idempotent i.e. if the user is already enabled then no action will be taken.- Specified by:
enable
in interfacePersonService
- Parameters:
username
- The username identifying the given user.
-
update
Description copied from interface:PersonService
Update the current user with the supplied details (full name or email).- Specified by:
update
in interfacePersonService
- Parameters:
userDetailsForUpdate
- User Details
-
update
Description copied from interface:PersonService
Update the given user with the supplied details (full name or email).- Specified by:
update
in interfacePersonService
- Parameters:
username
- The username identifying the given user.userDetailsForUpdate
- User Details
-
delete
Description copied from interface:PersonService
Delete the given person.The deletion happens asynchronously so a LongTaskSubmission is returned, that can be used to track progress.
- Specified by:
delete
in interfacePersonService
- Parameters:
personToDelete
- the person to delete- Returns:
- a LongTaskSubmission describing the user deletion operation
-
search
Description copied from interface:PersonService
Create a person searcher to find people matching search criteria For given search category and/or criteria, return all People matching the supplied criteria.For example:
personService.search() .forUnsyncedUsers("joe") .fetchMany(..)
- Specified by:
search
in interfacePersonService
- Returns:
- a new PersonSearcher
-
addMembership
Description copied from interface:PersonService
Add the givenUser
identified by username to the givenGroup
identified by groupName. This method is idempotent i.e. if the membership already exists then no action will be taken.- Specified by:
addMembership
in interfacePersonService
- Parameters:
username
- The username identifying the given user.groupName
- The group name identifying the given group.
-
removeMembership
Description copied from interface:PersonService
Remove the givenUser
identified by username from the givenGroup
identified by groupName. This method is idempotent i.e. if the membership is not present then no action will be taken.- Specified by:
removeMembership
in interfacePersonService
- Parameters:
username
- The username identifying the given user.groupName
- The group name identifying the given group.
-
changeUserPassword
Description copied from interface:PersonService
Change the password of the given user.- Specified by:
changeUserPassword
in interfacePersonService
- Parameters:
userName
- The userName identifying the given user.newPass
- New Password
-
changeMyPassword
Description copied from interface:PersonService
Change the password of the current user.- Specified by:
changeMyPassword
in interfacePersonService
- Parameters:
passwordChangeDetails
- password change details
-
validator
Description copied from interface:PersonService
Get the validator of the Person Service.- Specified by:
validator
in interfacePersonService
-