Interface ContentService.ParameterContentFinder
- All Superinterfaces:
ContentService.ContentFetcher
,ContentService.SingleContentFetcher
,SingleFetcher<Content>
- All Known Subinterfaces:
ContentService.ContentFinder
- All Known Implementing Classes:
NoopContentFinder
- Enclosing interface:
ContentService
A content finder allowing various parameters to be set to restrict the fetched content.
This interface exists primarily to separate out the methods that identify a single piece of content, to those that restrict a collection of content based on a parameter.
-
Method Summary
Modifier and TypeMethodDescriptionDon'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 those with the given ids, requires at least two ContentIds.Restrict the fetched content to those with the given idsRestrict 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 interface com.atlassian.confluence.api.service.content.ContentService.ContentFetcher
fetchMany, fetchMappedByContentType
Methods inherited from interface com.atlassian.confluence.api.service.finder.SingleFetcher
fetch, fetchOneOrNull, fetchOrNull
-
Method Details
-
withSpace
Restrict the fetched content to those in the given spaces.Currently only fetching by a single space is supported
- Parameters:
space
- the spaces to restrict the found content to- Returns:
- this ContentFinder with the space restriction applied
-
withType
Restrict the fetched content to those matching the given contentType- Parameters:
type
- - the contentType to restrict to- Returns:
- this ContentFinder with the contentType restriction applied
-
withCreatedDate
Restrict the fetched content to those created / published on the given date- Parameters:
time
- - the publish date to restrict the content- Returns:
- this ContentFinder with the creation date restriction applied
-
withTitle
Restrict the fetched content to those with the given title- Parameters:
title
- the title to restrict the content to- Returns:
- this ContentFinder with the title restriction applied
-
withContainer
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.- Parameters:
container
- the container to restrict the content to- Returns:
- this ContentFinder with the container restriction applied
-
withId
Restrict the fetched content to those with the given ids, requires at least two ContentIds.- Returns:
- this ContentFinder with the restrictions applied
-
withId
Restrict the fetched content to those with the given ids- Parameters:
contentIds
- - the list of contentIds to restrict to- Returns:
- this ContentFinder with the restrictions applied
-
withStatus
Restrict the fetched content to that matching the given statuses.Default status is "current" - only current content is found.
- Parameters:
status
- - the ContentStatus(es) to restrict to- Returns:
- a finder with the ContentStatus restrictions applied
-
withStatus
Restrict the fetched content to that matching the given statuses.Default status is "current" - only current content is found.
- Parameters:
statuses
- an iterable of ContentStatus(es) to restrict to- Returns:
- a finder with the ContentStatus restrictions applied
-
withAnyStatus
ContentService.ContentFinder withAnyStatus()Don't restrict the fetched content on status.Default status is "current" - if this method is not called, only current content is found.
- Returns:
- a finder with no ContentStatus restrictions applied
-