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,
LabelManager labelManager,
UserChecker userChecker) |
| 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.
Since 5.5 use find().withKey(String).fetchOne();
|
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, LabelManager labelManager, UserChecker userChecker)
public Space create(Space space, boolean isPrivate) throws ServiceException
SpaceServiceIf 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 SpaceServicespace - 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 SpaceServicespaceToDelete - 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 spaceServiceExceptionpublic SpaceService.SpaceFinder find(Expansion... expansions)
SpaceServiceFor example:
spaceService.find()
.withKeys("DEV","PROD")
.fetchMany(new SimplePageRequest(0, 10);
find in interface SpaceServiceexpansions - - 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 SpaceServicespace - the updated SpaceServiceExceptionpublic SpaceServiceImpl.ValidatorImpl validator()
SpaceServicevalidator in interface SpaceServicepublic SpaceService.SpaceContentFinder findContent(Space space, Expansion... expansions) throws NotFoundException
SpaceServicefindContent in interface SpaceServiceNotFoundException - 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)
SpaceServicegetSpace in interface SpaceServicespaceKey - - the space key of the spaceCopyright © 2003–2017 Atlassian. All rights reserved.