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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<ContentBody>
convert(ContentBody body, ContentRepresentation representation)
Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<ContentBody>
convert(ContentBody body, ContentRepresentation representation, Expansion... expansions)
Deprecated.since 7.0.1.CompletionStage<ContentBody>
convertCompletionStage(ContentBody body, ContentRepresentation representation)
Convert a ContentBody value into another format, performing validation during the conversion.CompletionStage<ContentBody>
convertCompletionStage(ContentBody body, ContentRepresentation representation, Expansion... expansions)
Convert a ContentBody value into another format, performing validation during the conversion.
-
-
-
Method Detail
-
convert
@Deprecated com.atlassian.util.concurrent.Promise<ContentBody> convert(ContentBody body, ContentRepresentation representation) throws BadRequestException
Deprecated.since 7.0.1. UseconvertCompletionStage(ContentBody, ContentRepresentation)
instead.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
-
convert
@Deprecated com.atlassian.util.concurrent.Promise<ContentBody> convert(ContentBody body, ContentRepresentation representation, Expansion... expansions) throws BadRequestException
Deprecated.since 7.0.1. UseconvertCompletionStage(ContentBody, ContentRepresentation, Expansion...)
instead.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
-
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:
- 7.0.1
-
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:
- 7.0.1
-
-