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>
public class NoopContentFinder extends NoopFetcher<Content> implements ContentService.ContentFinder
- Since:
- 6.13.6, 6.14.4, 6.15.4
-
-
Constructor Summary
Constructors Constructor Description NoopContentFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PageResponse<Content>
fetchMany(ContentType type, PageRequest request)
Map<ContentType,PageResponse<Content>>
fetchMappedByContentType(PageRequest request)
ContentService.ContentFinder
withAnyStatus()
Don't restrict the fetched content on status.ContentService.ParameterContentFinder
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.ContentService.ParameterContentFinder
withCreatedDate(LocalDate time)
Restrict the fetched content to those created / published on the given dateContentService.SingleContentFetcher
withId(ContentId contentId)
Restrict the fetched content to that with the given ContentIdContentService.ParameterContentFinder
withId(ContentId first, ContentId... tail)
Restrict the fetched content to those with the given ids, requires at least two ContentIds.ContentService.ParameterContentFinder
withId(Iterable<ContentId> contentIds)
Restrict the fetched content to those with the given idsContentService.SingleContentFetcher
withIdAndVersion(ContentId contentId, int version)
Restrict the fetched content to that matching the given versionContentService.SingleContentFetcher
withLocator(ContentLocator locator)
Restrict the fetched content to that matching the given ContentLocator, a ContentLocator identifies a single piece of content.ContentService.ParameterContentFinder
withSpace(Space... space)
Restrict the fetched content to those in the given spaces.ContentService.ContentFinder
withStatus(ContentStatus... status)
Restrict the fetched content to that matching the given statuses.ContentService.ContentFinder
withStatus(Iterable<ContentStatus> statuses)
Restrict the fetched content to that matching the given statuses.ContentService.ParameterContentFinder
withTitle(String title)
Restrict the fetched content to those with the given titleContentService.ParameterContentFinder
withType(ContentType... type)
Restrict the fetched content to those matching the given contentType-
Methods 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.content.ContentService.ParameterContentFinder
withCreatedDate
-
Methods inherited from interface com.atlassian.confluence.api.service.finder.SingleFetcher
fetch, fetchOne, fetchOneOrNull, fetchOrNull
-
-
-
-
Method Detail
-
withId
public ContentService.SingleContentFetcher withId(ContentId contentId)
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
public ContentService.SingleContentFetcher withIdAndVersion(ContentId contentId, int version)
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
public ContentService.SingleContentFetcher withLocator(ContentLocator locator)
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
public ContentService.ParameterContentFinder withSpace(Space... space)
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
public ContentService.ParameterContentFinder withType(ContentType... type)
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
public ContentService.ParameterContentFinder withCreatedDate(LocalDate time)
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
public ContentService.ParameterContentFinder withTitle(String title)
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
public ContentService.ParameterContentFinder withContainer(Container container)
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
public ContentService.ParameterContentFinder withId(ContentId first, ContentId... tail)
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
public ContentService.ParameterContentFinder withId(Iterable<ContentId> contentIds)
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
public ContentService.ContentFinder withStatus(ContentStatus... status)
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
public ContentService.ContentFinder withStatus(Iterable<ContentStatus> statuses)
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
public ContentService.ContentFinder 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
-
fetchMany
public PageResponse<Content> fetchMany(ContentType type, PageRequest request) throws ServiceException
- Specified by:
fetchMany
in interfaceContentService.ContentFetcher
- Throws:
ServiceException
-
fetchMappedByContentType
public Map<ContentType,PageResponse<Content>> fetchMappedByContentType(PageRequest request) throws ServiceException
- Specified by:
fetchMappedByContentType
in interfaceContentService.ContentFetcher
- Throws:
ServiceException
-
-