Class NoopContentFinder
java.lang.Object
com.atlassian.confluence.impl.service.finder.NoopFetcher<Content>
com.atlassian.confluence.impl.service.finder.content.NoopContentFinder
- All Implemented Interfaces:
ContentService.ContentFetcher
,ContentService.ContentFinder
,ContentService.ParameterContentFinder
,ContentService.SingleContentFetcher
,ManyFetcher<Content>
,SingleFetcher<Content>
- Since:
- 6.13.6, 6.14.4, 6.15.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
fetchMany
(ContentType type, PageRequest request) fetchManyWithAnyType
(PageRequest request) fetchManyWithoutCaching
(ContentType type, PageRequest request) fetchMappedByContentType
(PageRequest request) Don't restrict the fetched content on status.withContainer
(Container container) Restrict the fetched content to those with the given Container, this will by proxy restrict to certain types of content, as different types of content can have different types of containers.withCreatedDate
(LocalDate time) Restrict the fetched content to those created / published on the given dateRestrict the fetched content to that with the given ContentIdRestrict the fetched content to those with the given ids, requires at least two ContentIds.Restrict the fetched content to those with the given idswithIdAndVersion
(ContentId contentId, int version) Restrict the fetched content to that matching the given versionwithLocator
(ContentLocator locator) Restrict the fetched content to that matching the given ContentLocator, a ContentLocator identifies a single piece of content.Restrict the fetched content to those in the given spaces.withStatus
(ContentStatus... status) Restrict the fetched content to that matching the given statuses.withStatus
(Iterable<ContentStatus> statuses) Restrict the fetched content to that matching the given statuses.Restrict the fetched content to those with the given titlewithType
(ContentType... type) Restrict the fetched content to those matching the given contentTypeMethods inherited from class com.atlassian.confluence.impl.service.finder.NoopFetcher
fetch, fetchMany
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.api.service.finder.SingleFetcher
fetch, fetchOneOrNull, fetchOrNull
-
Constructor Details
-
NoopContentFinder
public NoopContentFinder()
-
-
Method Details
-
canExpand
- Specified by:
canExpand
in interfaceContentService.ContentFinder
- Parameters:
expansion
- the expansion to check- Returns:
- true if the finder can expand the property
-
withId
Description copied from interface:ContentService.ContentFinder
Restrict the fetched content to that with the given ContentId- Specified by:
withId
in interfaceContentService.ContentFinder
- Parameters:
contentId
- the id of the content to fetch- Returns:
- a SingleContentFetcher that will fetch a single piece of content if it exists
-
withIdAndVersion
Description copied from interface:ContentService.ContentFinder
Restrict the fetched content to that matching the given version- Specified by:
withIdAndVersion
in interfaceContentService.ContentFinder
- Returns:
- a finder with the version restrictions applied
-
withLocator
Description copied from interface:ContentService.ContentFinder
Restrict the fetched content to that matching the given ContentLocator, a ContentLocator identifies a single piece of content.- Specified by:
withLocator
in interfaceContentService.ContentFinder
- Parameters:
locator
- the content locator to use to find the content- Returns:
- a single content fetcher that fetches the content matched by the content locator
-
withSpace
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to those in the given spaces.Currently only fetching by a single space is supported
- Specified by:
withSpace
in interfaceContentService.ParameterContentFinder
- Parameters:
space
- the spaces to restrict the found content to- Returns:
- this ContentFinder with the space restriction applied
-
withType
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to those matching the given contentType- Specified by:
withType
in interfaceContentService.ParameterContentFinder
- Parameters:
type
- - the contentType to restrict to- Returns:
- this ContentFinder with the contentType restriction applied
-
withCreatedDate
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to those created / published on the given date- Specified by:
withCreatedDate
in interfaceContentService.ParameterContentFinder
- Parameters:
time
- - the publish date to restrict the content- Returns:
- this ContentFinder with the creation date restriction applied
-
withTitle
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to those with the given title- Specified by:
withTitle
in interfaceContentService.ParameterContentFinder
- Parameters:
title
- the title to restrict the content to- Returns:
- this ContentFinder with the title restriction applied
-
withContainer
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to those with the given Container, this will by proxy restrict to certain types of content, as different types of content can have different types of containers.- Specified by:
withContainer
in interfaceContentService.ParameterContentFinder
- Parameters:
container
- the container to restrict the content to- Returns:
- this ContentFinder with the container restriction applied
-
withId
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to those with the given ids, requires at least two ContentIds.- Specified by:
withId
in interfaceContentService.ParameterContentFinder
- Returns:
- this ContentFinder with the restrictions applied
-
withId
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to those with the given ids- Specified by:
withId
in interfaceContentService.ParameterContentFinder
- Parameters:
contentIds
- - the list of contentIds to restrict to- Returns:
- this ContentFinder with the restrictions applied
-
withStatus
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to that matching the given statuses.Default status is "current" - only current content is found.
- Specified by:
withStatus
in interfaceContentService.ParameterContentFinder
- Parameters:
status
- - the ContentStatus(es) to restrict to- Returns:
- a finder with the ContentStatus restrictions applied
-
withStatus
Description copied from interface:ContentService.ParameterContentFinder
Restrict the fetched content to that matching the given statuses.Default status is "current" - only current content is found.
- Specified by:
withStatus
in interfaceContentService.ParameterContentFinder
- Parameters:
statuses
- an iterable of ContentStatus(es) to restrict to- Returns:
- a finder with the ContentStatus restrictions applied
-
withAnyStatus
Description copied from interface:ContentService.ParameterContentFinder
Don't restrict the fetched content on status.Default status is "current" - if this method is not called, only current content is found.
- Specified by:
withAnyStatus
in interfaceContentService.ParameterContentFinder
- Returns:
- a finder with no ContentStatus restrictions applied
-
fetchManyWithoutCaching
public PageResponse<Content> fetchManyWithoutCaching(ContentType type, PageRequest request) throws ServiceException - Specified by:
fetchManyWithoutCaching
in interfaceContentService.ContentFetcher
- Throws:
ServiceException
-
fetchMany
public PageResponse<Content> fetchMany(ContentType type, PageRequest request) throws ServiceException - Specified by:
fetchMany
in interfaceContentService.ContentFetcher
- Throws:
ServiceException
-
fetchManyWithAnyType
- Specified by:
fetchManyWithAnyType
in interfaceContentService.ContentFetcher
- Throws:
ServiceException
-
fetchMappedByContentType
public Map<ContentType,PageResponse<Content>> fetchMappedByContentType(PageRequest request) throws ServiceException - Specified by:
fetchMappedByContentType
in interfaceContentService.ContentFetcher
- Throws:
ServiceException
-