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 PersonalInformation
createPersonalInformation
(com.atlassian.user.User user) Creates a newPersonalInformation
for the specified user.@NonNull PersonalInformation
getOrCreatePersonalInformation
(com.atlassian.user.User user) This operation needs to be atomic to avoid a race condition with duplicate PersonalInformation objects being created (CONF-10234)boolean
hasPersonalInformation
(@Nullable com.atlassian.sal.api.user.UserKey userKey) boolean
hasPersonalInformation
(@Nullable String username) void
removePersonalInformation
(@Nullable ConfluenceUser user) void
savePersonalInformation
(PersonalInformation newInfo, @Nullable PersonalInformation oldInfo) Saves personal information object.void
savePersonalInformation
(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:
getOrCreatePersonalInformation
in interfacePersonalInformationManager
- Parameters:
user
- the user to retrieve personal information for- Returns:
- the personal information for that user
-
createPersonalInformation
Description copied from interface:PersonalInformationManager
Creates a newPersonalInformation
for the specified user. Returns the existing one if it already exists.- Specified by:
createPersonalInformation
in interfacePersonalInformationManager
-
savePersonalInformation
public void savePersonalInformation(PersonalInformation newInfo, @Nullable PersonalInformation oldInfo) Description copied from interface:PersonalInformationManager
Saves personal information object.- Specified by:
savePersonalInformation
in interfacePersonalInformationManager
-
savePersonalInformation
public void savePersonalInformation(com.atlassian.user.User user, String newInfoString, String fullName) Description copied from interface:PersonalInformationManager
Saves 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:
savePersonalInformation
in interfacePersonalInformationManager
-
removePersonalInformation
- Specified by:
removePersonalInformation
in interfacePersonalInformationManager
-
hasPersonalInformation
- Specified by:
hasPersonalInformation
in 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:
hasPersonalInformation
in 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
-