public interface

ContentDao

implements ContentEntityObjectDao
com.atlassian.confluence.content.render.xhtml.migration.ContentDao
Known Indirect Subclasses

Class Overview

DAO to allow us to load content objects by id for migration. This was introduced because ContentEntityManager cannot be autowired by type in spring 2.0. Secondly, was introduced to make unit testing easier.

You should not consider this interface public. It is required to provide some Confluence 4 migration specific functionality but not for use outwith this context.

Summary

Public Methods
ContentEntityObject getById(long id)
int getCountOfLatestXhtmlContent()

This is for internal use only, Do not rely on it as a public API.

int getCountOfXhtmlContent()

This is for internal use only, Do not rely on it as a public API.

int getCountOfXhtmlSpaceDescriptions()

This is for internal use only, Do not rely on it as a public API.

int getLatestContentCount()
List<ContentEntityObject> getLatestOrderedWikiContentFromContentId(long startContentId, int maxRows)
List<ContentEntityObject> getLatestOrderedXhtmlContentFromContentId(long startContentId, int maxRows)

This is for internal use only, Do not rely on it as a public API.

List<ContentEntityObject> getMailEntities(int startRow, int maxRows)
int getMailEntitiesCount()
List<ContentEntityObject> getOrderedXhtmlContentFromContentId(long startContentId, int maxRows)

This is for internal use only, Do not rely on it as a public API.

List<ContentEntityObject> getXhtmlSpaceDescriptionsFromContentId(long startContentId, int maxRows)

This is for internal use only, Do not rely on it as a public API.

void saveRawWithoutReindex(EntityObject objectToSave)

This is for internal use only, Do not rely on it as a public API.

[Expand]
Inherited Methods
From interface bucket.core.persistence.ObjectDao
From interface com.atlassian.confluence.core.persistence.ContentEntityObjectDao
From interface com.atlassian.confluence.core.persistence.VersionedObjectDao

Public Methods

public ContentEntityObject getById (long id)

public int getCountOfLatestXhtmlContent ()

This is for internal use only, Do not rely on it as a public API.

This is used to calculate the amount of work required when migrating or upgrading content.

Returns
  • the number of latest CEO's with XHTML content.

public int getCountOfXhtmlContent ()

This is for internal use only, Do not rely on it as a public API.

This is used to calculate the amount of work required when migrating or upgrading content.

Returns
  • the number of CEO's with XHTML content.

public int getCountOfXhtmlSpaceDescriptions ()

This is for internal use only, Do not rely on it as a public API.

This is used to calculate the amount of work required when migrating or upgrading content.

Returns
  • the number of SpaceDescription's with BodyContent of type BodyType.XHTML

public int getLatestContentCount ()

public List<ContentEntityObject> getLatestOrderedWikiContentFromContentId (long startContentId, int maxRows)

Parameters
startContentId start content id
maxRows max rows
Returns
  • the latest versions of wiki content within the specified bounds

public List<ContentEntityObject> getLatestOrderedXhtmlContentFromContentId (long startContentId, int maxRows)

This is for internal use only, Do not rely on it as a public API. This is used to retrieve batches of data during migration or upgrades.

Warning: You will want to keep maxRows as small as possible because a list of CEO can be a very memory hungry structure. A good example is the default used in content migration which is 500.

Returns
  • a list ordered by id of all the latest ContentEntityObject's with XHTML formatted bodies.

public List<ContentEntityObject> getMailEntities (int startRow, int maxRows)

public int getMailEntitiesCount ()

public List<ContentEntityObject> getOrderedXhtmlContentFromContentId (long startContentId, int maxRows)

This is for internal use only, Do not rely on it as a public API. This is used to retrieve batches of data during migration or upgrades.

Warning: You will want to keep maxRows as small as possible because a list of CEO can be a very memory hungry structure. A good example is the default used in content migration which is 500.

Returns
  • a list ordered by id of all the ContentEntityObject's with XHTML formatted bodies.

public List<ContentEntityObject> getXhtmlSpaceDescriptionsFromContentId (long startContentId, int maxRows)

This is for internal use only, Do not rely on it as a public API. This is used to retrieve batches of data during migration or upgrades.

Warning: You will want to keep maxRows as small as possible because a list of CEO can be a very memory hungry structure. A good example is the default used in content migration which is 500.

Returns
  • a list ordered by id of all the SpaceDescription's with BodyContent of type BodyType.XHTML

public void saveRawWithoutReindex (EntityObject objectToSave)

This is for internal use only, Do not rely on it as a public API.

Perform a saveRaw but without performing the re-index; it is unnecessary in the context of a migration or upgrade.