Class AbstractRemoteService<P>
- java.lang.Object
-
- com.atlassian.confluence.rest.client.AbstractRemoteService<P>
-
- Type Parameters:
P
- - the interface of the local service that this is a remote service of, used by RemoteServiceProxyCreator
- Direct Known Subclasses:
AbstractRemoteChildContentService
,AbstractRemoteChildContentService.AbstractRemoteChildContentFinder
,AbstractRemoteContentLabelService
,AbstractRemoteContentService
,AbstractRemoteContentService.AbstractRemoteContentFinder
,AbstractRemoteWebView
,AbstractRemoteWebViewService
,RemoteAccessModeServiceImpl
,RemoteAttachmentServiceImpl
,RemoteAttachmentServiceImpl.RemoteAttachmentFinderImpl
,RemoteAuditServiceImpl
,RemoteContentBlueprintServiceImpl
,RemoteContentBodyConversionServiceImpl
,RemoteContentDraftServiceImpl
,RemoteContentMacroServiceImpl
,RemoteContentMacroServiceImpl.RemoteMacroFinderImpl
,RemoteContentPropertyServiceImpl
,RemoteContentPropertyServiceImpl.RemoteContentPropertyFinderImpl
,RemoteContentRestrictionServiceImpl
,RemoteContentTemplateServiceImpl
,RemoteContentTemplateServiceImpl.RemoteTemplateFinderImpl
,RemoteContentTrashServiceImpl
,RemoteContentVersionServiceImpl
,RemoteContentVersionServiceImpl.RemoteVersionFinderImpl
,RemoteCQLSearchServiceImpl
,RemoteGroupServiceImpl
,RemoteGroupServiceImpl.RemoteGroupFinderImpl
,RemoteLongTaskServiceImpl
,RemotePersonServiceImpl
,RemotePersonServiceImpl.RemotePersonFinderImpl
,RemoteRelationServiceImpl
,RemoteSpacePropertyServiceImpl
,RemoteSpacePropertyServiceImpl.RemoteSpacePropertyFinderImpl
,RemoteSpaceServiceImpl
,RemoteSpaceServiceImpl.RemoteSpaceContentFinderImpl
,RemoteSpaceServiceImpl.RemoteSpaceFinderImpl
,RemoteWatchServiceImpl
public abstract class AbstractRemoteService<P> extends Object
Common parent class of all Confluence API Remote Service implementations, handling authentication and REST infrastructure.
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthenticatedWebResourceProvider
provider
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRemoteService(AbstractRemoteService other)
protected
AbstractRemoteService(AuthenticatedWebResourceProvider provider, PromisingExecutorService executor)
protected
AbstractRemoteService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected com.sun.jersey.api.client.WebResource
addExpansions(com.sun.jersey.api.client.WebResource resource, @Nullable Expansion[] expansions)
add the expansions to the WebResource as a query param, this specifies which properties on the results to expandprotected com.sun.jersey.api.client.WebResource
addPageRequest(com.sun.jersey.api.client.WebResource resource, PageRequest pageRequest)
protected com.sun.jersey.api.client.WebResource
addPageRequestParams(com.sun.jersey.api.client.WebResource resource, @Nullable PageRequest request)
Adds start and limit query params to honour the pageRequest valuesprotected CompletionStage<Void>
deleteCompletionStage(com.sun.jersey.api.client.WebResource resource)
protected <T> CompletionStage<T>
deleteCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends T> responseClass)
protected com.atlassian.util.concurrent.Promise<Void>
deleteFuture(com.sun.jersey.api.client.WebResource resource)
Deprecated.since 7.0.1.protected <T> com.atlassian.util.concurrent.Promise<T>
deleteFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends T> responseClass)
Deprecated.since 7.0.1.protected <T> CompletionStage<T>
getCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
protected <E> CompletionStage<Iterable<E>>
getCompletionStageGenericCollection(com.sun.jersey.api.client.WebResource resource, Class<? extends Iterable> collectionType, Class<E> contentType)
protected <K,V>
CompletionStage<Map<K,V>>getCompletionStageMap(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> valueClass)
protected <K,V>
CompletionStage<Map<K,PageResponse<V>>>getCompletionStageMapOfPageResponses(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> listContentClass)
protected <T> CompletionStage<Optional<T>>
getCompletionStageOptional(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
protected <E> CompletionStage<PageResponse<E>>
getCompletionStagePageResponseList(com.sun.jersey.api.client.WebResource resource, Class<E> contentClass)
protected <E> CompletionStage<SearchPageResponse<E>>
getCompletionStageSearchPageResponseList(com.sun.jersey.api.client.WebResource resource, Class<E> contentClass)
protected Executor
getExecutor()
protected <T> com.atlassian.util.concurrent.Promise<T>
getFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
Deprecated.since 7.0.1.protected <E> com.atlassian.util.concurrent.Promise<Iterable<E>>
getFutureGenericCollection(com.sun.jersey.api.client.WebResource resource, Class<? extends Iterable> collectionType, Class<E> contentType)
Deprecated.since 7.0.1.protected <K,V>
com.atlassian.util.concurrent.Promise<Map<K,V>>getFutureMap(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> valueClass)
Deprecated.since 7.0.1.protected <K,V>
com.atlassian.util.concurrent.Promise<Map<K,PageResponse<V>>>getFutureMapOfPageResponses(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> listContentClass)
Deprecated.since 7.0.1.protected <T> com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<T>>
getFutureOption(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
Deprecated.since 7.0.1.protected <E> com.atlassian.util.concurrent.Promise<PageResponse<E>>
getFuturePageResponseList(com.sun.jersey.api.client.WebResource resource, Class<E> contentClass)
Deprecated.since 7.0.1.protected com.sun.jersey.api.client.WebResource
newExperimentalRestWebResource()
protected com.sun.jersey.api.client.WebResource
newRestWebResource()
protected <E> CompletionStage<E>
postCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity)
protected <E> CompletionStage<E>
postCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity, javax.ws.rs.core.MediaType mediaType)
protected <E> CompletionStage<E>
postCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<E> collectionClass, Class contentType, Object postEntity)
protected <T> CompletionStage<PageResponse<T>>
postCompletionStageToPageResponse(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, Object postEntity, javax.ws.rs.core.MediaType mediaType)
protected <E> com.atlassian.util.concurrent.Promise<E>
postFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity)
Deprecated.since 7.0.1.protected <E> com.atlassian.util.concurrent.Promise<E>
postFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity, javax.ws.rs.core.MediaType mediaType)
Deprecated.since 7.0.1.protected <E> com.atlassian.util.concurrent.Promise<E>
postFuture(com.sun.jersey.api.client.WebResource resource, Class<E> collectionClass, Class contentType, Object postEntity)
Deprecated.since 7.0.1.protected <T> com.atlassian.util.concurrent.Promise<PageResponse<T>>
postFutureToPageResponse(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, Object postEntity, javax.ws.rs.core.MediaType mediaType)
Deprecated.since 7.0.1.protected <T> CompletionStage<T>
putCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass, @Nullable Object putEntity)
protected <T> com.atlassian.util.concurrent.Promise<T>
putFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass, @Nullable Object putEntity)
Deprecated.since 7.0.1.
-
-
-
Field Detail
-
provider
protected final AuthenticatedWebResourceProvider provider
-
-
Constructor Detail
-
AbstractRemoteService
protected AbstractRemoteService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
AbstractRemoteService
protected AbstractRemoteService(AbstractRemoteService other)
-
AbstractRemoteService
protected AbstractRemoteService(AuthenticatedWebResourceProvider provider, PromisingExecutorService executor)
-
-
Method Detail
-
getExecutor
protected Executor getExecutor()
-
newRestWebResource
protected com.sun.jersey.api.client.WebResource newRestWebResource()
-
newExperimentalRestWebResource
protected com.sun.jersey.api.client.WebResource newExperimentalRestWebResource()
-
getFuture
@Deprecated protected <T> com.atlassian.util.concurrent.Promise<T> getFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
Deprecated.since 7.0.1. UsegetCompletionStage(WebResource, Class)
instead.
-
getCompletionStage
protected <T> CompletionStage<T> getCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
- Since:
- 7.0.1
-
getFutureOption
@Deprecated protected <T> com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<T>> getFutureOption(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
Deprecated.since 7.0.1. UsegetCompletionStageOptional(WebResource, Class)
instead.
-
getCompletionStageOptional
protected <T> CompletionStage<Optional<T>> getCompletionStageOptional(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass)
- Since:
- 7.0.1
-
getFuturePageResponseList
@Deprecated protected <E> com.atlassian.util.concurrent.Promise<PageResponse<E>> getFuturePageResponseList(com.sun.jersey.api.client.WebResource resource, Class<E> contentClass)
Deprecated.since 7.0.1. UsegetCompletionStagePageResponseList(WebResource, Class)
instead.
-
getCompletionStagePageResponseList
protected <E> CompletionStage<PageResponse<E>> getCompletionStagePageResponseList(com.sun.jersey.api.client.WebResource resource, Class<E> contentClass)
- Since:
- 7.0.1
-
getCompletionStageSearchPageResponseList
protected <E> CompletionStage<SearchPageResponse<E>> getCompletionStageSearchPageResponseList(com.sun.jersey.api.client.WebResource resource, Class<E> contentClass)
- Since:
- 7.0.1
-
getFutureMapOfPageResponses
@Deprecated protected <K,V> com.atlassian.util.concurrent.Promise<Map<K,PageResponse<V>>> getFutureMapOfPageResponses(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> listContentClass)
Deprecated.since 7.0.1. UsegetCompletionStageMapOfPageResponses(WebResource, Class, Class)
instead.
-
getCompletionStageMapOfPageResponses
protected <K,V> CompletionStage<Map<K,PageResponse<V>>> getCompletionStageMapOfPageResponses(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> listContentClass)
- Since:
- 7.0.1
-
getFutureMap
@Deprecated protected <K,V> com.atlassian.util.concurrent.Promise<Map<K,V>> getFutureMap(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> valueClass)
Deprecated.since 7.0.1. UsegetCompletionStageMap(WebResource, Class, Class)
instead.
-
getCompletionStageMap
protected <K,V> CompletionStage<Map<K,V>> getCompletionStageMap(com.sun.jersey.api.client.WebResource resource, Class<K> keyClass, Class<V> valueClass)
- Since:
- 7.0.1
-
getFutureGenericCollection
@Deprecated protected <E> com.atlassian.util.concurrent.Promise<Iterable<E>> getFutureGenericCollection(com.sun.jersey.api.client.WebResource resource, Class<? extends Iterable> collectionType, Class<E> contentType)
Deprecated.since 7.0.1. UsegetCompletionStageGenericCollection(WebResource, Class, Class)
instead.
-
getCompletionStageGenericCollection
protected <E> CompletionStage<Iterable<E>> getCompletionStageGenericCollection(com.sun.jersey.api.client.WebResource resource, Class<? extends Iterable> collectionType, Class<E> contentType)
- Since:
- 7.0.1
-
postFuture
@Deprecated protected <E> com.atlassian.util.concurrent.Promise<E> postFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity)
Deprecated.since 7.0.1. UsepostCompletionStage(WebResource, Class, Object)
instead.
-
postCompletionStage
protected <E> CompletionStage<E> postCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity)
- Since:
- 7.0.1
-
postFuture
@Deprecated protected <E> com.atlassian.util.concurrent.Promise<E> postFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity, javax.ws.rs.core.MediaType mediaType)
Deprecated.since 7.0.1. UsepostCompletionStage(WebResource, Class, Object, MediaType)
instead.
-
postCompletionStage
protected <E> CompletionStage<E> postCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends E> entityClass, @Nullable Object postEntity, javax.ws.rs.core.MediaType mediaType)
- Since:
- 7.0.1
-
postFuture
@Deprecated protected <E> com.atlassian.util.concurrent.Promise<E> postFuture(com.sun.jersey.api.client.WebResource resource, Class<E> collectionClass, Class contentType, Object postEntity)
Deprecated.since 7.0.1. UsepostCompletionStage(WebResource, Class, Class, Object)
instead.
-
postCompletionStage
protected <E> CompletionStage<E> postCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<E> collectionClass, Class contentType, Object postEntity)
- Since:
- 7.0.1
-
postFutureToPageResponse
@Deprecated protected <T> com.atlassian.util.concurrent.Promise<PageResponse<T>> postFutureToPageResponse(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, Object postEntity, javax.ws.rs.core.MediaType mediaType)
Deprecated.since 7.0.1. UsepostCompletionStageToPageResponse(WebResource, Class, Object, MediaType)
instead.
-
postCompletionStageToPageResponse
protected <T> CompletionStage<PageResponse<T>> postCompletionStageToPageResponse(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, Object postEntity, javax.ws.rs.core.MediaType mediaType)
- Since:
- 7.0.1
-
putFuture
@Deprecated protected <T> com.atlassian.util.concurrent.Promise<T> putFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass, @Nullable Object putEntity)
Deprecated.since 7.0.1. UseputCompletionStage(WebResource, Class, Object)
instead.
-
putCompletionStage
protected <T> CompletionStage<T> putCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends T> entityClass, @Nullable Object putEntity)
- Since:
- 7.0.1
-
deleteFuture
@Deprecated protected com.atlassian.util.concurrent.Promise<Void> deleteFuture(com.sun.jersey.api.client.WebResource resource)
Deprecated.since 7.0.1. UsedeleteCompletionStage(WebResource)
instead.
-
deleteCompletionStage
protected CompletionStage<Void> deleteCompletionStage(com.sun.jersey.api.client.WebResource resource)
- Since:
- 7.0.1
-
deleteFuture
@Deprecated protected <T> com.atlassian.util.concurrent.Promise<T> deleteFuture(com.sun.jersey.api.client.WebResource resource, Class<? extends T> responseClass)
Deprecated.since 7.0.1. UsedeleteCompletionStage(WebResource, Class)
instead.
-
deleteCompletionStage
protected <T> CompletionStage<T> deleteCompletionStage(com.sun.jersey.api.client.WebResource resource, Class<? extends T> responseClass)
- Since:
- 7.0.1
-
addExpansions
protected com.sun.jersey.api.client.WebResource addExpansions(com.sun.jersey.api.client.WebResource resource, @Nullable Expansion[] expansions)
add the expansions to the WebResource as a query param, this specifies which properties on the results to expand- Parameters:
resource
- - the WebResource to add the query param to, a copy of this resource will be returnedexpansions
- - the expansions to add- Returns:
- a new WebResource with the expansions added to it
-
addPageRequestParams
protected com.sun.jersey.api.client.WebResource addPageRequestParams(com.sun.jersey.api.client.WebResource resource, @Nullable PageRequest request)
Adds start and limit query params to honour the pageRequest values- Parameters:
resource
- - the resource to add the query params torequest
- - the pageRequest supplying the values for the query params, may be null
-
addPageRequest
protected com.sun.jersey.api.client.WebResource addPageRequest(com.sun.jersey.api.client.WebResource resource, PageRequest pageRequest)
-
-