Class Content.ContentBuilder
java.lang.Object
com.atlassian.confluence.api.model.content.Content.ContentBuilder
- Enclosing class:
- Content
Builds
Content objects.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedContentBuilder(ContentType type) Create new builders withContent.builder(ContentType).protectedContentBuilder(ContentType type, long id) Create new builders withContent.builder(ContentType)and aContentIdgenerated from the ContentType and the Long id.protectedContentBuilder(ContentType type, ContentId id) Create new builders withContent.builder(ContentType)and aContentId. -
Method Summary
Modifier and TypeMethodDescriptionbody(ContentBody body) body(String value, ContentRepresentation format) body(Map<ContentRepresentation, ContentBody> body) build()children(Map<ContentType, PageResponse<Content>> children) Set all collapsible Reference/Map/List fields to be collapsed rather than empty values.descendants(Map<ContentType, PageResponse<Content>> descendants) extensions(Map<String, Object> extensions) operations(Iterable<OperationCheckResult> operations) Shortcut method for creating ancestors with a single item of Contentposition(int position) relevantViewRestrictions(RelevantViewRestrictions relevantViewRestrictions) relevantViewRestrictionsReference(Reference<RelevantViewRestrictions> relevantViewRestrictions) restrictions(Map<OperationKey, ContentRestriction> restrictionsByOperationMap) status(ContentStatus status) type(ContentType type)
-
Constructor Details
-
ContentBuilder
Create new builders withContent.builder(ContentType). -
ContentBuilder
Create new builders withContent.builder(ContentType)and aContentId. -
ContentBuilder
Create new builders withContent.builder(ContentType)and aContentIdgenerated from the ContentType and the Long id.
-
-
Method Details
-
collapsed
Set all collapsible Reference/Map/List fields to be collapsed rather than empty values.This is useful as a starting point when building Content for a REST response, but the Collapsed instances won't have properties or navigation builders set, so you should still set navigable values into collapsible properties where possible: e.g. see
Space.buildReference(String).- Returns:
- this ContentBuilder with all collapsible fields set to be collapsed
-
type
-
build
-
id
-
status
-
title
-
addLink
-
addLink
-
history
-
history
-
space
-
space
-
space
-
container
-
container
-
parent
Shortcut method for creating ancestors with a single item of Content- Parameters:
parent- the parent Content- Returns:
- this builder
-
ancestors
-
operations
-
children
-
descendants
-
body
-
body
-
body
-
metadata
-
extensions
-
extension
-
version
-
version
-
restrictions
public Content.ContentBuilder restrictions(Map<OperationKey, ContentRestriction> restrictionsByOperationMap) -
relevantViewRestrictions
public Content.ContentBuilder relevantViewRestrictions(RelevantViewRestrictions relevantViewRestrictions) -
relevantViewRestrictionsReference
public Content.ContentBuilder relevantViewRestrictionsReference(Reference<RelevantViewRestrictions> relevantViewRestrictions) -
position
- Since:
- 8.9.0
-