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
Constructors Constructor Description 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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.-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.internal.ContentEntityManagerInternal
getByIds
-
-
-
-
Constructor Detail
-
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 Detail
-
getOrCreatePersonalInformation
public @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)- Specified by:
getOrCreatePersonalInformationin interfacePersonalInformationManager- Parameters:
user- the user to retrieve personal information for- Returns:
- the personal information for that user
-
createPersonalInformation
public @NonNull PersonalInformation createPersonalInformation(com.atlassian.user.User user)
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
public void removePersonalInformation(@Nullable ConfluenceUser user)
- Specified by:
removePersonalInformationin interfacePersonalInformationManager
-
hasPersonalInformation
public boolean hasPersonalInformation(@Nullable String username)
- 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
-
-