com.atlassian.confluence.plugins.rest.resources
Class SpaceResource

java.lang.Object
  extended by com.atlassian.confluence.plugins.rest.resources.AbstractResource
      extended by com.atlassian.confluence.plugins.rest.resources.SpaceResource

public class SpaceResource
extends AbstractResource

Rest resource for accessing Confluence spaces. Currently supports only read access to spaces.


Field Summary
 
Fields inherited from class com.atlassian.confluence.plugins.rest.resources.AbstractResource
authContext, userAccessor
 
Constructor Summary
SpaceResource(UserAccessor userAccessor, RestSpaceManager restSpaceManager, SpacePermissionManager spacePermissionManager)
           
 
Method Summary
 javax.ws.rs.core.Response get(String spaceTypeString, String startIndexString, String maxResultsString, Set<String> spaceKey)
          Retrieves a list of spaces visible to the currently logged in user, alphabetically by space name.
 javax.ws.rs.core.Response getSpace(String key)
          Returns information about a space identified by the key passed.
 
Methods inherited from class com.atlassian.confluence.plugins.rest.resources.AbstractResource
createRequestContext, getAnonymousUserUriBuilder, getAttachmentUriBuilder, getContentUriBuilder, getCurrentUser, getMissingUserUriBuilder, getSpaceUriBuilder, getUserUriBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpaceResource

public SpaceResource(UserAccessor userAccessor,
                     RestSpaceManager restSpaceManager,
                     SpacePermissionManager spacePermissionManager)
Method Detail

get

public javax.ws.rs.core.Response get(String spaceTypeString,
                                     String startIndexString,
                                     String maxResultsString,
                                     Set<String> spaceKey)
Retrieves a list of spaces visible to the currently logged in user, alphabetically by space name. An optional parameter 'type' allows filtering on space type. The standard paging parameters 'start-index' and 'max-results' can be used to page through the list. A maximum of 50 (defined by DefaultRestSpaceManager.DEFAULT_MAX_SIZE) spaces will be listed.

Parameters:
spaceTypeString - The space type parameter to filter the list by. Type can be one of: GLOBAL, PERSONAL, ALL
startIndexString - The first (inclusive) index to return. Can be any integer zero or greater.
maxResultsString - The number of results to return. Can be any positive integer.
spaceKey - a list of space keys to view
Returns:
a list of all spaces the user can see.

getSpace

public javax.ws.rs.core.Response getSpace(String key)
Returns information about a space identified by the key passed. ReturnsReturns http HTTP 404 (not found) if the space is not found or the user requesting it does not have the correct permissions.

Parameters:
key -
Returns:
details for the space


Copyright © 2003-2012 Atlassian. All Rights Reserved.