|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 | ||
---|---|---|
Collection<CustomContentEntityObject> |
findAllInSpace(Space space)
This method is required for space exports to work properly. |
|
|
findByQuery(ContentQuery<T> query,
int offset,
int maxResults)
Get the results of a query for PluginContentEntityObjects |
|
Iterator<CustomContentEntityObject> |
findCurrentInSpace(Space space,
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,
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(String contentModuleKey)
Create a new CustomContentEntityObject for the given module. |
|
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 |
removeAllInSpace(String pluginContentKey,
Space space)
Remove all plugin content of a particular type from a given space. |
|
void |
removeAllPluginContentInSpace(Space space)
Remove all plugin content (of all types) from a given space. |
|
void |
setContentTypeManager(ContentTypeManager contentTypeManager)
|
|
void |
setCustomContentDao(CustomContentDao customContentDao)
|
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(String contentModuleKey)
CustomContentManager
newPluginContentEntityObject
in interface CustomContentManager
contentModuleKey
- the module complete key of the content's ContentAdapter module
public CustomContentEntityObject getById(long id)
CustomContentManager
getById
in interface CustomContentManager
getById
in interface ContentEntityManager
getById
in class DefaultContentEntityManager
id
- the ID of the entity to retrieve
public <T> Iterator<T> findByQuery(ContentQuery<T> query, int offset, int maxResults)
CustomContentManager
findByQuery
in interface CustomContentManager
query
- 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 CustomContentManager
query
- the query to perform
public int findTotalInSpace(Space space, String pluginContentKey)
CustomContentManager
findTotalInSpace
in interface CustomContentManager
space
- the space to count content inpluginContentKey
- the plugin module complete key of the content to be searched for
public Iterator<CustomContentEntityObject> findCurrentInSpace(Space space, String pluginContentKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder)
CustomContentManager
findCurrentInSpace
in interface CustomContentManager
space
- 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 void removeAllInSpace(String pluginContentKey, Space space)
CustomContentManager
removeAllInSpace
in interface CustomContentManager
pluginContentKey
- 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
*CreateEvents
s.
Specific content entity object manager that need to publish those events should override this method.
publishCreateEvent
in class DefaultContentEntityManager
obj
- the created content entity objectprotected void publishUpdateEvent(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
DefaultContentEntityManager
*UpdateEvent
s.
Specific content entity object manager that need to publish those events should override this method.
publishUpdateEvent
in class DefaultContentEntityManager
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)
DefaultContentEntityManager
*RemoveEvent
s.
Specific content entity object manager that need to publish those events should override this method.
publishRemoveEvent
in class DefaultContentEntityManager
obj
- the removed content entity objectpublic void removeAllPluginContentInSpace(Space space)
CustomContentManager
removeAllPluginContentInSpace
in interface CustomContentManager
public Collection<CustomContentEntityObject> findAllInSpace(Space space)
CustomContentManager
findAllInSpace
in interface CustomContentManager
space
- 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 |