Class SpaceDirectoryResource
java.lang.Object
com.atlassian.confluence.plugins.rest.jackson2.resources.AbstractResource
com.atlassian.confluence.plugins.spacedirectory.rest.SpaceDirectoryResource
@Path("/")
@Produces({"application/xml","application/json"})
public class SpaceDirectoryResource
extends AbstractResource
-
Field Summary
Fields inherited from class com.atlassian.confluence.plugins.rest.jackson2.resources.AbstractResource
authContext, uriInfo, userAccessor -
Constructor Summary
ConstructorsConstructorDescriptionSpaceDirectoryResource(UserAccessor userAccessor, SpacePermissionManager spacePermissionManager, SpaceService spaceService, PredefinedSearchBuilder predefinedSearchBuilder, SearchManager searchManager, com.atlassian.sal.api.ApplicationProperties applicationProperties, SpaceDirectoryEntityBuilder builder) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsedoLimitedSearch(String query, int startIndex, Integer pageSize, Set<String> label, String typeStr, String status, String sort, String sortField, boolean filterUnauthorizedSpaces) Search for spaces within the directory, returning a limited set of fields for each space.jakarta.ws.rs.core.ResponsedoSearch(String query, int startIndex, Integer pageSize, Set<String> label, String typeStr, String status, boolean filterUnauthorizedSpaces) Search for spaces within the directory.Methods inherited from class com.atlassian.confluence.plugins.rest.jackson2.resources.AbstractResource
createRequestContext, getAnonymousUserUriBuilder, getAttachmentUriBuilder, getContentUriBuilder, getCurrentUser, getMissingUserUriBuilder, getSpaceUriBuilder, getUserUriBuilder
-
Constructor Details
-
SpaceDirectoryResource
@Inject public SpaceDirectoryResource(UserAccessor userAccessor, SpacePermissionManager spacePermissionManager, SpaceService spaceService, PredefinedSearchBuilder predefinedSearchBuilder, SearchManager searchManager, com.atlassian.sal.api.ApplicationProperties applicationProperties, SpaceDirectoryEntityBuilder builder)
-
-
Method Details
-
doSearch
@GET @Path("/search") public jakarta.ws.rs.core.Response doSearch(@QueryParam("query") String query, @DefaultValue("0") @QueryParam("startIndex") int startIndex, @QueryParam("pageSize") Integer pageSize, @QueryParam("label") Set<String> label, @QueryParam("type") String typeStr, @QueryParam("status") String status, @DefaultValue("false") @QueryParam("filterUnauthorizedSpaces") boolean filterUnauthorizedSpaces) Search for spaces within the directory.- Parameters:
query- Text query by space name and keystartIndex- the index of the first result to returnpageSize- the maximum number of results to returnlabel- the set of labels that must be applied to the spacestypeStr- the type of space to look up (or null to look up all spaces)status- the status (current or archived) of space to look up, or null tofilterUnauthorizedSpaces- Whether to filter out unauthorized labels for system admins look up all spaces.- Returns:
- the appropriate REST response.
-
doLimitedSearch
@GET @Path("/limitedsearch") public jakarta.ws.rs.core.Response doLimitedSearch(@QueryParam("query") String query, @DefaultValue("0") @QueryParam("startIndex") int startIndex, @QueryParam("pageSize") Integer pageSize, @QueryParam("label") Set<String> label, @QueryParam("type") String typeStr, @QueryParam("status") String status, @DefaultValue("ascending") @QueryParam("sort") String sort, @DefaultValue("spaceKey") @QueryParam("sortField") String sortField, @DefaultValue("false") @QueryParam("filterUnauthorizedSpaces") boolean filterUnauthorizedSpaces) Search for spaces within the directory, returning a limited set of fields for each space.- Parameters:
query- Text query by space name and keystartIndex- The index of the first result to returnpageSize- The maximum number of results to returnlabel- The set of labels that must be applied to the spacestypeStr- The type of space to look up (or null to look up all spaces)status- The status (current or archived) of space to look up, or null to look up all spacessort- The order to sort result spaceKeys by, either "ascending" or "descending" (default is "ascending")sortField- The field to sort by, either "spaceName" or "spaceKey" (default is "spaceKey")filterUnauthorizedSpaces- Whether to filter out unauthorized spaces for system admins (default is false)- Returns:
- A list of limited space representations matching the query, in the requested order
- Since:
- 9.2.7
-