Interface RemoteContentBodyConversionService
- All Known Implementing Classes:
RemoteContentBodyConversionServiceImpl
@ExperimentalApi
public interface RemoteContentBodyConversionService
ContentBodyConversionService
implementation that communicates with Confluence remotely using the Confluence REST api.
Provides future returning equivalents for the methods in ContentBodyConversionService.
-
Method Summary
Modifier and TypeMethodDescriptionconvertCompletionStage
(ContentBody body, ContentRepresentation representation) Convert a ContentBody value into another format, performing validation during the conversion.convertCompletionStage
(ContentBody body, ContentRepresentation representation, Expansion... expansions) Convert a ContentBody value into another format, performing validation during the conversion.
-
Method Details
-
convertCompletionStage
CompletionStage<ContentBody> convertCompletionStage(ContentBody body, ContentRepresentation representation) throws BadRequestException Convert a ContentBody value into another format, performing validation during the conversion.- Parameters:
body
- the content to convertrepresentation
- theContentRepresentation
to convert to- Returns:
- the converted body
- Throws:
BadRequestException
- if any validation errors are found during the conversion- Since:
- 9.0
-
convertCompletionStage
CompletionStage<ContentBody> convertCompletionStage(ContentBody body, ContentRepresentation representation, Expansion... expansions) throws BadRequestException Convert a ContentBody value into another format, performing validation during the conversion.- Parameters:
body
- the content to convertrepresentation
- theContentRepresentation
to convert toexpansions
- determins the expansion done on the conversion. This expansion must match the expansions available toContentBody
. An example expansion string would be'webresource'
.- Returns:
- the converted body
- Throws:
BadRequestException
- if any validation errors are found during the conversionNotFoundException
- if the contentBody specifies a contentId that does not exist- Since:
- 9.0
-