Class PersonServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.people.PersonServiceImpl
-
- All Implemented Interfaces:
PersonService
public class PersonServiceImpl extends Object implements PersonService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPersonServiceImpl.PersonFinderImplclassPersonServiceImpl.PersonSearcherImpl-
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.people.PersonService
PersonService.PersonFinder, PersonService.PersonSearcher, PersonService.SinglePersonFetcher, PersonService.Validator
-
-
Constructor Summary
Constructors Constructor Description PersonServiceImpl(PermissionManager permissionManager, PersonFactory personFactory, UserAccessorInternal userAccessor, com.atlassian.user.GroupManager groupManager, FinderProxyFactory finderProxyFactory, LongRunningTaskManager longRunningTaskManager, LongTaskFactory longTaskFactory, I18NBeanFactory i18NBeanFactory, SettingsManager settingsManager, com.atlassian.event.api.EventPublisher eventPublisher, SpacePermissionManager spacePermissionManager, ConfluenceUserResolver confluenceUserResolver, LoginManager loginManager, PaginationServiceInternal paginationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMembership(String username, String groupName)Add the givenUseridentified by username to the givenGroupidentified by groupName.voidchangeMyPassword(PasswordChangeDetails passwordChangeDetails)Change the password of the current user.voidchangeUserPassword(String userName, String newPass)Change the password of the given user.UserKeycreate(UserDetailsForCreation userDetailsForCreation)Create a new active userLongTaskSubmissiondelete(Person personToDelete)Delete the given person.voiddisable(String username)Disable the givenUseridentified by username.voidenable(String username)Enable the givenUseridentified by username.PersonService.PersonFinderfind(Expansion... expansions)Create a person finder to locate persons Restrictions can be applied to the finder using the appropriate withFoo() methodPersongetCurrentUser(Expansion... expansions)Get the currently logged in uservoidremoveMembership(String username, String groupName)Remove the givenUseridentified by username from the givenGroupidentified by groupName.PersonService.PersonSearchersearch()Create a person searcher to find people matching search criteria For given search category and/or criteria, return all People matching the supplied criteria.PersonService.Validatorvalidator()Get the validator of the Person Service.
-
-
-
Constructor Detail
-
PersonServiceImpl
public PersonServiceImpl(PermissionManager permissionManager, PersonFactory personFactory, UserAccessorInternal userAccessor, com.atlassian.user.GroupManager groupManager, FinderProxyFactory finderProxyFactory, LongRunningTaskManager longRunningTaskManager, LongTaskFactory longTaskFactory, I18NBeanFactory i18NBeanFactory, SettingsManager settingsManager, com.atlassian.event.api.EventPublisher eventPublisher, SpacePermissionManager spacePermissionManager, ConfluenceUserResolver confluenceUserResolver, LoginManager loginManager, PaginationServiceInternal paginationService)
-
-
Method Detail
-
create
public UserKey create(UserDetailsForCreation userDetailsForCreation)
Description copied from interface:PersonServiceCreate a new active user- Specified by:
createin interfacePersonService- Parameters:
userDetailsForCreation- User Details- Returns:
- UserKey User Key
-
getCurrentUser
public Person getCurrentUser(Expansion... expansions)
Description copied from interface:PersonServiceGet the currently logged in user- Specified by:
getCurrentUserin interfacePersonService
-
find
public PersonService.PersonFinder find(Expansion... expansions)
Description copied from interface:PersonServiceCreate 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:
findin interfacePersonService- Returns:
- a new PersonFinder
-
disable
public void disable(String username)
Description copied from interface:PersonServiceDisable the givenUseridentified by username. This method is idempotent i.e. if the user is already disabled then no action will be taken.- Specified by:
disablein interfacePersonService- Parameters:
username- The username identifying the given user.
-
enable
public void enable(String username)
Description copied from interface:PersonServiceEnable the givenUseridentified by username. This method is idempotent i.e. if the user is already enabled then no action will be taken.- Specified by:
enablein interfacePersonService- Parameters:
username- The username identifying the given user.
-
delete
public LongTaskSubmission delete(Person personToDelete)
Description copied from interface:PersonServiceDelete the given person.The deletion happens asynchronously so a LongTaskSubmission is returned, that can be used to track progress.
- Specified by:
deletein interfacePersonService- Parameters:
personToDelete- the person to delete- Returns:
- a LongTaskSubmission describing the user deletion operation
-
search
public PersonService.PersonSearcher search()
Description copied from interface:PersonServiceCreate 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:
searchin interfacePersonService- Returns:
- a new PersonSearcher
-
addMembership
public void addMembership(String username, String groupName)
Description copied from interface:PersonServiceAdd the givenUseridentified by username to the givenGroupidentified by groupName. This method is idempotent i.e. if the membership already exists then no action will be taken.- Specified by:
addMembershipin interfacePersonService- Parameters:
username- The username identifying the given user.groupName- The group name identifying the given group.
-
removeMembership
public void removeMembership(String username, String groupName)
Description copied from interface:PersonServiceRemove the givenUseridentified by username from the givenGroupidentified by groupName. This method is idempotent i.e. if the membership is not present then no action will be taken.- Specified by:
removeMembershipin interfacePersonService- Parameters:
username- The username identifying the given user.groupName- The group name identifying the given group.
-
changeUserPassword
public void changeUserPassword(String userName, String newPass)
Description copied from interface:PersonServiceChange the password of the given user.- Specified by:
changeUserPasswordin interfacePersonService- Parameters:
userName- The userName identifying the given user.newPass- New Password
-
changeMyPassword
public void changeMyPassword(PasswordChangeDetails passwordChangeDetails)
Description copied from interface:PersonServiceChange the password of the current user.- Specified by:
changeMyPasswordin interfacePersonService- Parameters:
passwordChangeDetails- password change details
-
validator
public PersonService.Validator validator()
Description copied from interface:PersonServiceGet the validator of the Person Service.- Specified by:
validatorin interfacePersonService
-
-