public class RemoteRelationServiceImpl extends AbstractRemoteService<RelationService> implements RemoteRelationService
RelationService
implementation that communicates with Confluence remotely using the Confluence REST API.provider
Constructor and Description |
---|
RemoteRelationServiceImpl(AuthenticatedWebResourceProvider provider,
com.google.common.util.concurrent.ListeningExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
<S extends Relatable,T extends Relatable> |
create(RelationInstance<S,T> relationInstance)
Deprecated.
since 7.0.1. Use
createCompletionStage(RelationInstance) instead. |
<S extends Relatable,T extends Relatable> |
createCompletionStage(RelationInstance<S,T> relationInstance)
Creates a directed relation between two relatable entities.
|
<S extends Relatable,T extends Relatable> |
delete(RelationInstance<S,T> relationInstance)
Deprecated.
since 7.0.1. Use
deleteCompletionStage(RelationInstance) instead. |
<S extends Relatable,T extends Relatable> |
deleteCompletionStage(RelationInstance<S,T> relationInstance)
Remove a relation if it exists between a source and a target relatable entity
|
<S extends Relatable,T extends Relatable> |
isRelated(S source,
RelationDescriptor<S,T> relationDescriptor,
T target)
Deprecated.
since 7.0.1. Use
isRelatedCompletionStage(Relatable, RelationDescriptor, Relatable) instead. |
<S extends Relatable,T extends Relatable> |
isRelatedCompletionStage(S source,
RelationDescriptor<S,T> relationDescriptor,
T target)
Determine whether a given source and target are related by the given relation
|
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
public RemoteRelationServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
@Deprecated public <S extends Relatable,T extends Relatable> com.atlassian.util.concurrent.Promise<Void> create(RelationInstance<S,T> relationInstance) throws ServiceException
createCompletionStage(RelationInstance)
instead.RemoteRelationService
For example, when a user favourites a space a SpaceFavouriteRelation is created from the user to the space:
relationService.create(RelationInstance.builder(user, new SpaceFavouriteRelation(), space).build))
;
create
in interface RemoteRelationService
S
- type of the source entityT
- type of the target entityrelationInstance
- the relation to createServiceException
- if validation fails@Deprecated public <S extends Relatable,T extends Relatable> com.atlassian.util.concurrent.Promise<Void> delete(RelationInstance<S,T> relationInstance) throws ServiceException
deleteCompletionStage(RelationInstance)
instead.RemoteRelationService
delete
in interface RemoteRelationService
S
- type of the source entityT
- type of the target entityrelationInstance
- relation to be deletedServiceException
- if validation failspublic <S extends Relatable,T extends Relatable> CompletionStage<Void> createCompletionStage(RelationInstance<S,T> relationInstance) throws ServiceException
RemoteRelationService
For example, when a user favourites a space a SpaceFavouriteRelation is created from the user to the space:
relationService.create(RelationInstance.builder(user, new SpaceFavouriteRelation(), space).build))
;
createCompletionStage
in interface RemoteRelationService
S
- type of the source entityT
- type of the target entityrelationInstance
- the relation to createServiceException
- if validation failspublic <S extends Relatable,T extends Relatable> CompletionStage<Void> deleteCompletionStage(RelationInstance<S,T> relationInstance) throws ServiceException
RemoteRelationService
deleteCompletionStage
in interface RemoteRelationService
S
- type of the source entityT
- type of the target entityrelationInstance
- relation to be deletedServiceException
- if validation fails@Deprecated public <S extends Relatable,T extends Relatable> com.atlassian.util.concurrent.Promise<Boolean> isRelated(S source, RelationDescriptor<S,T> relationDescriptor, T target)
isRelatedCompletionStage(Relatable, RelationDescriptor, Relatable)
instead.RemoteRelationService
isRelated
in interface RemoteRelationService
S
- type of the source entityT
- type of the target entitypublic <S extends Relatable,T extends Relatable> CompletionStage<Boolean> isRelatedCompletionStage(S source, RelationDescriptor<S,T> relationDescriptor, T target)
RemoteRelationService
isRelatedCompletionStage
in interface RemoteRelationService
S
- type of the source entityT
- type of the target entityCopyright © 2003–2019 Atlassian. All rights reserved.