Interface RemoteSpaceService
-
- All Known Implementing Classes:
RemoteSpaceServiceImpl
@ExperimentalApi public interface RemoteSpaceService
SpaceService
implementation that communicates with Confluence remotely using the Confluence REST api.Provides future returning equivalents for the methods in SpaceService.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RemoteSpaceService.RemoteSpaceContentFinder
static interface
RemoteSpaceService.RemoteSpaceFinder
static interface
RemoteSpaceService.RemoteSpaceSingleFetcher
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description CompletionStage<Void>
archive(String spaceKey)
Archives a space.default com.atlassian.util.concurrent.Promise<Space>
create(Space newSpace, boolean isPrivate)
Deprecated.since 7.0.1.CompletionStage<Space>
createCompletionStage(Space newSpace, boolean isPrivate)
Create a new space.default com.atlassian.util.concurrent.Promise<LongTaskSubmission>
delete(Space spaceToDelete)
Deprecated.since 8.7.CompletionStage<LongTaskSubmission>
deleteCompletionStage(Space spaceToDelete)
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.default com.atlassian.util.concurrent.Promise<Space>
update(Space space)
Deprecated.since 7.0.1.CompletionStage<Space>
updateCompletionStage(Space space)
Updates a space.SpaceService.Validator
validator()
Get the validator view of the Space Service.
-
-
-
Method Detail
-
create
@Deprecated default com.atlassian.util.concurrent.Promise<Space> create(Space newSpace, boolean isPrivate) throws ServiceException
Deprecated.since 7.0.1. UsecreateCompletionStage(Space, boolean)
instead.Create a new space.Minimum properties to be valid is a key and name.
- 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
-
update
@Deprecated default com.atlassian.util.concurrent.Promise<Space> update(Space space) throws ServiceException
Deprecated.since 7.0.1. UseupdateCompletionStage(Space)
instead.Updates a space.Currently limited to changing the space name, description and homepage.
- Parameters:
space
- the updatedSpace
- Returns:
- the updated space after being persisted
- Throws:
ServiceException
-
createCompletionStage
CompletionStage<Space> createCompletionStage(Space newSpace, boolean isPrivate) throws ServiceException
Create a new space.Minimum properties to be valid is a key and name.
- 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- Since:
- 7.0.1
-
updateCompletionStage
CompletionStage<Space> updateCompletionStage(Space space) throws ServiceException
Updates a space.Currently limited to changing the space name, description and homepage.
- Parameters:
space
- the updatedSpace
- Returns:
- the updated space after being persisted
- Throws:
ServiceException
- Since:
- 7.0.1
-
validator
SpaceService.Validator validator()
Get the validator view of the Space Service.
-
getSpace
@Deprecated com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<Space>> getSpace(String spaceKey, Expansion... expansions)
Deprecated.since 5.6. Usefind(Expansion...)
-
find
RemoteSpaceService.RemoteSpaceFinder find(Expansion... expansions)
-
archive
CompletionStage<Void> archive(String spaceKey)
Archives a space. If the space is already archived, this method does nothing.- Parameters:
spaceKey
-- Since:
- 8.8.0
-
restore
CompletionStage<Void> restore(String spaceKey)
Un-archives a space. If the space is already unarchived, this method does nothing.- Parameters:
spaceKey
-- Since:
- 8.8.0
-
findContent
RemoteSpaceService.RemoteSpaceContentFinder findContent(Space space, Expansion... expansion)
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- 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
-
delete
@Deprecated default com.atlassian.util.concurrent.Promise<LongTaskSubmission> delete(Space spaceToDelete)
Deprecated.since 8.7. UsedeleteCompletionStage(Space)
instead.Delete the given space.The deletion happens asynchronously so a LongTaskSubmission is returned, that can be used to request status.
- Parameters:
spaceToDelete
- the space to delete- Returns:
- a LongTaskStatus describing the space-removal operation
- Throws:
NotFoundException
- if the space does not exist or you do not have permission to view itPermissionException
- if you do not have permission to delete the space
-
deleteCompletionStage
CompletionStage<LongTaskSubmission> deleteCompletionStage(Space spaceToDelete)
Delete the given space.The deletion happens asynchronously so a LongTaskSubmission is returned, that can be used to request status.
- Parameters:
spaceToDelete
- the space to delete- Returns:
- a LongTaskStatus describing the space-removal operation
- Throws:
NotFoundException
- if the space does not exist or you do not have permission to view itPermissionException
- if you do not have permission to delete the space
-
-