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
Constructors Constructor Description RemoteContentBodyConversionServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executorService)
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, deleteFuture, deleteFuture, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, getFuture, getFutureGenericCollection, getFutureMap, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, putCompletionStage, putFuture
-
-
-
-
Constructor Detail
-
RemoteContentBodyConversionServiceImpl
public RemoteContentBodyConversionServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executorService)
-
-
Method Detail
-
convert
@Deprecated public com.atlassian.util.concurrent.Promise<ContentBody> convert(ContentBody body, ContentRepresentation representation) throws BadRequestException
Deprecated.since 7.0.1. UseconvertCompletionStage(ContentBody, ContentRepresentation)
instead.Description copied from interface:RemoteContentBodyConversionService
Convert a ContentBody value into another format, performing validation during the conversion.- Specified by:
convert
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
-
convert
@Deprecated public 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.Description copied from interface:RemoteContentBodyConversionService
Convert a ContentBody value into another format, performing validation during the conversion.- Specified by:
convert
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
-
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
-
-