Class AbstractContentFinder
java.lang.Object
com.atlassian.confluence.api.impl.service.content.finder.AbstractFinder<Content>
com.atlassian.confluence.api.impl.service.content.finder.AbstractContentFinder
- All Implemented Interfaces:
ContentService.ContentFetcher
,ContentService.ContentFinder
,ContentService.ParameterContentFinder
,ContentService.SingleContentFetcher
,SingleFetcher<Content>
- Direct Known Subclasses:
ContentFinderImpl
public abstract class AbstractContentFinder
extends AbstractFinder<Content>
implements ContentService.ContentFinder
-
Field Summary
Fields inherited from class com.atlassian.confluence.api.impl.service.content.finder.AbstractFinder
expansions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPredicate<? super ContentEntityObject>
gets the filters in this Finder as a predicates, entities that are accepted by this predicate match the finder criteriaprotected Predicate<? super ContentEntityObject>
gets the filters in this Finder as a predicate with the addition of adding a contentType predicate for the given content type.protected Predicate<? super ContentEntityObject>
asPredicateWithContentTypes
(ContentType... types) boolean
getTitle()
int
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 createdDate) 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 versionRestrict 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.api.impl.service.content.finder.AbstractFinder
getExpansions
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.ContentFetcher
fetchMany, fetchManyWithAnyType, fetchManyWithoutCaching, fetchMappedByContentType
Methods inherited from interface com.atlassian.confluence.api.service.content.ContentService.ContentFinder
withLocator
Methods inherited from interface com.atlassian.confluence.api.service.finder.SingleFetcher
fetch, fetchOneOrNull, fetchOrNull
-
Constructor Details
-
AbstractContentFinder
-
-
Method Details
-
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
-
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
-
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:
createdDate
- - 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
-
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
-
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
-
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
-
canExpand
- Specified by:
canExpand
in interfaceContentService.ContentFinder
- Parameters:
expansion
- the expansion to check- Returns:
- true if the finder can expand the property
-
asPredicateWithContentType
gets the filters in this Finder as a predicate with the addition of adding a contentType predicate for the given content type.- Parameters:
type
-- Returns:
-
asPredicateWithContentTypes
-
asPredicate
gets the filters in this Finder as a predicates, entities that are accepted by this predicate match the finder criteria- Returns:
- a predicate representation of this finder
-
getSpaces
-
getContentTypes
-
getCreatedDate
-
getTitle
-
getVersion
public int getVersion() -
getContentId
-
getContentContainerId
-
getStatuses
-
getContentIds
-