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 class
RemoteSpaceServiceImpl.RemoteSpaceContentFinderImpl
class
RemoteSpaceServiceImpl.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 String
PRIVATE_SPACE_SUBPATH
static String
SPACE_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.RemoteSpaceFinder
find(Expansion... expansions)
RemoteSpaceService.RemoteSpaceContentFinder
findContent(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.Validator
validator()
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:RemoteSpaceService
Create a new space.Minimum properties to be valid is a key and name.
- Specified by:
createCompletionStage
in 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:RemoteSpaceService
Updates a space.Currently limited to changing the space name, description and homepage.
- Specified by:
updateCompletionStage
in interfaceRemoteSpaceService
- Parameters:
space
- the updatedSpace
- Returns:
- the updated space after being persisted
- Throws:
ServiceException
-
validator
public SpaceService.Validator validator()
Description copied from interface:RemoteSpaceService
Get the validator view of the Space Service.- Specified by:
validator
in 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:
getSpace
in interfaceRemoteSpaceService
-
find
public RemoteSpaceService.RemoteSpaceFinder find(Expansion... expansions)
- Specified by:
find
in interfaceRemoteSpaceService
-
archive
public CompletionStage<Void> archive(String spaceKey)
Description copied from interface:RemoteSpaceService
Archives a space. If the space is already archived, this method does nothing.- Specified by:
archive
in interfaceRemoteSpaceService
-
restore
public CompletionStage<Void> restore(String spaceKey)
Description copied from interface:RemoteSpaceService
Un-archives a space. If the space is already unarchived, this method does nothing.- Specified by:
restore
in interfaceRemoteSpaceService
-
findContent
public RemoteSpaceService.RemoteSpaceContentFinder findContent(Space space, Expansion... expansion)
Description copied from interface:RemoteSpaceService
Create 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:
findContent
in 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:RemoteSpaceService
Delete the given space.The deletion happens asynchronously so a LongTaskSubmission is returned, that can be used to request status.
- Specified by:
deleteCompletionStage
in interfaceRemoteSpaceService
- Parameters:
space
- the space to delete- Returns:
- a LongTaskStatus describing the space-removal operation
-
-