com.atlassian.confluence.rest.client
Class RemoteSpaceServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.rest.client.AbstractRemoteService<SpaceService>
      extended by 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
 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
static java.lang.String PRIVATE_SPACE_SUBPATH
           
static java.lang.String SPACE_RESOURCE_PATH
           
 
Constructor Summary
RemoteSpaceServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
           
 
Method Summary
 com.atlassian.util.concurrent.Promise<Space> create(Space newSpace, boolean isPrivate)
          Create a new space.
 com.atlassian.util.concurrent.Promise<LongTaskSubmission> delete(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(java.lang.String spaceKey, Expansion... expansions)
          Deprecated. 
 com.atlassian.util.concurrent.Promise<Space> update(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, deleteFuture, deleteFuture, getFutureGenericCollection, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postFuture, postFuture, postFuture, postFutureToPageResponse, putFuture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPACE_RESOURCE_PATH

public static final java.lang.String SPACE_RESOURCE_PATH
See Also:
Constant Field Values

PRIVATE_SPACE_SUBPATH

public static final java.lang.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

public com.atlassian.util.concurrent.Promise<Space> create(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:
create in interface RemoteSpaceService
Parameters:
newSpace - the space to create
isPrivate - true if the space should only be visible to its creator
Returns:
the space created
Throws:
ServiceException - if the space cannot be created

update

public com.atlassian.util.concurrent.Promise<Space> update(Space space)
                                                    throws ServiceException
Description copied from interface: RemoteSpaceService
Updates a space.

Currently limited to changing the space name, description and homepage.

Specified by:
update in interface RemoteSpaceService
Parameters:
space - the updated Space
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 interface RemoteSpaceService

getSpace

@Deprecated
public com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<Space>> getSpace(java.lang.String spaceKey,
                                                                                                    Expansion... expansions)
Deprecated. 

Specified by:
getSpace in interface RemoteSpaceService

find

public RemoteSpaceService.RemoteSpaceFinder find(Expansion... expansions)
Specified by:
find in interface RemoteSpaceService

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 interface RemoteSpaceService
Parameters:
space - - the space to fetch content for
expansion - - the expansions to apply to the content in this space
Returns:
a new space content finder with the space and expansions set

delete

public com.atlassian.util.concurrent.Promise<LongTaskSubmission> delete(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:
delete in interface RemoteSpaceService
Parameters:
space - the space to delete
Returns:
a LongTaskStatus describing the space-removal operation


Copyright © 2003-2014 Atlassian. All Rights Reserved.