Class DefaultPersonalInformationManager
java.lang.Object
com.atlassian.confluence.impl.content.DefaultPersonalInformationManager
- All Implemented Interfaces:
PersonalInformationManager
@ParametersAreNonnullByDefault
public class DefaultPersonalInformationManager
extends Object
implements PersonalInformationManager
- Since:
- 7.15
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPersonalInformationManager(ContentEntityObjectDaoInternal contentEntityObjectDao, org.hibernate.SessionFactory sessionFactory, WikiToStorageConverter wikiToStorageConverter, com.atlassian.event.api.EventPublisher eventPublisher, PersonalInformationDao personalInformationDao, RelationManager relationManager, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext, RetentionFeatureChecker retentionFeatureChecker, NotificationManager notificationManager) -
Method Summary
Modifier and TypeMethodDescription@NonNull PersonalInformationcreatePersonalInformation(com.atlassian.user.User user) Creates a newPersonalInformationfor the specified user.@NonNull PersonalInformationgetOrCreatePersonalInformation(com.atlassian.user.User user) This operation needs to be atomic to avoid a race condition with duplicate PersonalInformation objects being created (CONF-10234)booleanhasPersonalInformation(@Nullable com.atlassian.sal.api.user.UserKey userKey) booleanhasPersonalInformation(@Nullable String username) voidremovePersonalInformation(@Nullable ConfluenceUser user) voidsavePersonalInformation(PersonalInformation newInfo, @Nullable PersonalInformation oldInfo) Saves personal information object.voidsavePersonalInformation(com.atlassian.user.User user, String newInfoString, String fullName) Saves personal information and full name against the user object.
-
Constructor Details
-
DefaultPersonalInformationManager
public DefaultPersonalInformationManager(ContentEntityObjectDaoInternal contentEntityObjectDao, org.hibernate.SessionFactory sessionFactory, WikiToStorageConverter wikiToStorageConverter, com.atlassian.event.api.EventPublisher eventPublisher, PersonalInformationDao personalInformationDao, RelationManager relationManager, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext, RetentionFeatureChecker retentionFeatureChecker, NotificationManager notificationManager) - Since:
- 7.16
-
-
Method Details
-
getOrCreatePersonalInformation
This operation needs to be atomic to avoid a race condition with duplicate PersonalInformation objects being created (CONF-10234)- Specified by:
getOrCreatePersonalInformationin interfacePersonalInformationManager- Parameters:
user- the user to retrieve personal information for- Returns:
- the personal information for that user
-
createPersonalInformation
Description copied from interface:PersonalInformationManagerCreates a newPersonalInformationfor the specified user. Returns the existing one if it already exists.- Specified by:
createPersonalInformationin interfacePersonalInformationManager
-
savePersonalInformation
public void savePersonalInformation(PersonalInformation newInfo, @Nullable PersonalInformation oldInfo) Description copied from interface:PersonalInformationManagerSaves personal information object.- Specified by:
savePersonalInformationin interfacePersonalInformationManager
-
savePersonalInformation
public void savePersonalInformation(com.atlassian.user.User user, String newInfoString, String fullName) Description copied from interface:PersonalInformationManagerSaves personal information and full name against the user object. Will only store the new information if either the information or full name has changed.- Specified by:
savePersonalInformationin interfacePersonalInformationManager
-
removePersonalInformation
- Specified by:
removePersonalInformationin interfacePersonalInformationManager
-
hasPersonalInformation
- Specified by:
hasPersonalInformationin interfacePersonalInformationManager- Returns:
- true if a there is a PersonalInformation object corresponding to this user, if this method returns false calls to getPersonalInformation and getOrCreatePersonalInformation will create a new PersonalInformation object for this user
-
hasPersonalInformation
public boolean hasPersonalInformation(@Nullable com.atlassian.sal.api.user.UserKey userKey) - Specified by:
hasPersonalInformationin interfacePersonalInformationManager- Returns:
- true if a there is a PersonalInformation object corresponding to this user, if this method returns false calls to getPersonalInformation and getOrCreatePersonalInformation will create a new PersonalInformation object for this user
-