public interface ContentEntityObjectDao extends VersionedObjectDao
NON_CACHEABLE
Modifier and Type | Method and Description |
---|---|
int |
countContentBySpaceIdAndStatus(long spaceId,
String status)
Retrieve the count of content for a given space with a particular status.
|
List<ContentEntityObject> |
findContentBySpaceIdAndStatus(long spaceId,
String status,
int offset,
int count)
Retrieve content for a given space with a particular status.
|
PageResponse<ContentEntityObject> |
findContentBySpaceIdAndStatus(long spaceId,
String status,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<Page> predicate)
Retrieve content for a given space with a particular status.
|
ContentEntityObject |
findDraftFor(long contentId)
Retrieves the draft for the given content if exists.
|
List |
findHistoricalVersionsAfterVersion(long originalContentId,
int version) |
List |
findPreviousVersions(long originalContentId) |
List<ContentEntityObject> |
findUnpublishedContentWithUserContributions(String username)
Retrives the drafts for the given
User |
Iterator |
getAllCurrentEntities() |
ContentEntityObject |
getById(long id) |
List |
getContentAuthoredByUser(String username) |
ContentEntityObject |
getFirstVersionAfter(long originalVersionContentId,
int version) |
ContentEntityObject |
getFirstVersionBefore(long originalVersionContentId,
int version) |
List<ContentEntityObject> |
getLastEditedVersionsOf(ContentEntityObject 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 request)
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.
|
Iterator |
getRecentlyAddedEntities(String spaceKey,
int maxResults) |
Iterator |
getRecentlyModifiedEntities(int maxResults) |
Iterator |
getRecentlyModifiedEntities(String spaceKey,
int maxResults) |
Iterator |
getRecentlyModifiedEntitiesForUser(String username) |
List |
getRecentlyModifiedForChangeDigest(Date fromDate)
Retrieves a list of
ContentEntityObject s that have been newly added or modified
since the date specified. |
List |
getTrashedContent(String spaceKey) |
ContentEntityObject |
getVersion(long originalVersionContentId,
int version) |
Map<Long,List<ConfluenceUser>> |
getVersionEditContributors(Iterable<ContentEntityObject> 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 the
ContentEntityObject 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. |
findLatestVersionsCount, findLatestVersionsIterator, save
findAll, findAllSorted, findAllSorted, findByClassIds, getPersistentClass, refresh, remove, replicate, save, saveRaw
ContentEntityObject getById(long id)
Iterator getAllCurrentEntities()
Iterator getRecentlyModifiedEntities(int maxResults)
List getRecentlyModifiedForChangeDigest(Date fromDate)
ContentEntityObject
s that have been newly added or modified
since the date specified. This list excludes drafts, space descriptions and mail.fromDate
- content modified after this date will be returnedContentEntityObject
s that have been newly added or modified
since the date specifiedString getObjectType(long id)
ContentEntityObject getFirstVersionBefore(long originalVersionContentId, int version)
ContentEntityObject getFirstVersionAfter(long originalVersionContentId, int version)
ContentEntityObject getVersion(long originalVersionContentId, int version)
List<VersionHistorySummary> getVersionHistorySummary(long originalContentId)
PageResponse<VersionHistorySummary> getVersionHistorySummary(long originalContentId, LimitedRequest request)
originalContentId
- the content Id of latest version, the CURRENT versionrequest
- page request contains start, limit fields for pagination purpose.Map<Long,List<ConfluenceUser>> getVersionEditContributors(Iterable<ContentEntityObject> originalVersions)
originalVersions
- the contents of latest versions, the CURRENT versionsMap<Long,ContentEntityObject> getVersionsLastEditedByUser(Collection<Long> contentIds, com.atlassian.sal.api.user.UserKey userKey)
ContentEntityObject
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.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 inContentEntityObject
objects relating to the version of the given contentIds that were last
edited by the given user.PageResponse<AbstractPage> getPageAndBlogPostsVersionsLastEditedByUser(@Nullable com.atlassian.sal.api.user.UserKey userKey, LimitedRequest request)
userKey
- the key for the user for whom to retrieve the modified contentrequest
- the requestList findPreviousVersions(long originalContentId)
List findHistoricalVersionsAfterVersion(long originalContentId, int version)
List<ContentEntityObject> getLastEditedVersionsOf(ContentEntityObject content)
content
- content (must be the latest version)IllegalArgumentException
- if the content is not the latest version or nullList<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, String status, int offset, int count)
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 retrievePageResponse<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, String status, LimitedRequest limitedRequest, com.google.common.base.Predicate<Page> predicate)
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 byint countContentBySpaceIdAndStatus(long spaceId, String status)
spaceId
- the id of the spacestatus
- the status of the content being retrieved (e.g. ContentEntityObject.DELETED
Date getOldestPageCreationDate()
ContentEntityObject findDraftFor(long contentId)
contentId
- id of the content to retrieve the draft forContentEntityObject.DRAFT
List<ContentEntityObject> findUnpublishedContentWithUserContributions(String username)
User
username
- the owner of the draftsContentEntityObject
with the
ContentEntityObject.DRAFT
statusCopyright © 2003–2016 Atlassian. All rights reserved.