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)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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.com.atlassian.util.concurrent.Promise<LongTaskSubmission>
delete(Space space)
Deprecated.since 7.0.1.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.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.-
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, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, postVoidCompletionStage, putCompletionStage, putFuture
-
-
-
-
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, com.google.common.util.concurrent.ListeningExecutorService executor)
-
-
Method Detail
-
create
@Deprecated public com.atlassian.util.concurrent.Promise<Space> create(Space newSpace, boolean isPrivate) throws ServiceException
Deprecated.since 7.0.1. UsecreateCompletionStage(Space, boolean)
instead.Description copied from interface:RemoteSpaceService
Create a new space.Minimum properties to be valid is a key and name.
- Specified by:
create
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
-
update
@Deprecated public com.atlassian.util.concurrent.Promise<Space> update(Space space) throws ServiceException
Deprecated.since 7.0.1. UseupdateCompletionStage(Space)
instead.Description copied from interface:RemoteSpaceService
Updates a space.Currently limited to changing the space name, description and homepage.
- Specified by:
update
in interfaceRemoteSpaceService
- Parameters:
space
- the updatedSpace
- Returns:
- the updated space after being persisted
- Throws:
ServiceException
-
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
-
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
-
delete
@Deprecated public com.atlassian.util.concurrent.Promise<LongTaskSubmission> delete(Space space)
Deprecated.since 7.0.1. UsedeleteCompletionStage(Space)
instead.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:
delete
in interfaceRemoteSpaceService
- Parameters:
space
- the space to delete- Returns:
- a LongTaskStatus describing the space-removal operation
-
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
-
-