@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 
 | 
@NonNull Iterator<CustomContentEntityObject> | 
findAllChildren(CustomContentEntityObject content)
Get an iterator of all children of a piece of content. 
 | 
@NonNull Iterator<CustomContentEntityObject> | 
findAllContainedOfType(long containerContentId,
                      String pluginModuleKey)
Get an iterator of contained content of a piece of content with a given type. 
 | 
@NonNull Collection<CustomContentEntityObject> | 
findAllInSpace(Space space)
Deprecated. 
 
Since 4.2. No replacement. 
 | 
<T> @NonNull PageResponse<T> | 
findByQuery(ContentQuery<T> query,
           boolean cacheable,
           LimitedRequest request,
           com.google.common.base.Predicate<T> predicate)
Deprecated. 
 
 | 
<T> @NonNull Iterator<T> | 
findByQuery(ContentQuery<T> query,
           int offset,
           int maxResults)
Get the results of a query for CustomContentEntityObjects 
 | 
default <T> @NonNull PageResponse<T> | 
findByQueryAndFilter(ContentQuery<T> query,
                    boolean cacheable,
                    LimitedRequest request,
                    Predicate<T> predicate)
Get the results of a query for CustomContentEntityObjects 
 | 
@NonNull 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. 
 | 
@NonNull 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. 
 | 
@Nullable CustomContentEntityObject | 
getById(long id)
Find a single CustomContentEntityObject by its id 
 | 
@NonNull PageResponse<Content> | 
getChildrenOfType(ContentEntityObject entity,
                 String contentModuleKey,
                 LimitedRequest limitedRequest,
                 Expansions expansions,
                 Depth depth,
                 com.google.common.base.Predicate<? super CustomContentEntityObject> predicate)
Deprecated. 
 
 | 
default @NonNull PageResponse<Content> | 
getChildrenOfTypeAndFilter(ContentEntityObject entity,
                          String contentModuleKey,
                          LimitedRequest limitedRequest,
                          Expansions expansions,
                          Depth depth,
                          Predicate<? super CustomContentEntityObject> predicate)
Returns the children of a CustomContentEntityObject, limited to the pagination requested. 
 | 
@NonNull CustomContentEntityObject | 
newPluginContentEntityObject(String contentModuleKey)
Create a new CustomContentEntityObject for the given module. 
 | 
<T> @NonNull List<T> | 
queryForList(ContentQuery<T> query)
Get the results of a query for CustomContentEntityObjects 
 | 
<T> @NonNull List<T> | 
queryForList(ContentQuery<T> query,
            int offset,
            int maxResults)
Get the results of a query for CustomContentEntityObjects 
 | 
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,
                 @Nullable ContentEntityObject origObj,
                 @Nullable 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. 
 | 
@NonNull 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, saveNewVersionvoid saveContentEntity(ContentEntityObject obj, @Nullable ContentEntityObject origObj, @Nullable SaveContext saveContext)
ContentEntityManagersaveContentEntity in interface ContentEntityManagersaveContext - - 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 ContentEntityManagerid - the ID of the entity to retrieve<T> @NonNull 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<T> @NonNull List<T> queryForList(ContentQuery<T> query, int offset, int maxResults)
query - the query to performoffset - the first result to returnmaxResults - the maximum number of results to return<T> @NonNull List<T> queryForList(ContentQuery<T> query)
query - the query to perform@Deprecated <T> @NonNull PageResponse<T> findByQuery(ContentQuery<T> query, boolean cacheable, LimitedRequest request, com.google.common.base.Predicate<T> predicate)
findByQueryAndFilter(ContentQuery, boolean, LimitedRequest, 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 resultsdefault <T> @NonNull PageResponse<T> findByQueryAndFilter(ContentQuery<T> query, boolean cacheable, LimitedRequest request, 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<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@Deprecated @NonNull PageResponse<Content> getChildrenOfType(ContentEntityObject entity, String contentModuleKey, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super CustomContentEntityObject> predicate)
getChildrenOfTypeAndFilter(ContentEntityObject, String, LimitedRequest, Expansions, Depth, 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 CustomContentEntityObjectsdefault @NonNull PageResponse<Content> getChildrenOfTypeAndFilter(ContentEntityObject entity, String contentModuleKey, LimitedRequest limitedRequest, Expansions expansions, Depth depth, 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–2022 Atlassian. All rights reserved.