Class RemoteSpaceServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.rest.client.AbstractRemoteService<SpaceService>
-
- com.atlassian.confluence.rest.client.RemoteSpaceServiceImpl
-
- All Implemented Interfaces:
RemoteSpaceService
public class RemoteSpaceServiceImpl extends AbstractRemoteService<SpaceService> implements RemoteSpaceService
SpaceService implementation that communicates with Confluence remotely using the Confluence REST api
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRemoteSpaceServiceImpl.RemoteSpaceContentFinderImplclassRemoteSpaceServiceImpl.RemoteSpaceFinderImpl-
Nested classes/interfaces inherited from interface com.atlassian.confluence.rest.client.RemoteSpaceService
RemoteSpaceService.RemoteSpaceContentFinder, RemoteSpaceService.RemoteSpaceFinder, RemoteSpaceService.RemoteSpaceSingleFetcher
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRIVATE_SPACE_SUBPATHstatic StringSPACE_RESOURCE_PATH-
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
-
Constructor Summary
Constructors Constructor Description RemoteSpaceServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)Deprecated.since 8.8RemoteSpaceServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CompletionStage<Void>archive(String spaceKey)Archives a space.CompletionStage<Space>createCompletionStage(Space newSpace, boolean isPrivate)Create a new space.CompletionStage<LongTaskSubmission>deleteCompletionStage(Space space)Delete the given space.RemoteSpaceService.RemoteSpaceFinderfind(Expansion... expansions)RemoteSpaceService.RemoteSpaceContentFinderfindContent(Space space, Expansion... expansion)Create a finder to find content in the given space.com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<Space>>getSpace(String spaceKey, Expansion... expansions)Deprecated.since 5.6.CompletionStage<Void>restore(String spaceKey)Un-archives a space.CompletionStage<Space>updateCompletionStage(Space space)Updates a space.SpaceService.Validatorvalidator()Get the validator view of the Space Service.-
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, getFutureOptional, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, postVoidCompletionStage, putCompletionStage, putFuture
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.rest.client.RemoteSpaceService
create, delete, update
-
-
-
-
Field Detail
-
SPACE_RESOURCE_PATH
public static final String SPACE_RESOURCE_PATH
- See Also:
- Constant Field Values
-
PRIVATE_SPACE_SUBPATH
public static final String PRIVATE_SPACE_SUBPATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemoteSpaceServiceImpl
public RemoteSpaceServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor)
- Since:
- 8.8
-
RemoteSpaceServiceImpl
@Deprecated public RemoteSpaceServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
Deprecated.since 8.8
-
-
Method Detail
-
createCompletionStage
public CompletionStage<Space> createCompletionStage(Space newSpace, boolean isPrivate) throws ServiceException
Description copied from interface:RemoteSpaceServiceCreate a new space.Minimum properties to be valid is a key and name.
- Specified by:
createCompletionStagein interfaceRemoteSpaceService- Parameters:
newSpace- the space to createisPrivate- true if the space should only be visible to its creator- Returns:
- the space created
- Throws:
ServiceException- if the space cannot be created
-
updateCompletionStage
public CompletionStage<Space> updateCompletionStage(Space space) throws ServiceException
Description copied from interface:RemoteSpaceServiceUpdates a space.Currently limited to changing the space name, description and homepage.
- Specified by:
updateCompletionStagein interfaceRemoteSpaceService- Parameters:
space- the updatedSpace- Returns:
- the updated space after being persisted
- Throws:
ServiceException
-
validator
public SpaceService.Validator validator()
Description copied from interface:RemoteSpaceServiceGet the validator view of the Space Service.- Specified by:
validatorin interfaceRemoteSpaceService
-
getSpace
@Deprecated public com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<Space>> getSpace(String spaceKey, Expansion... expansions)
Deprecated.since 5.6. Usefind(Expansion...)- Specified by:
getSpacein interfaceRemoteSpaceService
-
find
public RemoteSpaceService.RemoteSpaceFinder find(Expansion... expansions)
- Specified by:
findin interfaceRemoteSpaceService
-
archive
public CompletionStage<Void> archive(String spaceKey)
Description copied from interface:RemoteSpaceServiceArchives a space. If the space is already archived, this method does nothing.- Specified by:
archivein interfaceRemoteSpaceService
-
restore
public CompletionStage<Void> restore(String spaceKey)
Description copied from interface:RemoteSpaceServiceUn-archives a space. If the space is already unarchived, this method does nothing.- Specified by:
restorein interfaceRemoteSpaceService
-
findContent
public RemoteSpaceService.RemoteSpaceContentFinder findContent(Space space, Expansion... expansion)
Description copied from interface:RemoteSpaceServiceCreate a finder to find content in the given space. Content will be returned upon calling one of the fetch methods on the returned finder- Specified by:
findContentin interfaceRemoteSpaceService- Parameters:
space- - the space to fetch content forexpansion- - the expansions to apply to the content in this space- Returns:
- a new space content finder with the space and expansions set
-
deleteCompletionStage
public CompletionStage<LongTaskSubmission> deleteCompletionStage(Space space)
Description copied from interface:RemoteSpaceServiceDelete the given space.The deletion happens asynchronously so a LongTaskSubmission is returned, that can be used to request status.
- Specified by:
deleteCompletionStagein interfaceRemoteSpaceService- Parameters:
space- the space to delete- Returns:
- a LongTaskStatus describing the space-removal operation
-
-