public class SpaceServiceImpl extends Object implements SpaceService
Modifier and Type | Class and Description |
---|---|
class |
SpaceServiceImpl.SpaceContentImpl |
class |
SpaceServiceImpl.SpaceFinderImpl |
class |
SpaceServiceImpl.ValidatorImpl |
SpaceService.SingleSpaceFetcher, SpaceService.SpaceContentFinder, SpaceService.SpaceFinder, SpaceService.Validator
Constructor and Description |
---|
SpaceServiceImpl(SpaceManagerInternal spaceManager,
SpaceFactory spaceFactory,
PageManagerInternal pageManager,
ContentFactory contentFactory,
PaginationService paginationService,
PermissionManager permissionManager,
ContentService contentService,
SpacePermissionManager spacePermissionManager,
LongRunningTaskManager longRunningTaskManager,
LongTaskFactory longTaskFactory,
I18NBeanFactory i18NBeanFactory,
FinderProxyFactory finderProxyFactory) |
Modifier and Type | Method and Description |
---|---|
Space |
create(Space space,
boolean isPrivate)
Create a new space.
|
LongTaskSubmission |
delete(Space spaceToDelete)
Delete the given space.
|
SpaceService.SpaceFinder |
find(Expansion... expansions)
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... expansions)
A finder to locate content in the space
|
com.atlassian.fugue.Option<Space> |
getSpace(String spaceKey,
Expansion... expansions)
Deprecated.
|
Space |
update(Space space)
Updates a space.
|
SpaceServiceImpl.ValidatorImpl |
validator()
Get the validator view of the Space Service.
|
public SpaceServiceImpl(SpaceManagerInternal spaceManager, SpaceFactory spaceFactory, PageManagerInternal pageManager, ContentFactory contentFactory, PaginationService paginationService, PermissionManager permissionManager, ContentService contentService, SpacePermissionManager spacePermissionManager, LongRunningTaskManager longRunningTaskManager, LongTaskFactory longTaskFactory, I18NBeanFactory i18NBeanFactory, FinderProxyFactory finderProxyFactory)
public Space create(Space space, boolean isPrivate) throws ServiceException
SpaceService
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.
create
in interface SpaceService
space
- the space to createisPrivate
- whether the space is private (true) or has default permissions (false)ServiceException
- if the space cannot be createdpublic LongTaskSubmission delete(Space spaceToDelete) throws ServiceException
SpaceService
The deletion happens asynchronously so a LongTaskStatus is returned, that can be used to track progress.
delete
in interface SpaceService
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
public SpaceService.SpaceFinder find(Expansion... expansions)
SpaceService
For example:
spaceService.find()
.withKeys("DEV","PROD")
.fetchMany(new SimplePageRequest(0, 10);
find
in interface SpaceService
expansions
- - the expansion to apply to each fetched spacepublic Space update(Space space) throws ServiceException
SpaceService
Currently limited to changing the space name, description and homepage.
update
in interface SpaceService
space
- the updated Space
ServiceException
public SpaceServiceImpl.ValidatorImpl validator()
SpaceService
validator
in interface SpaceService
public SpaceService.SpaceContentFinder findContent(Space space, Expansion... expansions) throws NotFoundException
SpaceService
findContent
in interface SpaceService
NotFoundException
- if the space does not exist or you do not have permission to view it@Deprecated public com.atlassian.fugue.Option<Space> getSpace(String spaceKey, Expansion... expansions)
SpaceService
getSpace
in interface SpaceService
spaceKey
- - the space key of the spaceCopyright © 2003–2016 Atlassian. All rights reserved.