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> |
findAllDraftsFor(long contentId)
Retrieves a list of drafts for the given content if any drafts exist.
|
List<ContentEntityObject> |
findContentBySpaceIdAndStatus(long spaceId,
String status,
int offset,
int count)
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)
Deprecated.
Used for the old "Drafts" page, which is superseded by "Recently worked on". Remove if "Drafts" page is removed
|
Iterator |
getAllCurrentEntities() |
ContentEntityObject |
getById(long id) |
List |
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 set of content by the given user.
|
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.
|
PageResponse<AbstractPage> |
getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts(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
ContentEntityObjects that have been newly added or modified
since the date specified. |
List |
getTrashedContent(String spaceKey)
Get trashed content for a space.
|
List<ContentEntityObject> |
getTrashedContent(String spaceKey,
int offset,
int count)
Get trashed content for a space, with pagination.
|
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, savefindAll, findAllSorted, findAllSorted, findByClassIds, findByClassIds, getPersistentClass, refresh, remove, replicate, save, saveRawContentEntityObject getById(long id)
Iterator getAllCurrentEntities()
Iterator getRecentlyModifiedEntities(int maxResults)
List getRecentlyModifiedForChangeDigest(Date fromDate)
ContentEntityObjects 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 returnedContentEntityObjects that have been newly added or modified
since the date specifiedList getTrashedContent(String spaceKey)
spaceKey - the space key for which all trash will be retrievedList<ContentEntityObject> getTrashedContent(String spaceKey, int offset, int count)
spaceKey - the space key for which trash will be retrievedoffset - the offset of the first item to retrieve (0-based)count - the maximum number of items to retrieveString 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.Map<Long,ContributionStatus> getContributionStatusByUser(Collection<ContentId> contentIds, com.atlassian.sal.api.user.UserKey userKey)
ContributionStatus for a content ID if the user has never contributed to the content.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 inContributionStatus of each contentPageResponse<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 requestPageResponse<AbstractPage> getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts(@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.DELETEDoffset - the offset of the first item to retrieve (0-based)count - the maximum number of items to retrieveint countContentBySpaceIdAndStatus(long spaceId,
String status)
spaceId - the id of the spacestatus - the status of the content being retrieved (e.g. ContentEntityObject.DELETEDDate getOldestPageCreationDate()
ContentEntityObject findDraftFor(long contentId)
contentId - id of the content to retrieve the draft forContentEntityObject.DRAFTList<ContentEntityObject> findAllDraftsFor(long contentId)
contentId - id of the content to retrieve the draft forContentEntityObject.DRAFT@Deprecated List<ContentEntityObject> findUnpublishedContentWithUserContributions(String username)
Userusername - the owner of the draftsContentEntityObject with the
ContentEntityObject.DRAFT statusCopyright © 2003–2017 Atlassian. All rights reserved.