|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.core.DefaultContentEntityManager
com.atlassian.confluence.content.DefaultCustomContentManager
public class DefaultCustomContentManager
Generic manager for pluggable content.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.confluence.content.CustomContentManager |
|---|
CustomContentManager.SortField, CustomContentManager.SortOrder |
| Field Summary |
|---|
| Fields inherited from class com.atlassian.confluence.core.DefaultContentEntityManager |
|---|
attachmentManager, contentEntityObjectDao, eventManager, hibernateSessionManager, indexer, labelManager, linkManager |
| Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager |
|---|
ITERATE_ALL |
| Constructor Summary | |
|---|---|
DefaultCustomContentManager()
|
|
| Method Summary | ||
|---|---|---|
long |
countChildrenOfType(CustomContentEntityObject content,
java.lang.String contentModuleKey)
Get the total number of children of a piece of content with the given type |
|
java.util.Iterator<CustomContentEntityObject> |
findAllChildren(CustomContentEntityObject content)
Get an iterator of all children of a piece of content. |
|
java.util.Collection<CustomContentEntityObject> |
findAllInSpace(Space space)
Deprecated. |
|
|
findByQuery(ContentQuery<T> query,
int offset,
int maxResults)
Get the results of a query for PluginContentEntityObjects |
|
java.util.Iterator<CustomContentEntityObject> |
findChildrenOfType(CustomContentEntityObject content,
java.lang.String pluginContentKey,
int offset,
int maxResults,
CustomContentManager.SortField sortField,
CustomContentManager.SortOrder sortOrder)
Get an iterator of children of a piece of content with a given type. |
|
java.util.Iterator<CustomContentEntityObject> |
findCurrentInSpace(Space space,
java.lang.String pluginContentKey,
int offset,
int maxResults,
CustomContentManager.SortField sortField,
CustomContentManager.SortOrder sortOrder)
Get an iterator of all the current, non-deleted content of the given type in the given space. |
|
|
findFirstObjectByQuery(ContentQuery<T> query)
Find the first result of a query for PluginContentEntityObjects. |
|
int |
findTotalInSpace(Space space,
java.lang.String pluginContentKey)
Get the total count of current, non-deleted content of the given type in the given space. |
|
CustomContentEntityObject |
getById(long id)
Find a single CustomContentEntityObject by its id |
|
CustomContentEntityObject |
newPluginContentEntityObject(java.lang.String contentModuleKey)
Create a new CustomContentEntityObject for the given module. |
|
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes *CreateEventss. |
|
protected void |
publishCreateEvent(ContentEntityObject obj,
SaveContext saveContext)
|
|
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvents. |
|
protected void |
publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
This method publishes *UpdateEvents. |
|
void |
removeAllInSpace(java.lang.String pluginContentKey,
Space space)
Remove all plugin content of a particular type from a given space. |
|
void |
removeAllPluginContent(java.lang.String contentModuleKey)
Remove all plugin content of a particular type |
|
void |
removeAllPluginContentInSpace(Space space)
Remove all plugin content (of all types) from a given space. |
|
void |
removeContentEntity(ContentEntityObject obj)
Removes given content entity object and all associated domain objects i.e. |
|
void |
setContentTypeManager(ContentTypeManager contentTypeManager)
|
|
void |
setCustomContentDao(CustomContentDao customContentDao)
|
|
CustomContentEntityObject |
updatePluginModuleKey(CustomContentEntityObject content,
java.lang.String pluginModuleKey)
Update the type of an existing CustomContentEntityObject with the specified module key. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultCustomContentManager()
| Method Detail |
|---|
public CustomContentEntityObject newPluginContentEntityObject(java.lang.String contentModuleKey)
CustomContentManager
newPluginContentEntityObject in interface CustomContentManagercontentModuleKey - the module complete key of the content's ContentAdapter module
public CustomContentEntityObject updatePluginModuleKey(CustomContentEntityObject content,
java.lang.String pluginModuleKey)
CustomContentManager
updatePluginModuleKey in interface CustomContentManagerpluginModuleKey - the module complete key of the content's ContentAdapter module
public CustomContentEntityObject getById(long id)
CustomContentManager
getById in interface CustomContentManagergetById in interface ContentEntityManagergetById in class DefaultContentEntityManagerid - the ID of the entity to retrieve
public <T> java.util.Iterator<T> findByQuery(ContentQuery<T> query,
int offset,
int maxResults)
CustomContentManager
findByQuery in interface CustomContentManagerquery - the query to performoffset - the first result to returnmaxResults - the maximum number of results to return
public <T> T findFirstObjectByQuery(ContentQuery<T> query)
CustomContentManager
findFirstObjectByQuery in interface CustomContentManagerquery - the query to perform
public int findTotalInSpace(Space space,
java.lang.String pluginContentKey)
CustomContentManager
findTotalInSpace in interface CustomContentManagerspace - the space to count content inpluginContentKey - the plugin module complete key of the content to be searched for
public java.util.Iterator<CustomContentEntityObject> findCurrentInSpace(Space space,
java.lang.String pluginContentKey,
int offset,
int maxResults,
CustomContentManager.SortField sortField,
CustomContentManager.SortOrder sortOrder)
CustomContentManager
findCurrentInSpace in interface CustomContentManagerspace - the space to retrieve content frompluginContentKey - the plugin module complete key of the content to be searched forsortField - what field to sort the content onsortOrder - which direction to sort the content in
public long countChildrenOfType(CustomContentEntityObject content,
java.lang.String contentModuleKey)
CustomContentManager
countChildrenOfType in interface CustomContentManagercontent - the content to look for children ofcontentModuleKey - the module key for the type of child to look for
public java.util.Iterator<CustomContentEntityObject> findChildrenOfType(CustomContentEntityObject content,
java.lang.String pluginContentKey,
int offset,
int maxResults,
CustomContentManager.SortField sortField,
CustomContentManager.SortOrder sortOrder)
CustomContentManager
findChildrenOfType in interface CustomContentManagercontent - the content to look for children ofpluginContentKey - the module key of the type of child to look foroffset - the offset of the first resultmaxResults - the maximum total results to returnsortField - what field to sort the content onsortOrder - which direction to sort the content inpublic java.util.Iterator<CustomContentEntityObject> findAllChildren(CustomContentEntityObject content)
CustomContentManager
findAllChildren in interface CustomContentManagercontent - the content to look for children of
public void removeAllInSpace(java.lang.String pluginContentKey,
Space space)
CustomContentManager
removeAllInSpace in interface CustomContentManagerpluginContentKey - the plugin module complete key of the content to be searched forspace - the space from which to delete all content of that typeprotected void publishCreateEvent(ContentEntityObject obj)
DefaultContentEntityManager*CreateEventss.
Specific content entity object manager that need to publish those events should override this method.
publishCreateEvent in class DefaultContentEntityManagerobj - the created content entity object
protected void publishCreateEvent(ContentEntityObject obj,
SaveContext saveContext)
publishCreateEvent in class DefaultContentEntityManager
protected void publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
DefaultContentEntityManager*UpdateEvents.
Specific content entity object manager that need to publish those events should override this method.
publishUpdateEvent in class DefaultContentEntityManagerobj - the updated content entity objectorigObj - the old version of the content entity object, for history purposesaveContext - the associated SaveContextprotected void publishRemoveEvent(ContentEntityObject obj)
DefaultContentEntityManager*RemoveEvents.
Specific content entity object manager that need to publish those events should override this method.
publishRemoveEvent in class DefaultContentEntityManagerobj - the removed content entity objectpublic void removeAllPluginContentInSpace(Space space)
CustomContentManager
removeAllPluginContentInSpace in interface CustomContentManagerpublic void removeAllPluginContent(java.lang.String contentModuleKey)
CustomContentManager
removeAllPluginContent in interface CustomContentManagercontentModuleKey - the plugin module complete key of the content to be searched forpublic void removeContentEntity(ContentEntityObject obj)
ContentEntityManager
removeContentEntity in interface ContentEntityManagerremoveContentEntity in class DefaultContentEntityManager@Deprecated public java.util.Collection<CustomContentEntityObject> findAllInSpace(Space space)
findAllInSpace in interface CustomContentManagerspace - a space
public void setCustomContentDao(CustomContentDao customContentDao)
public void setContentTypeManager(ContentTypeManager contentTypeManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||