|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.core.DefaultContentEntityManager
Field Summary | |
protected ContentEntityObjectDao |
contentEntityObjectDao
|
protected EventManager |
eventManager
|
protected ConfluenceIndexer |
indexer
|
protected LinkManager |
linkManager
|
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager |
ITERATE_ALL |
Constructor Summary | |
DefaultContentEntityManager()
|
Method Summary | |
Iterator |
getAllCurrentEntities()
Retrieves an Iterator for all entities. |
ContentEntityObject |
getById(long id)
|
List |
getEntitiesModifiedSince(Date date)
|
protected EventManager |
getEventManager()
|
List |
getLockedBySpace(String spaceKey)
|
ContentEntityObject |
getNextVersion(ContentEntityObject ceo)
|
ContentEntityObject |
getOtherVersion(ContentEntityObject ceo,
int version)
|
protected PageDao |
getPageDao()
|
ContentEntityObject |
getPreviousVersion(ContentEntityObject ceo)
|
Iterator |
getRecentlyAddedEntities(String spaceKey,
int maxResults)
Retrieve an iterator of recently added entities, in order of most recent to last. |
Iterator |
getRecentlyModifiedEntities(int maxResults)
Deprecated. |
Iterator |
getRecentlyModifiedEntities(String spaceKey,
int maxResults)
Retrieve an iterator of recently modified entities, in order of most recent to last. |
Iterator |
getRecentlyModifiedEntitiesByType(ListQuery query,
int firstResult)
|
Iterator |
getRecentlyModifiedEntitiesForUser(String username)
Retrieve an iterator of recently modified entities, in order of most recent to last. |
List |
getVersionHistorySummaries(ContentEntityObject ceo)
Get a VersionHistorySummary for all previous versions of a ContentEntityObject, starting with the current content. |
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes *CreateEvents s. |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvent s. |
protected void |
publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
This method publishes *UpdateEvent s. |
void |
refreshContentEntity(ContentEntityObject obj)
|
void |
removeContentEntity(ContentEntityObject obj)
|
void |
revertContentEntityBackToVersion(ContentEntityObject obj,
int version)
|
void |
saveContentEntity(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
In order to create a history for this object, we need to pass in the modified as well as the original version of the object. |
void |
saveContentEntity(ContentEntityObject obj,
SaveContext saveContext)
|
void |
setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)
|
void |
setEventManager(EventManager eventManager)
|
void |
setIndexer(ConfluenceIndexer indexer)
|
void |
setLabelManager(LabelManager labelManager)
|
void |
setLinkManager(LinkManager linkManager)
|
void |
updateContentLinkingTo(SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey,
String newTitle)
Loops through all the content that currently links to 'contentBeingChanged' and renames all the links. |
void |
updateOutgoingLinksInContent(SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey)
Update the links on the page itself. |
void |
updateSingleContentLinkinTo(ContentEntityObject referringContent,
SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey,
String newTitle)
Renames all links contained in the 'referringContent' that currently links to 'contentBeingRefactored'. |
void |
updateSingleContentLinkinTo(ContentEntityObject referringContent,
SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey,
String newTitle,
SaveContext saveContext)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ContentEntityObjectDao contentEntityObjectDao
protected LinkManager linkManager
protected ConfluenceIndexer indexer
protected EventManager eventManager
Constructor Detail |
public DefaultContentEntityManager()
Method Detail |
public void setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)
public void setLinkManager(LinkManager linkManager)
public void saveContentEntity(ContentEntityObject obj, SaveContext saveContext)
saveContentEntity
in interface ContentEntityManager
obj
- - the ContentEntityObject
to savesaveContext
- - a SaveContext
object for the manager.public void saveContentEntity(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
ContentEntityManager
saveContentEntity
in interface ContentEntityManager
obj
- origObj
- saveContext
- - a SaveContext
holding additional parameters for the manager to use when saving.public void removeContentEntity(ContentEntityObject obj)
removeContentEntity
in interface ContentEntityManager
public void refreshContentEntity(ContentEntityObject obj)
refreshContentEntity
in interface ContentEntityManager
public ContentEntityObject getById(long id)
getById
in interface ContentEntityManager
public void revertContentEntityBackToVersion(ContentEntityObject obj, int version)
revertContentEntityBackToVersion
in interface ContentEntityManager
public Iterator getRecentlyAddedEntities(String spaceKey, int maxResults)
ContentEntityManager
getRecentlyAddedEntities
in interface ContentEntityManager
spaceKey
- the space key to look up the entities for. If spaceKey is null, there
is assumed to be no space, and things like user info and space descriptions will
also be returned.maxResults
- the maximum number of entities to return in the iterator. Any number
zero or less (Use the ITERATE_ALL constant) will cause the iterator to go over
every entity.public Iterator getRecentlyModifiedEntities(String spaceKey, int maxResults)
ContentEntityManager
getRecentlyModifiedEntities
in interface ContentEntityManager
spaceKey
- the space key to look up the entities for.maxResults
- the maximum number of entities to return in the iterator. Any number
zero or less (Use the ITERATE_ALL constant) will cause the iterator to go over
every entity.public Iterator getRecentlyModifiedEntities(int maxResults)
getRecentlyModifiedEntities
in interface ContentEntityManager
public Iterator getAllCurrentEntities()
ContentEntityManager
getAllCurrentEntities
in interface ContentEntityManager
public Iterator getRecentlyModifiedEntitiesForUser(String username)
ContentEntityManager
getRecentlyModifiedEntitiesForUser
in interface ContentEntityManager
username
- the user for which to retrieve the modified contentpublic Iterator getRecentlyModifiedEntitiesByType(ListQuery query, int firstResult)
getRecentlyModifiedEntitiesByType
in interface ContentEntityManager
public List getEntitiesModifiedSince(Date date)
getEntitiesModifiedSince
in interface ContentEntityManager
public List getLockedBySpace(String spaceKey)
getLockedBySpace
in interface ContentEntityManager
public void updateOutgoingLinksInContent(SpaceContentEntityObject contentBeingRefactored, String newSpaceKey)
ContentEntityManager
updateOutgoingLinksInContent
in interface ContentEntityManager
contentBeingRefactored
- newSpaceKey
- public void updateContentLinkingTo(SpaceContentEntityObject contentBeingRefactored, String newSpaceKey, String newTitle)
ContentEntityManager
updateContentLinkingTo
in interface ContentEntityManager
contentBeingRefactored
- newSpaceKey
- newTitle
- public void updateSingleContentLinkinTo(ContentEntityObject referringContent, SpaceContentEntityObject contentBeingRefactored, String newSpaceKey, String newTitle)
ContentEntityManager
updateSingleContentLinkinTo
in interface ContentEntityManager
referringContent
- contentBeingRefactored
- newSpaceKey
- newTitle
- public void updateSingleContentLinkinTo(ContentEntityObject referringContent, SpaceContentEntityObject contentBeingRefactored, String newSpaceKey, String newTitle, SaveContext saveContext)
updateSingleContentLinkinTo
in interface ContentEntityManager
public ContentEntityObject getPreviousVersion(ContentEntityObject ceo)
getPreviousVersion
in interface ContentEntityManager
public ContentEntityObject getNextVersion(ContentEntityObject ceo)
getNextVersion
in interface ContentEntityManager
public ContentEntityObject getOtherVersion(ContentEntityObject ceo, int version)
getOtherVersion
in interface ContentEntityManager
public List getVersionHistorySummaries(ContentEntityObject ceo)
ContentEntityManager
getVersionHistorySummaries
in interface ContentEntityManager
ceo
- the entity object to return the version history of
protected PageDao getPageDao()
protected void publishCreateEvent(ContentEntityObject obj)
*CreateEvents
s.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
obj
- the created content entity objectprotected void publishUpdateEvent(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
*UpdateEvent
s.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
obj
- the updated content entity objectorigObj
- the old version of the content entity object, for history purposesaveContext
- the associated SaveContext
protected void publishRemoveEvent(ContentEntityObject obj)
*RemoveEvent
s.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
obj
- the removed content entity objectpublic void setEventManager(EventManager eventManager)
setEventManager
in interface ContentEntityManager
public void setLabelManager(LabelManager labelManager)
protected EventManager getEventManager()
public void setIndexer(ConfluenceIndexer indexer)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |