com.atlassian.confluence.rest.client
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:
- RemoteAttachmentServiceImpl, RemoteAttachmentServiceImpl.RemoteAttachmentFinderImpl, RemoteChildContentServiceImpl, RemoteChildContentServiceImpl.RemoteChildContentFinderImpl, RemoteContentBodyConversionServiceImpl, RemoteContentLabelServiceImpl, RemoteContentMacroServiceImpl, RemoteContentMacroServiceImpl.RemoteMacroFinderImpl, RemoteContentPropertyServiceImpl, RemoteContentPropertyServiceImpl.RemoteContentPropertyFinderImpl, RemoteContentServiceImpl, RemoteContentServiceImpl.RemoteContentFinderImpl, RemoteCQLSearchServiceImpl, RemoteLongTaskServiceImpl, RemoteSpaceServiceImpl, RemoteSpaceServiceImpl.RemoteSpaceContentFinderImpl, RemoteSpaceServiceImpl.RemoteSpaceFinderImpl
public abstract class AbstractRemoteService<P>
- extends java.lang.Object
Common parent class of all Confluence API Remote Service implementations, handling authentication and REST
infrastructure.
Method Summary |
protected com.sun.jersey.api.client.WebResource |
addExpansions(com.sun.jersey.api.client.WebResource resource,
Expansion[] expansions)
add the expansions to the WebResource as a query param, this specifies which properties
on the results to expand |
protected 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,
PageRequest request)
Adds start and limit query params to honour the pageRequest values |
protected com.atlassian.util.concurrent.Promise<java.lang.Void> |
deleteFuture(com.sun.jersey.api.client.WebResource resource)
|
protected
<T> com.atlassian.util.concurrent.Promise<T> |
|
deleteFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends T> responseClass)
|
protected
<E> com.atlassian.util.concurrent.Promise<? extends java.lang.Iterable<E>> |
|
getFutureGenericCollection(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends java.lang.Iterable> collectionType,
java.lang.Class<E> contentType)
|
protected
<K,V> com.atlassian.util.concurrent.Promise<java.util.Map<K,PageResponse<V>>> |
|
getFutureMapOfPageResponses(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<K> keyClass,
java.lang.Class<V> listContentClass)
|
protected
<T> com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<T>> |
|
getFutureOption(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends T> entityClass)
|
protected
|
getFuturePageResponseList(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<E> contentClass)
|
protected com.sun.jersey.api.client.WebResource |
newExperimentalRestWebResource()
|
protected com.sun.jersey.api.client.WebResource |
newRestWebResource()
|
protected
<E> com.atlassian.util.concurrent.Promise<E> |
|
postFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends E> entityClass,
java.lang.Object postEntity)
|
protected
<E> com.atlassian.util.concurrent.Promise<E> |
|
postFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends E> entityClass,
java.lang.Object postEntity,
javax.ws.rs.core.MediaType mediaType)
|
protected
<E> com.atlassian.util.concurrent.Promise<E> |
|
postFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<E> collectionClass,
java.lang.Class contentType,
java.lang.Object postEntity)
|
protected
|
postFutureToPageResponse(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<T> entityClass,
java.lang.Object postEntity,
javax.ws.rs.core.MediaType mediaType)
|
protected
<T> com.atlassian.util.concurrent.Promise<T> |
|
putFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends T> entityClass,
java.lang.Object putEntity)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRemoteService
protected AbstractRemoteService(AuthenticatedWebResourceProvider provider,
com.google.common.util.concurrent.ListeningExecutorService executor)
AbstractRemoteService
protected AbstractRemoteService(AbstractRemoteService other)
newRestWebResource
protected com.sun.jersey.api.client.WebResource newRestWebResource()
newExperimentalRestWebResource
protected com.sun.jersey.api.client.WebResource newExperimentalRestWebResource()
getFutureOption
protected <T> com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<T>> getFutureOption(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends T> entityClass)
getFuturePageResponseList
protected <E> com.atlassian.util.concurrent.Promise<PageResponse<E>> getFuturePageResponseList(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<E> contentClass)
getFutureMapOfPageResponses
protected <K,V> com.atlassian.util.concurrent.Promise<java.util.Map<K,PageResponse<V>>> getFutureMapOfPageResponses(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<K> keyClass,
java.lang.Class<V> listContentClass)
getFutureGenericCollection
protected <E> com.atlassian.util.concurrent.Promise<? extends java.lang.Iterable<E>> getFutureGenericCollection(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends java.lang.Iterable> collectionType,
java.lang.Class<E> contentType)
postFuture
protected <E> com.atlassian.util.concurrent.Promise<E> postFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends E> entityClass,
java.lang.Object postEntity)
postFuture
protected <E> com.atlassian.util.concurrent.Promise<E> postFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends E> entityClass,
java.lang.Object postEntity,
javax.ws.rs.core.MediaType mediaType)
postFuture
protected <E> com.atlassian.util.concurrent.Promise<E> postFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<E> collectionClass,
java.lang.Class contentType,
java.lang.Object postEntity)
postFutureToPageResponse
protected <T> com.atlassian.util.concurrent.Promise<PageResponse<T>> postFutureToPageResponse(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<T> entityClass,
java.lang.Object postEntity,
javax.ws.rs.core.MediaType mediaType)
putFuture
protected <T> com.atlassian.util.concurrent.Promise<T> putFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends T> entityClass,
java.lang.Object putEntity)
deleteFuture
protected com.atlassian.util.concurrent.Promise<java.lang.Void> deleteFuture(com.sun.jersey.api.client.WebResource resource)
deleteFuture
protected <T> com.atlassian.util.concurrent.Promise<T> deleteFuture(com.sun.jersey.api.client.WebResource resource,
java.lang.Class<? extends T> responseClass)
addExpansions
protected com.sun.jersey.api.client.WebResource addExpansions(com.sun.jersey.api.client.WebResource resource,
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)
Copyright © 2003-2014 Atlassian. All Rights Reserved.