@ParametersAreNonnullByDefault public class DefaultCustomContentManager extends DefaultContentEntityManager implements CustomContentManager
CustomContentManager.SortField, CustomContentManager.SortOrdercollaborativeEditingHelperITERATE_ALL| Constructor and Description |
|---|
DefaultCustomContentManager(CustomContentDao customContentDao,
HibernateSessionManager hibernateSessionManager,
com.google.common.base.Supplier<? extends WikiToStorageConverter> wikiToStorageConverterRef,
com.atlassian.event.api.EventPublisher eventPublisher,
ContentTypeManager contentTypeManager,
RelationManager relationManager,
ContentFactory contentFactory,
CollaborativeEditingHelper collaborativeEditingHelper,
AuditingContext auditingContext)
Deprecated.
since 7.12
|
DefaultCustomContentManager(CustomContentDao customContentDao,
HibernateSessionManager hibernateSessionManager,
com.google.common.base.Supplier<? extends WikiToStorageConverter> wikiToStorageConverterRef,
com.atlassian.event.api.EventPublisher eventPublisher,
ContentTypeManager contentTypeManager,
RelationManager relationManager,
ContentFactory contentFactory,
CollaborativeEditingHelper collaborativeEditingHelper,
AuditingContext auditingContext,
RetentionFeatureChecker retentionFeatureChecker) |
DefaultCustomContentManager(CustomContentDao customContentDao,
LinkManager linkManager,
ConfluenceIndexer indexer,
LabelManager labelManager,
AttachmentManager attachmentManager,
HibernateSessionManager hibernateSessionManager,
com.google.common.base.Supplier<XhtmlContent> xhtmlContent,
com.atlassian.event.api.EventPublisher eventPublisher,
NotificationManager notificationManager,
ContentTypeManager contentTypeManager,
RelationManager relationManager,
ContentFactory contentFactory,
com.google.common.base.Supplier<UserAccessor> userAccessor,
com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManager,
CollaborativeEditingHelper collaborativeEditingHelper,
AuditingContext auditingContext)
Deprecated.
since 7.5
|
| 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.
|
<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
|
@NonNull Iterator<CustomContentEntityObject> |
findChildrenOfType(CustomContentEntityObject content,
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.
|
@NonNull 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.
|
<T> T |
findFirstObjectByQuery(ContentQuery<T> query)
Find the first result of a query for CustomContentEntityObjects.
|
int |
findTotalInSpace(Space space,
String pluginContentKey)
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)
|
@NonNull CustomContentEntityObject |
newPluginContentEntityObject(String contentModuleKey)
Create a new CustomContentEntityObject for the given module.
|
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes
*CreateEventss. |
protected void |
publishCreateEvent(ContentEntityObject obj,
@Nullable SaveContext saveContext) |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes
*RemoveEvents. |
protected void |
publishUpdateEvent(ContentEntityObject obj,
@Nullable ContentEntityObject origObj,
@Nullable SaveContext saveContext)
This method publishes
*UpdateEvents. |
void |
removeAllInSpace(String pluginContentKey,
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 |
removeContentEntity(ContentEntityObject obj)
Removes given content entity object and all associated domain objects i.e.
|
void |
setContentFactory(ContentFactory contentFactory) |
void |
setContentTypeManager(ContentTypeManager contentTypeManager) |
@NonNull CustomContentEntityObject |
updatePluginModuleKey(CustomContentEntityObject content,
String pluginModuleKey)
Update the type of an existing CustomContentEntityObject with the specified module key.
|
createDraft, findAllDraftsFor, findAllDraftsWithUnpublishedChangesForUser, findDraftFor, findDraftFor, findUnpublishedContentWithUserContributions, getAttachmentManager, getBodyContentForRevert, getById, getById, getByIds, getContentEntityObjectDao, getContributionStatusByUser, getEventPublisher, getHibernateSessionManager, getIndexer, getLabelManager, getLinkManager, getNextVersion, getNotificationManager, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionHistorySummaries, getVersionsLastEditedByUser, refreshContentEntity, removeContentEntities, removeHistoricalVersion, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, saveNewVersion, saveNewVersionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindByQueryAndFilter, getChildrenOfTypeAndFilter, saveContentEntitygetContributionStatusByUser, getNextVersion, getOtherVersion, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getVersionHistorySummaries, getVersionsLastEditedByUser, refreshContentEntity, removeHistoricalVersion, revertContentEntityBackToVersion, saveContentEntity, saveNewVersion, saveNewVersiongetByIdsAndFilterspublic DefaultCustomContentManager(CustomContentDao customContentDao, HibernateSessionManager hibernateSessionManager, com.google.common.base.Supplier<? extends WikiToStorageConverter> wikiToStorageConverterRef, com.atlassian.event.api.EventPublisher eventPublisher, ContentTypeManager contentTypeManager, RelationManager relationManager, ContentFactory contentFactory, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext, RetentionFeatureChecker retentionFeatureChecker)
@Deprecated public DefaultCustomContentManager(CustomContentDao customContentDao, HibernateSessionManager hibernateSessionManager, com.google.common.base.Supplier<? extends WikiToStorageConverter> wikiToStorageConverterRef, com.atlassian.event.api.EventPublisher eventPublisher, ContentTypeManager contentTypeManager, RelationManager relationManager, ContentFactory contentFactory, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext)
@Deprecated public DefaultCustomContentManager(CustomContentDao customContentDao, LinkManager linkManager, ConfluenceIndexer indexer, LabelManager labelManager, AttachmentManager attachmentManager, HibernateSessionManager hibernateSessionManager, com.google.common.base.Supplier<XhtmlContent> xhtmlContent, com.atlassian.event.api.EventPublisher eventPublisher, NotificationManager notificationManager, ContentTypeManager contentTypeManager, RelationManager relationManager, ContentFactory contentFactory, com.google.common.base.Supplier<UserAccessor> userAccessor, com.google.common.base.Supplier<DarkFeaturesManager> darkFeaturesManager, CollaborativeEditingHelper collaborativeEditingHelper, AuditingContext auditingContext)
public @NonNull CustomContentEntityObject newPluginContentEntityObject(String contentModuleKey)
CustomContentManagernewPluginContentEntityObject in interface CustomContentManagercontentModuleKey - the module complete key of the content's ContentAdapter modulepublic @NonNull CustomContentEntityObject updatePluginModuleKey(CustomContentEntityObject content, String pluginModuleKey)
CustomContentManagerupdatePluginModuleKey in interface CustomContentManagerpluginModuleKey - the module complete key of the content's ContentAdapter modulepublic @Nullable CustomContentEntityObject getById(long id)
CustomContentManagergetById in interface CustomContentManagergetById in interface ContentEntityManagergetById in class DefaultContentEntityManagerid - the ID of the entity to retrievepublic <T> @NonNull Iterator<T> findByQuery(ContentQuery<T> query, int offset, int maxResults)
CustomContentManagerfindByQuery in interface CustomContentManagerquery - the query to performoffset - the first result to returnmaxResults - the maximum number of results to return@Deprecated public <T> @NonNull PageResponse<T> findByQuery(ContentQuery<T> query, boolean cacheable, LimitedRequest request, com.google.common.base.Predicate<T> predicate)
CustomContentManager.findByQueryAndFilter(ContentQuery, boolean, LimitedRequest, java.util.function.Predicate)CustomContentManagerfindByQuery in interface CustomContentManagerquery - the query to performcacheable - whether the results for the given query can be cachedrequest - the limited pagination requestpredicate - the filter to apply to the resultspublic <T> T findFirstObjectByQuery(ContentQuery<T> query)
CustomContentManagerfindFirstObjectByQuery in interface CustomContentManagerquery - the query to performpublic int findTotalInSpace(Space space, String pluginContentKey)
CustomContentManagerfindTotalInSpace in interface CustomContentManagerspace - the space to count content inpluginContentKey - the plugin module complete key of the content to be searched forpublic @NonNull Iterator<CustomContentEntityObject> findCurrentInSpace(Space space, String pluginContentKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder)
CustomContentManagerfindCurrentInSpace 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 inpublic long countChildrenOfType(CustomContentEntityObject content, String contentModuleKey)
CustomContentManagercountChildrenOfType in interface CustomContentManagercontent - the content to look for children ofcontentModuleKey - the module key for the type of child to look forpublic @NonNull Iterator<CustomContentEntityObject> findChildrenOfType(CustomContentEntityObject content, String pluginContentKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder)
CustomContentManagerfindChildrenOfType 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 in@Deprecated public @NonNull PageResponse<Content> getChildrenOfType(ContentEntityObject entity, String contentModuleKey, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super CustomContentEntityObject> predicate)
CustomContentManager.getChildrenOfTypeAndFilter(ContentEntityObject, String, LimitedRequest, Expansions, Depth, java.util.function.Predicate)CustomContentManagergetChildrenOfType in interface CustomContentManagerentity - 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 CustomContentEntityObjectspublic @NonNull Iterator<CustomContentEntityObject> findAllChildren(CustomContentEntityObject content)
CustomContentManagerfindAllChildren in interface CustomContentManagercontent - the content to look for children ofpublic @NonNull Iterator<CustomContentEntityObject> findAllContainedOfType(long containerContentId, String pluginModuleKey)
CustomContentManagerfindAllContainedOfType in interface CustomContentManagercontainerContentId - the content id of the content to look contained forpluginModuleKey - the module key of the type of contained to look forpublic void removeAllInSpace(String pluginContentKey, Space space)
CustomContentManagerremoveAllInSpace 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 objectprotected void publishCreateEvent(ContentEntityObject obj, @Nullable SaveContext saveContext)
publishCreateEvent in class DefaultContentEntityManagerprotected void publishUpdateEvent(ContentEntityObject obj, @Nullable ContentEntityObject origObj, @Nullable 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)
CustomContentManagerremoveAllPluginContentInSpace in interface CustomContentManagerpublic void removeAllPluginContent(String contentModuleKey)
CustomContentManagerremoveAllPluginContent in interface CustomContentManagercontentModuleKey - the plugin module complete key of the content to be searched forpublic void removeContentEntity(ContentEntityObject obj)
ContentEntityManagerremoveContentEntity in interface ContentEntityManagerremoveContentEntity in class DefaultContentEntityManager@Deprecated public @NonNull Collection<CustomContentEntityObject> findAllInSpace(Space space)
findAllInSpace in interface CustomContentManagerspace - a spacepublic void setContentTypeManager(ContentTypeManager contentTypeManager)
public void setContentFactory(ContentFactory contentFactory)
Copyright © 2003–2021 Atlassian. All rights reserved.