@ParametersAreNonnullByDefault public interface CustomContentManager extends ContentEntityManager
Modifier and Type | Interface and Description |
---|---|
static class |
CustomContentManager.SortField |
static class |
CustomContentManager.SortOrder |
ITERATE_ALL
Modifier and Type | Method and Description |
---|---|
long |
countChildrenOfType(CustomContentEntityObject content,
String contentModuleKey)
Get the total number of children of a piece of content with the given type
|
Iterator<CustomContentEntityObject> |
findAllChildren(CustomContentEntityObject content)
Get an iterator of all children of a piece of content.
|
Iterator<CustomContentEntityObject> |
findAllContainedOfType(long containerContentId,
String pluginModuleKey)
Get an iterator of contained content of a piece of content with a given type.
|
Collection<CustomContentEntityObject> |
findAllInSpace(Space space)
Deprecated.
Since 4.2. No replacement.
|
<T> PageResponse<T> |
findByQuery(ContentQuery<T> query,
boolean cacheable,
LimitedRequest request,
com.google.common.base.Predicate<T> predicate)
Get the results of a query for CustomContentEntityObjects
|
<T> Iterator<T> |
findByQuery(ContentQuery<T> query,
int offset,
int maxResults)
Get the results of a query for CustomContentEntityObjects
|
Iterator<CustomContentEntityObject> |
findChildrenOfType(CustomContentEntityObject content,
String contentModuleKey,
int offset,
int maxResults,
CustomContentManager.SortField sortField,
CustomContentManager.SortOrder sortOrder)
Get an iterator of children of a piece of content with a given type.
|
Iterator<CustomContentEntityObject> |
findCurrentInSpace(Space space,
String contentModuleKey,
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.
|
<T> T |
findFirstObjectByQuery(ContentQuery<T> query)
Find the first result of a query for CustomContentEntityObjects.
|
int |
findTotalInSpace(Space space,
String contentModuleKey)
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
|
PageResponse<Content> |
getChildrenOfType(ContentEntityObject entity,
String contentModuleKey,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth,
com.google.common.base.Predicate<? super CustomContentEntityObject> predicate)
Returns the children of a CustomContentEntityObject, limited to the pagination requested.
|
CustomContentEntityObject |
newPluginContentEntityObject(String contentModuleKey)
Create a new CustomContentEntityObject for the given module.
|
void |
removeAllInSpace(String contentModuleKey,
Space space)
Remove all plugin content of a particular type from a given space.
|
void |
removeAllPluginContent(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 |
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.
|
CustomContentEntityObject |
updatePluginModuleKey(CustomContentEntityObject content,
String pluginModuleKey)
Update the type of an existing CustomContentEntityObject with the specified module key.
|
getContributionStatusByUser, getNextVersion, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionsLastEditedByUser, refreshContentEntity, removeContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, saveContentEntity, saveNewVersion, saveNewVersion, updateContentLinkingTo, updateOutgoingLinksInContent, updateSingleContentLinkinTo, updateSingleContentLinkinTo
void saveContentEntity(ContentEntityObject obj, @Nullable ContentEntityObject origObj, @Nullable SaveContext saveContext)
ContentEntityManager
saveContentEntity
in interface ContentEntityManager
saveContext
- - a SaveContext
holding additional parameters for the manager to use when saving.@Nonnull CustomContentEntityObject newPluginContentEntityObject(String contentModuleKey)
contentModuleKey
- the module complete key of the content's ContentAdapter module@Nonnull CustomContentEntityObject updatePluginModuleKey(CustomContentEntityObject content, String pluginModuleKey)
pluginModuleKey
- the module complete key of the content's ContentAdapter module@Nullable CustomContentEntityObject getById(long id)
getById
in interface ContentEntityManager
id
- the ID of the entity to retrieve@Nonnull <T> Iterator<T> findByQuery(ContentQuery<T> query, int offset, int maxResults)
query
- the query to performoffset
- the first result to returnmaxResults
- the maximum number of results to return@Nonnull <T> PageResponse<T> findByQuery(ContentQuery<T> query, boolean cacheable, LimitedRequest request, com.google.common.base.Predicate<T> predicate)
query
- the query to performcacheable
- whether the results for the given query can be cachedrequest
- the limited pagination requestpredicate
- the filter to apply to the results@Nullable <T> T findFirstObjectByQuery(ContentQuery<T> query)
query
- the query to performint findTotalInSpace(Space space, String contentModuleKey)
space
- the space to count content incontentModuleKey
- the plugin module complete key of the content to be searched for@Nonnull Iterator<CustomContentEntityObject> findCurrentInSpace(Space space, String contentModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder)
space
- the space to retrieve content fromcontentModuleKey
- 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 inlong countChildrenOfType(CustomContentEntityObject content, String contentModuleKey)
content
- the content to look for children ofcontentModuleKey
- the module key for the type of child to look for@Nonnull Iterator<CustomContentEntityObject> findAllContainedOfType(long containerContentId, String pluginModuleKey)
containerContentId
- the content id of the content to look contained forpluginModuleKey
- the module key of the type of contained to look for@Nonnull Iterator<CustomContentEntityObject> findChildrenOfType(CustomContentEntityObject content, String contentModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder)
content
- the content to look for children ofcontentModuleKey
- 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 in@Nonnull PageResponse<Content> getChildrenOfType(ContentEntityObject entity, String contentModuleKey, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super CustomContentEntityObject> predicate)
entity
- the content to look for children ofcontentModuleKey
- the module key of the type of child to look forlimitedRequest
- the pagination requestedexpansions
- the expansions applied to resultsdepth
- the depth to return children topredicate
- predicates used to filter the CustomContentEntityObjects@Nonnull Iterator<CustomContentEntityObject> findAllChildren(CustomContentEntityObject content)
content
- the content to look for children ofvoid removeAllInSpace(String contentModuleKey, Space space)
contentModuleKey
- the plugin module complete key of the content to be searched forspace
- the space from which to delete all content of that typevoid removeAllPluginContentInSpace(Space space)
space
- void removeAllPluginContent(String contentModuleKey)
contentModuleKey
- the plugin module complete key of the content to be searched for@Deprecated @Nonnull Collection<CustomContentEntityObject> findAllInSpace(Space space)
space
- a spaceCopyright © 2003–2017 Atlassian. All rights reserved.