com.atlassian.confluence.core.persistence
Interface ContentEntityObjectDao

All Superinterfaces:
ObjectDao, VersionedObjectDao
All Known Subinterfaces:
ContentDao, CustomContentDao, MailDao, PageDao, UserStatusDao
All Known Implementing Classes:
CachingPageDao, ContentEntityObjectHibernateDao, DefaultContentDao, HibernateMailDao, HibernatePageDao, HibernateUserStatusDao, PluginContentHibernateDao

public interface ContentEntityObjectDao
extends VersionedObjectDao


Method Summary
 int countContentBySpaceIdAndStatus(long spaceId, java.lang.String status)
          Retrieve the count of content for a given space with a particular status.
 java.util.List<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, java.lang.String status, int offset, int count)
          Retrieve content for a given space with a particular status.
 PageResponse<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId, java.lang.String status, LimitedRequest limitedRequest, com.google.common.base.Predicate<Page> predicate)
          Retrieve content for a given space with a particular status.
 java.util.List findHistoricalVersionsAfterVersion(long originalContentId, int version)
           
 java.util.List findPreviousVersions(long originalContentId)
           
 java.util.Iterator getAllCurrentEntities()
           
 ContentEntityObject getById(long id)
           
 java.util.List getContentAuthoredByUser(java.lang.String username)
           
 ContentEntityObject getFirstVersionAfter(long originalVersionContentId, int version)
           
 ContentEntityObject getFirstVersionBefore(long originalVersionContentId, int version)
           
 java.util.List<ContentEntityObject> getLastEditedVersionsOf(ContentEntityObject content)
          Retrieves all the last edited versions for each user who has contributed to the specified piece of content.
 java.util.List getLockedContentBySpace(java.lang.String spaceKey)
          Deprecated. since 5.1. There is no replacement as this functionality was superseded by multiple page permissions (CONF-3701)
 java.lang.String getObjectType(long id)
           
 java.util.Date getOldestPageCreationDate()
          Gets the creation date of the oldest page.
 java.util.Iterator getRecentlyAddedEntities(java.lang.String spaceKey, int maxResults)
           
 java.util.Iterator getRecentlyModifiedEntities(int maxResults)
           
 java.util.Iterator getRecentlyModifiedEntities(java.lang.String spaceKey, int maxResults)
           
 java.util.Iterator getRecentlyModifiedEntitiesForUser(java.lang.String username)
           
 java.util.List getRecentlyModifiedForChangeDigest(java.util.Date fromDate)
          Retrieves a list of ContentEntityObjects that have been newly added or modified since the date specified.
 java.util.List getTrashedContent(java.lang.String spaceKey)
           
 ContentEntityObject getVersion(long originalVersionContentId, int version)
           
 java.util.List<VersionHistorySummary> getVersionHistorySummary(long originalContentId)
           
 
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

getById

ContentEntityObject getById(long id)

getContentAuthoredByUser

java.util.List getContentAuthoredByUser(java.lang.String username)

getAllCurrentEntities

java.util.Iterator getAllCurrentEntities()

getRecentlyAddedEntities

java.util.Iterator getRecentlyAddedEntities(java.lang.String spaceKey,
                                            int maxResults)

getRecentlyModifiedEntities

java.util.Iterator getRecentlyModifiedEntities(int maxResults)

getRecentlyModifiedEntities

java.util.Iterator getRecentlyModifiedEntities(java.lang.String spaceKey,
                                               int maxResults)

getRecentlyModifiedForChangeDigest

java.util.List getRecentlyModifiedForChangeDigest(java.util.Date fromDate)
Retrieves a list of ContentEntityObjects that have been newly added or modified since the date specified. This list excludes drafts, space descriptions and mail.

Parameters:
fromDate - content modified after this date will be returned
Returns:
a list of ContentEntityObjects that have been newly added or modified since the date specified

getRecentlyModifiedEntitiesForUser

java.util.Iterator getRecentlyModifiedEntitiesForUser(java.lang.String username)

getLockedContentBySpace

@Deprecated
java.util.List getLockedContentBySpace(java.lang.String spaceKey)
Deprecated. since 5.1. There is no replacement as this functionality was superseded by multiple page permissions (CONF-3701)


getTrashedContent

java.util.List getTrashedContent(java.lang.String spaceKey)

getObjectType

java.lang.String getObjectType(long id)

getFirstVersionBefore

ContentEntityObject getFirstVersionBefore(long originalVersionContentId,
                                          int version)

getFirstVersionAfter

ContentEntityObject getFirstVersionAfter(long originalVersionContentId,
                                         int version)

getVersion

ContentEntityObject getVersion(long originalVersionContentId,
                               int version)

getVersionHistorySummary

java.util.List<VersionHistorySummary> getVersionHistorySummary(long originalContentId)

findPreviousVersions

java.util.List findPreviousVersions(long originalContentId)

findHistoricalVersionsAfterVersion

java.util.List findHistoricalVersionsAfterVersion(long originalContentId,
                                                  int version)

getLastEditedVersionsOf

java.util.List<ContentEntityObject> getLastEditedVersionsOf(ContentEntityObject content)
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.

Parameters:
content - content (must be the latest version)
Returns:
the last edited versions for each user who has contributed to the specified piece of content.
Throws:
java.lang.IllegalArgumentException - if the content is not the latest version or null

findContentBySpaceIdAndStatus

java.util.List<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId,
                                                                  java.lang.String status,
                                                                  int offset,
                                                                  int count)
Retrieve content for a given space with a particular status. Results will be sorted by descending date of last modification.

Parameters:
spaceId - the id of the space
status - 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

PageResponse<ContentEntityObject> findContentBySpaceIdAndStatus(long spaceId,
                                                                java.lang.String status,
                                                                LimitedRequest limitedRequest,
                                                                com.google.common.base.Predicate<Page> predicate)
Retrieve content for a given space with a particular status. Results will be sorted by descending date of last modification.

Parameters:
spaceId - the id of the space
status - the status of the content being retrieved (e.g. ContentEntityObject.DELETED
limitedRequest - - the start and offset of the pages to retrieve
predicate - - a predicate to filter the returned results by
Returns:
a PageResponse of ContentEntityObjects in the space with the given status

countContentBySpaceIdAndStatus

int countContentBySpaceIdAndStatus(long spaceId,
                                   java.lang.String status)
Retrieve the count of content for a given space with a particular status.

Parameters:
spaceId - the id of the space
status - the status of the content being retrieved (e.g. ContentEntityObject.DELETED
Returns:
the number of content objects with that status in that space

getOldestPageCreationDate

java.util.Date getOldestPageCreationDate()
Gets the creation date of the oldest page.

Returns:
creation date of the oldest page in Confluence


Copyright © 2003-2014 Atlassian. All Rights Reserved.