Class DefaultPersonalInformationManager
java.lang.Object
com.atlassian.confluence.impl.content.DefaultContentEntityManager
com.atlassian.confluence.impl.content.DefaultPersonalInformationManager
- All Implemented Interfaces:
ContentEntityManager
,ContentDraftManagerInternal
,ContentEntityManagerInternal
,PersonalInformationManager
@ParametersAreNonnullByDefault
public class DefaultPersonalInformationManager
extends DefaultContentEntityManager
implements PersonalInformationManager
- Since:
- 7.15
-
Field Summary
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager
ITERATE_ALL
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPersonalInformationManager
(ContentEntityObjectDao<ContentEntityObject> contentEntityObjectDao, org.hibernate.SessionFactory sessionFactory, WikiToStorageConverter wikiToStorageConverter, com.atlassian.event.api.EventPublisher eventPublisher, PersonalInformationDao personalInformationDao, RelationManager relationManager, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext, RetentionFeatureChecker retentionFeatureChecker) -
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.Methods inherited from class com.atlassian.confluence.impl.content.DefaultContentEntityManager
convertFromWikiToStorageFormatIfRequired, createDraft, filteredResponseWithCursor, findAllDraftsFor, findAllDraftsWithUnpublishedChangesForUser, findDraftFor, findDraftFor, findUnpublishedContentWithUserContributions, getById, getById, getById, getByIdsAndFilters, getContributionStatusByUser, getNextVersion, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionHistorySummaries, getVersionsLastEditedByUser, publishCreateEvent, publishRemoveEvent, publishUpdateEvent, refreshContentEntity, removeContentEntities, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersion
-
Constructor Details
-
DefaultPersonalInformationManager
public DefaultPersonalInformationManager(ContentEntityObjectDao<ContentEntityObject> contentEntityObjectDao, org.hibernate.SessionFactory sessionFactory, WikiToStorageConverter wikiToStorageConverter, com.atlassian.event.api.EventPublisher eventPublisher, PersonalInformationDao personalInformationDao, RelationManager relationManager, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext, RetentionFeatureChecker retentionFeatureChecker) - 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
- Parameters:
newInfo
-oldInfo
-
-
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
-