com.atlassian.confluence.plugins.rest.resources
Class SpaceResource
java.lang.Object
com.atlassian.confluence.plugins.rest.resources.AbstractResource
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.
Method Summary |
javax.ws.rs.core.Response |
get(java.lang.String spaceTypeString,
java.lang.String startIndexString,
java.lang.String maxResultsString,
java.util.Set<java.lang.String> spaceKey)
Retrieves a list of spaces visible to the currently logged in user, alphabetically by space name. |
javax.ws.rs.core.Response |
getSpace(java.lang.String key)
Returns information about a space identified by the key passed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpaceResource
public SpaceResource(UserAccessor userAccessor,
RestSpaceManager restSpaceManager,
SpacePermissionManager spacePermissionManager)
get
public javax.ws.rs.core.Response get(java.lang.String spaceTypeString,
java.lang.String startIndexString,
java.lang.String maxResultsString,
java.util.Set<java.lang.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, ALLstartIndexString
- 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(java.lang.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-2013 Atlassian. All Rights Reserved.