Class SpaceServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.content.SpaceServiceImpl
-
- All Implemented Interfaces:
SpaceService
public class SpaceServiceImpl extends Object implements SpaceService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSpaceServiceImpl.SpaceContentImplclassSpaceServiceImpl.SpaceFinderImplclassSpaceServiceImpl.ValidatorImpl-
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.content.SpaceService
SpaceService.SingleSpaceFetcher, SpaceService.SpaceContentFinder, SpaceService.SpaceFinder, SpaceService.Validator
-
-
Constructor Summary
Constructors Constructor 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, AccessModeService accessModeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Spacecreate(Space space, boolean isPrivate)Create a new space.LongTaskSubmissiondelete(Space spaceToDelete)Delete the given space.SpaceService.SpaceFinderfind(Expansion... expansions)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... expansions)A finder to locate content in the spaceSpaceupdate(Space space)Updates a space.SpaceServiceImpl.ValidatorImplvalidator()Get the validator view of the Space Service.
-
-
-
Constructor Detail
-
SpaceServiceImpl
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, AccessModeService accessModeService)
-
-
Method Detail
-
create
public Space create(Space space, boolean isPrivate) throws ServiceException
Description copied from interface:SpaceServiceCreate 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.
- Specified by:
createin interfaceSpaceService- Parameters:
space- the space to createisPrivate- whether the space is private (true) or has default permissions (false)- Returns:
- the space created
- Throws:
ServiceException- if the space cannot be created
-
delete
public LongTaskSubmission delete(Space spaceToDelete) throws ServiceException
Description copied from interface:SpaceServiceDelete the given space.The deletion happens asynchronously so a LongTaskStatus is returned, that can be used to track progress.
- Specified by:
deletein interfaceSpaceService- 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 itPermissionException- if you do not have permission to delete the spaceServiceException
-
find
public SpaceService.SpaceFinder find(Expansion... expansions)
Description copied from interface:SpaceServiceCreate 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);- Specified by:
findin interfaceSpaceService- Parameters:
expansions- - the expansion to apply to each fetched space- Returns:
- a new SpaceFinder
-
update
public Space update(Space space) throws ServiceException
Description copied from interface:SpaceServiceUpdates a space.Currently limited to changing the space name, description and homepage.
- Specified by:
updatein interfaceSpaceService- Parameters:
space- the updatedSpace- Returns:
- the updated space after being persisted
- Throws:
ServiceException
-
validator
public SpaceServiceImpl.ValidatorImpl validator()
Description copied from interface:SpaceServiceGet the validator view of the Space Service.- Specified by:
validatorin interfaceSpaceService
-
findContent
public SpaceService.SpaceContentFinder findContent(Space space, Expansion... expansions) throws NotFoundException
Description copied from interface:SpaceServiceA finder to locate content in the space- Specified by:
findContentin interfaceSpaceService- Returns:
- a finder
- Throws:
NotFoundException- if the space does not exist or you do not have permission to view it
-
-