Interface SpaceService
- 
- All Known Implementing Classes:
- SpaceServiceImpl
 
 public interface SpaceServiceProvides CRUD operations on Spaces.- Since:
- 5.5
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceSpaceService.SingleSpaceFetcherstatic interfaceSpaceService.SpaceContentFinderA finder interface to encapsulate finding content in a particular spacestatic interfaceSpaceService.SpaceFinderA finder for locating spaces.static interfaceSpaceService.ValidatorProvides methods for validating the create, update and delete methods.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidarchive(String spaceKey)Archives a space.Spacecreate(Space newSpace, boolean isPrivate)Create a new space.LongTaskSubmissiondelete(Space spaceToDelete)Delete the given space.SpaceService.SpaceFinderfind(Expansion... expansion)Create a space finder to locate spaces, the expansions will be applied to each Space matching the restrictions on the finder.SpaceService.SpaceContentFinderfindContent(Space space, Expansion... expansion)A finder to locate content in the spacevoidrestore(String spaceKey)Un-archives a space.Spaceupdate(Space space)Updates a space.SpaceService.Validatorvalidator()Get the validator view of the Space Service.
 
- 
- 
- 
Method Detail- 
createSpace create(Space newSpace, boolean isPrivate) throws ServiceException Create a new space.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. - Parameters:
- newSpace- the space to create
- isPrivate- whether the space is private (true) or has default permissions (false)
- Returns:
- the space created
- Throws:
- ServiceException- if the space cannot be created
 
 - 
updateSpace update(Space space) throws ServiceException Updates a space.Currently limited to changing the space name, description and homepage. - Parameters:
- space- the updated- Space
- Returns:
- the updated space after being persisted
- Throws:
- ServiceException
 
 - 
findSpaceService.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. Restrictions can be applied to the finder using the appropriate withFoo() methodFor example: spaceService.find() .withKeys("DEV","PROD") .fetchMany(new SimplePageRequest(0, 10);- Parameters:
- expansion- - the expansion to apply to each fetched space
- Returns:
- a new SpaceFinder
 
 - 
archivevoid archive(String spaceKey) Archives a space. If the space is already archived, this method does nothing.- Parameters:
- spaceKey- the key of the space to archive
- Since:
- 8.8.0
 
 - 
restorevoid restore(String spaceKey) Un-archives a space. If the space is already unarchived, this method does nothing.- Parameters:
- spaceKey- the key of the space to restore
- Since:
- 8.8.0
 
 - 
findContentSpaceService.SpaceContentFinder findContent(Space space, Expansion... expansion) throws NotFoundException A finder to locate content in the space- Returns:
- a finder
- Throws:
- NotFoundException- if the space does not exist or you do not have permission to view it
 
 - 
deleteLongTaskSubmission delete(Space spaceToDelete) throws ServiceException Delete the given space.The deletion happens asynchronously so a LongTaskStatus is returned, that can be used to track progress. - Parameters:
- spaceToDelete- the space to delete
- Returns:
- a LongTaskStatus describing the space-removal operation
- Throws:
- NotFoundException- if the space does not exist or you do not have permission to view it
- PermissionException- if you do not have permission to delete the space
- ServiceException
 
 - 
validatorSpaceService.Validator validator() Get the validator view of the Space Service.
 
- 
 
-