Class AbstractContentEntityObjectHibernateDao<T extends ContentEntityObject>
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<T>
-
- com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<T>
-
- com.atlassian.confluence.internal.persistence.hibernate.AbstractContentEntityObjectHibernateDao<T>
-
- Type Parameters:
T
- the entity type
- All Implemented Interfaces:
ObjectDao
,ContentEntityObjectDao<T>
,VersionedObjectDao<T>
,ContentEntityObjectDaoInternal<T>
,ObjectDaoInternal<T>
,VersionedObjectDaoInternal<T>
,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
ContentEntityObjectHibernateDao
,DefaultContentDao
,HibernatePageDao
,PluginContentHibernateDao
public abstract class AbstractContentEntityObjectHibernateDao<T extends ContentEntityObject> extends VersionedHibernateObjectDao<T> implements ContentEntityObjectDaoInternal<T>
- Since:
- 6.10.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
cacheFactory, confluenceUserDao
-
-
Constructor Summary
Constructors Constructor Description AbstractContentEntityObjectHibernateDao()
AbstractContentEntityObjectHibernateDao(RetentionFeatureChecker retentionFeatureChecker)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
countContentBySpaceIdAndStatus(long spaceId, String status)
Retrieve the count of content for a given space with a particular status.List<ContentEntityObject>
findAllDraftsFor(long contentId)
Retrieves a list of drafts for the given content if any drafts exist.List<Draft>
findAllLegacyDraftsFor(long contentId)
Retrieves a list of Legacy drafts for the given content if any exist.List<SpaceContentEntityObject>
findContentBySpaceIdAndStatus(long spaceId, String status, int offset, int count)
Retrieve content for a given space with a particular status.PageResponse<SpaceContentEntityObject>
findContentBySpaceIdAndStatus(long spaceId, String status, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super SpaceContentEntityObject> predicate)
Deprecated.since 7.0.1.ContentEntityObject
findDraftFor(long contentId)
Retrieves the draft for the given content if exists.List<ContentEntityObject>
findDraftsWithUnpublishedChangesForUser(String creatorName)
Retrieves the drafts for the givenUser
, which contains unpublished changesList<ContentEntityObject>
findHistoricalVersionsAfterVersion(long originalContentId, int version)
List<ContentEntityObject>
findPreviousVersions(long originalContentId)
List<ContentEntityObject>
findUnpublishedContentWithUserContributions(String username)
Retrieves the drafts for the givenUser
.Iterator<SpaceContentEntityObject>
getAllCurrentEntities()
Map<Long,Set<ConfluenceUser>>
getAllModifiers(Collection<Long> contentIds)
Get the Set of allConfluenceUser
that have modified (contributed) content.protected T
getByClassId(long id)
Retrieve the object with a particular id from the database.T
getById(long id)
Retrieve the object with a particular id from the database.List<ContentEntityObject>
getContentAuthoredByUser(String username)
Map<Long,ContributionStatus>
getContributionStatusByUser(Collection<ContentId> contentIds, com.atlassian.sal.api.user.UserKey userKey)
Identifies the most recent contributions made to a Collection of content by the given user.ContentEntityObject
getFirstVersionAfter(long originalVersionContentId, int version)
ContentEntityObject
getFirstVersionBefore(long originalVersionContentId, int version)
List<T>
getLastEditedVersionsOf(T content)
Retrieves all the last edited versions for each user who has contributed to the specified piece of content.String
getObjectType(long id)
Date
getOldestPageCreationDate()
Gets the creation date of the oldest page.PageResponse<AbstractPage>
getPageAndBlogPostsVersionsLastEditedByUser(com.atlassian.sal.api.user.UserKey userKey, LimitedRequest limitedRequest)
Retrieve a page of entities, either the current version or historical version, that have been modified by the user, in order of the user's most recent modification.PageResponse<AbstractPage>
getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts(com.atlassian.sal.api.user.UserKey userKey, LimitedRequest limitedRequest)
Retrieve a page of entities, either the current version or historical version, that have been modified by the user, in order of the user's most recent modification.protected <T extends ConfluenceEntityObject>
PageResponse<T>getPagesByCursor(Function<LimitedRequest,List<T>> searchPages, LimitedRequest originalRequest, Predicate<? super T> filter)
Iterator<ContentEntityObject>
getRecentlyAddedEntities(String spaceKey, int maxResults)
Iterator<ContentEntityObject>
getRecentlyModifiedEntities(int maxResults)
Iterator<SpaceContentEntityObject>
getRecentlyModifiedEntities(String spaceKey, int maxResults)
Iterator<ContentEntityObject>
getRecentlyModifiedEntitiesForUser(String username)
List<ContentEntityObject>
getRecentlyModifiedForChangeDigest(Date fromDate)
Retrieves a list ofContentEntityObject
s that have been newly added or modified since the date specified.List<ContentEntityObject>
getTrashedContent(String spaceKey)
List<ContentEntityObject>
getTrashedContents(String spaceKey, int offset, int limit)
PageResponse<ContentEntityObject>
getTrashedContents(String spaceKey, LimitedRequest pageRequest, Predicate<? super ContentEntityObject> filter)
List<SpaceContentEntityObject>
getTrashedEntities(long contentIdOffset, int limit)
Retrieve a batch of trashed content entitiesContentEntityObject
getVersion(long originalVersionContentId, int version)
Map<Long,List<ConfluenceUser>>
getVersionEditContributors(Iterable<T> originalVersions)
Get version edit contributors for a set of content identifiers.List<VersionHistorySummary>
getVersionHistorySummary(long originalContentId)
PageResponse<VersionHistorySummary>
getVersionHistorySummary(long originalContentId, LimitedRequest request)
Get version history with pagination.Map<Long,ContentEntityObject>
getVersionsLastEditedByUser(Collection<Long> contentIds, com.atlassian.sal.api.user.UserKey userKey)
Gets theContentEntityObject
objects, either the current version or historical version relating to given contentIds of the current version that was the most recent version edited by the given user.Map<Long,ContentEntityObject>
getVersionsLastEditedByUserNew(Collection<Long> contentIds, com.atlassian.sal.api.user.UserKey userKey)
Deprecated.since 6.4.0-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, saveEntity, setCacheFactory, setConfluenceUserDao, updateEntityModificationData, updateModificationData
-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findByClassIdsFiltered, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, getHibernateTemplate, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity, setEventPublisher, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResult
-
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.core.persistence.ContentEntityObjectDao
getAllModifiers
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ContentEntityObjectDaoInternal
findContentBySpaceIdAndStatusAndFilter, saveRawWithoutReindex
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, getPersistentClass, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity
-
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.VersionedObjectDaoInternal
saveEntity
-
-
-
-
Constructor Detail
-
AbstractContentEntityObjectHibernateDao
public AbstractContentEntityObjectHibernateDao(RetentionFeatureChecker retentionFeatureChecker)
-
AbstractContentEntityObjectHibernateDao
public AbstractContentEntityObjectHibernateDao()
-
-
Method Detail
-
getById
public T getById(long id)
Description copied from interface:ContentEntityObjectDao
Retrieve the object with a particular id from the database. The object must be of the same class as the DAO's getPersistentClass() method returns.- Specified by:
getById
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
id
- the id of the object to look up- Returns:
- the corresponding object, or null if the object does not exist with the appropriate class and id.
-
getByClassId
protected T getByClassId(long id)
Description copied from class:HibernateObjectDao
Retrieve the object with a particular id from the database. The object must be of the same class as the DAO's getPersistentClass() method returns.- Overrides:
getByClassId
in classHibernateObjectDao<T extends ContentEntityObject>
- Parameters:
id
- the id of the object to look up- Returns:
- the corresponding object, or null if the object does not exist with the appropriate class and id.
-
getContentAuthoredByUser
public List<ContentEntityObject> getContentAuthoredByUser(String username)
- Specified by:
getContentAuthoredByUser
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getAllCurrentEntities
public Iterator<SpaceContentEntityObject> getAllCurrentEntities()
- Specified by:
getAllCurrentEntities
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getRecentlyAddedEntities
public Iterator<ContentEntityObject> getRecentlyAddedEntities(String spaceKey, int maxResults)
- Specified by:
getRecentlyAddedEntities
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getRecentlyModifiedEntities
public Iterator<ContentEntityObject> getRecentlyModifiedEntities(int maxResults)
- Specified by:
getRecentlyModifiedEntities
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getRecentlyModifiedEntities
public Iterator<SpaceContentEntityObject> getRecentlyModifiedEntities(String spaceKey, int maxResults)
- Specified by:
getRecentlyModifiedEntities
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getRecentlyModifiedEntitiesForUser
public Iterator<ContentEntityObject> getRecentlyModifiedEntitiesForUser(String username)
- Specified by:
getRecentlyModifiedEntitiesForUser
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getFirstVersionBefore
public ContentEntityObject getFirstVersionBefore(long originalVersionContentId, int version)
- Specified by:
getFirstVersionBefore
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getFirstVersionAfter
public ContentEntityObject getFirstVersionAfter(long originalVersionContentId, int version)
- Specified by:
getFirstVersionAfter
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getVersion
public ContentEntityObject getVersion(long originalVersionContentId, int version)
- Specified by:
getVersion
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getRecentlyModifiedForChangeDigest
public List<ContentEntityObject> getRecentlyModifiedForChangeDigest(Date fromDate)
Description copied from interface:ContentEntityObjectDao
Retrieves a list ofContentEntityObject
s that have been newly added or modified since the date specified. This list excludes drafts, space descriptions and mail.- Specified by:
getRecentlyModifiedForChangeDigest
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
fromDate
- content modified after this date will be returned- Returns:
- a list of
ContentEntityObject
s that have been newly added or modified since the date specified
-
getLastEditedVersionsOf
public List<T> getLastEditedVersionsOf(T content)
Description copied from interface:ContentEntityObjectDao
Retrieves all the last edited versions for each user who has contributed to the specified piece of content. That is, if a user has contributed multiple edits, only the version that corresponds to their latest edit will be added to the list returned. Result will be sorted with the earliest version coming first.- Specified by:
getLastEditedVersionsOf
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
content
- latest version- Returns:
- the last edited versions for each user who has contributed to the specified piece of content.
-
getTrashedContent
public List<ContentEntityObject> getTrashedContent(String spaceKey)
- Specified by:
getTrashedContent
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getTrashedContents
public List<ContentEntityObject> getTrashedContents(String spaceKey, int offset, int limit)
- Specified by:
getTrashedContents
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getTrashedContents
public PageResponse<ContentEntityObject> getTrashedContents(String spaceKey, LimitedRequest pageRequest, Predicate<? super ContentEntityObject> filter)
- Specified by:
getTrashedContents
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getPagesByCursor
protected <T extends ConfluenceEntityObject> PageResponse<T> getPagesByCursor(Function<LimitedRequest,List<T>> searchPages, LimitedRequest originalRequest, Predicate<? super T> filter)
-
getTrashedEntities
public List<SpaceContentEntityObject> getTrashedEntities(long contentIdOffset, int limit)
Description copied from interface:ContentEntityObjectDaoInternal
Retrieve a batch of trashed content entities- Specified by:
getTrashedEntities
in interfaceContentEntityObjectDaoInternal<T extends ContentEntityObject>
- Parameters:
contentIdOffset
- ids of returned entities must be greater than or equal to this valuelimit
- maximum number of entities to return
-
findContentBySpaceIdAndStatus
public List<SpaceContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, String status, int offset, int count)
Description copied from interface:ContentEntityObjectDao
Retrieve content for a given space with a particular status. Results will be sorted by descending date of last modification.- Specified by:
findContentBySpaceIdAndStatus
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
spaceId
- the id of the spacestatus
- the status of the content being retrieved (e.g.ContentEntityObject.DELETED
offset
- the offset of the first item to retrieve (0-based)count
- the maximum number of items to retrieve- Returns:
- the list of content matching the query
-
findContentBySpaceIdAndStatus
@Deprecated public PageResponse<SpaceContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, String status, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super SpaceContentEntityObject> predicate)
Deprecated.Description copied from interface:ContentEntityObjectDao
Retrieve content for a given space with a particular status. Results will be sorted by descending date of last modification.- Specified by:
findContentBySpaceIdAndStatus
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
spaceId
- the id of the spacestatus
- the status of the content being retrieved (e.g.ContentEntityObject.DELETED
limitedRequest
- - the start and offset of the pages to retrievepredicate
- - a predicate to filter the returned results by- Returns:
- a PageResponse of ContentEntityObjects in the space with the given status
-
countContentBySpaceIdAndStatus
public int countContentBySpaceIdAndStatus(long spaceId, String status)
Description copied from interface:ContentEntityObjectDao
Retrieve the count of content for a given space with a particular status.- Specified by:
countContentBySpaceIdAndStatus
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
spaceId
- the id of the spacestatus
- the status of the content being retrieved (e.g.ContentEntityObject.DELETED
- Returns:
- the number of content objects with that status in that space
-
getObjectType
public String getObjectType(long id)
- Specified by:
getObjectType
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getVersionsLastEditedByUser
public Map<Long,ContentEntityObject> getVersionsLastEditedByUser(Collection<Long> contentIds, com.atlassian.sal.api.user.UserKey userKey)
Description copied from interface:ContentEntityObjectDao
Gets theContentEntityObject
objects, either the current version or historical version relating to given contentIds of the current version that was the most recent version edited by the given user. Only content with a "current" status are returned.- Specified by:
getVersionsLastEditedByUser
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
contentIds
- the ids of the content we're interested in. These *must* be ids of the latest version.userKey
- the userKey of the user that we're interested in- Returns:
- the
ContentEntityObject
objects relating to the version of the given contentIds that were last edited by the given user.
-
getVersionsLastEditedByUserNew
@Deprecated public Map<Long,ContentEntityObject> getVersionsLastEditedByUserNew(Collection<Long> contentIds, com.atlassian.sal.api.user.UserKey userKey)
Deprecated.since 6.4.0Description copied from interface:ContentEntityObjectDao
Same asContentEntityObjectDao.getVersionsLastEditedByUser(Collection, UserKey)
, but a refined implementation for new Recently Worked On Drafts work. TODO: replaceContentEntityObjectDao.getVersionsLastEditedByUser(Collection, UserKey)
with the implementation of this method- Specified by:
getVersionsLastEditedByUserNew
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getPageAndBlogPostsVersionsLastEditedByUser
public PageResponse<AbstractPage> getPageAndBlogPostsVersionsLastEditedByUser(com.atlassian.sal.api.user.UserKey userKey, LimitedRequest limitedRequest)
Description copied from interface:ContentEntityObjectDao
Retrieve a page of entities, either the current version or historical version, that have been modified by the user, in order of the user's most recent modification. Only content with a "current" status are returned.- Specified by:
getPageAndBlogPostsVersionsLastEditedByUser
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
userKey
- the key for the user for whom to retrieve the modified contentlimitedRequest
- the request
-
getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts
public PageResponse<AbstractPage> getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts(com.atlassian.sal.api.user.UserKey userKey, LimitedRequest limitedRequest)
Description copied from interface:ContentEntityObjectDao
Retrieve a page of entities, either the current version or historical version, that have been modified by the user, in order of the user's most recent modification. Only content with "current" or "draft" status are returned.- Specified by:
getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
userKey
- the key for the user for whom to retrieve the modified contentlimitedRequest
- the request
-
getContributionStatusByUser
public Map<Long,ContributionStatus> getContributionStatusByUser(Collection<ContentId> contentIds, com.atlassian.sal.api.user.UserKey userKey)
Description copied from interface:ContentEntityObjectDao
Identifies the most recent contributions made to a Collection of content by the given user. A contribution can either be a page publish, unpublished changes to a draft or anything that triggers a touch relation.It takes a Collection of contentIds and returns a Map of contentIds to ContributionStatuses for the supplied Ids.
If non existing ContentIds are used, they will not be present in the returned Map. If no contribution status can be found for the supplied contentIds, they will not be present in the returned Map.
Anonymous users are not supported.
- Specified by:
getContributionStatusByUser
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
contentIds
- the IDs of the content we want to query. These *must* be IDs of the latest versionuserKey
- the userKey of the user who's changes we are interested in- Returns:
- the
ContributionStatus
of each content
-
getVersionHistorySummary
public List<VersionHistorySummary> getVersionHistorySummary(long originalContentId)
- Specified by:
getVersionHistorySummary
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getAllModifiers
public Map<Long,Set<ConfluenceUser>> getAllModifiers(Collection<Long> contentIds)
Description copied from interface:ContentEntityObjectDao
Get the Set of allConfluenceUser
that have modified (contributed) content. This includes users for existing and deleted historical versions.- Specified by:
getAllModifiers
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
contentIds
- the content IDs of interest- Returns:
- a
Map
of content IDs to aSet
ofConfluenceUser
that have contributed to the content
-
getVersionHistorySummary
public PageResponse<VersionHistorySummary> getVersionHistorySummary(long originalContentId, LimitedRequest request)
Description copied from interface:ContentEntityObjectDao
Get version history with pagination. So we don't have issue with super long history.- Specified by:
getVersionHistorySummary
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
originalContentId
- the content Id of latest version, the CURRENT versionrequest
- page request contains start, limit fields for pagination purpose.- Returns:
- PageResponse of version history.
-
getVersionEditContributors
public Map<Long,List<ConfluenceUser>> getVersionEditContributors(Iterable<T> originalVersions)
Description copied from interface:ContentEntityObjectDao
Get version edit contributors for a set of content identifiers. This returns the last modified of all versions of the content.- Specified by:
getVersionEditContributors
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
originalVersions
- the contents of latest versions, the CURRENT versions- Returns:
- A map between content if and list of contributor users (null indicates anonymous).
-
findPreviousVersions
public List<ContentEntityObject> findPreviousVersions(long originalContentId)
- Specified by:
findPreviousVersions
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
findHistoricalVersionsAfterVersion
public List<ContentEntityObject> findHistoricalVersionsAfterVersion(long originalContentId, int version)
- Specified by:
findHistoricalVersionsAfterVersion
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
-
getOldestPageCreationDate
public Date getOldestPageCreationDate()
Description copied from interface:ContentEntityObjectDao
Gets the creation date of the oldest page.- Specified by:
getOldestPageCreationDate
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Returns:
- creation date of the oldest page in Confluence
-
findAllDraftsFor
public List<ContentEntityObject> findAllDraftsFor(long contentId)
Description copied from interface:ContentEntityObjectDao
Retrieves a list of drafts for the given content if any drafts exist.- Specified by:
findAllDraftsFor
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
contentId
- id of the content to retrieve the draft for- Returns:
- a non-null list of drafts, with 0 or more elements.
- See Also:
ContentEntityObject.DRAFT
-
findAllLegacyDraftsFor
public List<Draft> findAllLegacyDraftsFor(long contentId)
Description copied from interface:ContentEntityObjectDao
Retrieves a list of Legacy drafts for the given content if any exist.- Specified by:
findAllLegacyDraftsFor
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
contentId
- id of the content to retrieve the draft for- Returns:
- a non-null list of drafts, with 0 or more elements.
- See Also:
Draft
-
findDraftFor
public ContentEntityObject findDraftFor(long contentId)
Description copied from interface:ContentEntityObjectDao
Retrieves the draft for the given content if exists.- Specified by:
findDraftFor
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
contentId
- id of the content to retrieve the draft for- Returns:
- the draft for the given content if exists, null otherwise
- See Also:
ContentEntityObject.DRAFT
-
findUnpublishedContentWithUserContributions
public List<ContentEntityObject> findUnpublishedContentWithUserContributions(String username)
Description copied from interface:ContentEntityObjectDao
Retrieves the drafts for the givenUser
. IMPORTANT: this method doesn't return published shared drafts, only personal drafts and unpublished shared drafts- Specified by:
findUnpublishedContentWithUserContributions
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
username
- the owner of the drafts- Returns:
- a list of
ContentEntityObject
with theContentEntityObject.DRAFT
status
-
findDraftsWithUnpublishedChangesForUser
public List<ContentEntityObject> findDraftsWithUnpublishedChangesForUser(String creatorName)
Description copied from interface:ContentEntityObjectDao
Retrieves the drafts for the givenUser
, which contains unpublished changes- Specified by:
findDraftsWithUnpublishedChangesForUser
in interfaceContentEntityObjectDao<T extends ContentEntityObject>
- Parameters:
creatorName
- the owner of the drafts- Returns:
- a list of drafts (
ContentEntityObject
objects)
-
-