Class RemoteContentBodyConversionServiceImpl
java.lang.Object
com.atlassian.confluence.rest.client.AbstractRemoteService<ContentBodyConversionService>
com.atlassian.confluence.rest.client.RemoteContentBodyConversionServiceImpl
- All Implemented Interfaces:
RemoteContentBodyConversionService
public class RemoteContentBodyConversionServiceImpl
extends AbstractRemoteService<ContentBodyConversionService>
implements RemoteContentBodyConversionService
ContentBodyConversionService
implementation that communicates with Confluence remotely.-
Field Summary
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteContentBodyConversionServiceImpl
(AuthenticatedWebResourceProvider provider, ExecutorService executor) -
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.Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfGenericListResponse, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, newExperimentalRestWebTarget, newWebTarget, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postVoidCompletionStage, putCompletionStage, putVoidCompletionStage
-
Constructor Details
-
RemoteContentBodyConversionServiceImpl
public RemoteContentBodyConversionServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor) - Since:
- 9.0
-
-
Method Details
-
convertCompletionStage
public CompletionStage<ContentBody> convertCompletionStage(ContentBody body, ContentRepresentation representation) throws BadRequestException Description copied from interface:RemoteContentBodyConversionService
Convert a ContentBody value into another format, performing validation during the conversion.- Specified by:
convertCompletionStage
in interfaceRemoteContentBodyConversionService
- 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
-
convertCompletionStage
public CompletionStage<ContentBody> convertCompletionStage(ContentBody body, ContentRepresentation representation, Expansion... expansions) throws BadRequestException Description copied from interface:RemoteContentBodyConversionService
Convert a ContentBody value into another format, performing validation during the conversion.- Specified by:
convertCompletionStage
in interfaceRemoteContentBodyConversionService
- 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 conversion
-