@ExperimentalApi
public interface SpaceService
Modifier and Type | Interface and Description |
---|---|
static interface |
SpaceService.SingleSpaceFetcher |
static interface |
SpaceService.SpaceContentFinder
A finder interface to encapsulate finding content in a particular space
|
static interface |
SpaceService.SpaceFinder
A finder for locating spaces.
|
static interface |
SpaceService.Validator
Provides methods for validating the create, update and delete methods.
|
Modifier and Type | Method and Description |
---|---|
Space |
create(Space newSpace,
boolean isPrivate)
Create a new space.
|
LongTaskSubmission |
delete(Space spaceToDelete)
Delete the given space.
|
SpaceService.SpaceFinder |
find(Expansion... expansion)
Create a space finder to locate spaces, the expansions will be applied to each Space matching the
restrictions on the finder.
|
SpaceService.SpaceContentFinder |
findContent(Space space,
Expansion... expansion)
A finder to locate content in the space
|
com.atlassian.fugue.Option<Space> |
getSpace(String spaceKey,
Expansion... expansions)
Deprecated.
Since 5.5 use find().withKey(String).fetchOne();
|
Space |
update(Space space)
Updates a space.
|
SpaceService.Validator |
validator()
Get the validator view of the Space Service.
|
Space create(Space newSpace, boolean isPrivate) throws ServiceException
If the "isPrivate" flag is set to true the new space will only be visible to the creator.
Minimum properties to be valid is a key and name.
newSpace
- the space to createisPrivate
- whether the space is private (true) or has default permissions (false)ServiceException
- if the space cannot be createdSpace update(Space space) throws ServiceException
Currently limited to changing the space name, description and homepage.
space
- the updated Space
ServiceException
@Deprecated com.atlassian.fugue.Option<Space> getSpace(String spaceKey, Expansion... expansions)
spaceKey
- - the space key of the spaceSpaceService.SpaceFinder find(Expansion... expansion)
For example:
spaceService.find()
.withKeys("DEV","PROD")
.fetchMany(new SimplePageRequest(0, 10);
expansion
- - the expansion to apply to each fetched spaceSpaceService.SpaceContentFinder findContent(Space space, Expansion... expansion) throws NotFoundException
NotFoundException
- if the space does not exist or you do not have permission to view itLongTaskSubmission delete(Space spaceToDelete) throws ServiceException
The deletion happens asynchronously so a LongTaskStatus is returned, that can be used to track progress.
spaceToDelete
- the space to deleteNotFoundException
- if the space does not exist or you do not have permission to view itPermissionException
- if you do not have permission to delete the spaceServiceException
SpaceService.Validator validator()
Copyright © 2003–2016 Atlassian. All rights reserved.