com.atlassian.confluence.api.impl.service.content
Class SpaceServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.api.impl.service.content.SpaceServiceImpl
All Implemented Interfaces:
SpaceService

public class SpaceServiceImpl
extends java.lang.Object
implements SpaceService


Nested Class Summary
 class SpaceServiceImpl.SpaceContentImpl
           
 class SpaceServiceImpl.SpaceFinderImpl
           
 class SpaceServiceImpl.ValidatorImpl
           
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.content.SpaceService
SpaceService.SingleSpaceFetcher, SpaceService.SpaceContentFinder, SpaceService.SpaceFinder, SpaceService.Validator
 
Constructor Summary
SpaceServiceImpl(SpaceManagerInternal spaceManager, SpaceFactory spaceFactory, PageManagerInternal pageManager, ContentFactory contentFactory, PaginationService paginationService, PermissionManager permissionManager, org.springframework.aop.Advisor txAdvisor)
           
 
Method Summary
 Space create(Space space, boolean isPrivate)
          Create a new 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(java.lang.String spaceKey, Expansion... expansions)
          Retrieve a space with the given spacekey.
 SpaceServiceImpl.ValidatorImpl validator()
          Get the validator view of the Space Service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpaceServiceImpl

public SpaceServiceImpl(SpaceManagerInternal spaceManager,
                        SpaceFactory spaceFactory,
                        PageManagerInternal pageManager,
                        ContentFactory contentFactory,
                        PaginationService paginationService,
                        PermissionManager permissionManager,
                        org.springframework.aop.Advisor txAdvisor)
Method Detail

create

public Space create(Space space,
                    boolean isPrivate)
             throws ServiceException
Description copied from interface: SpaceService
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.

Specified by:
create in interface SpaceService
Parameters:
space - 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

find

public SpaceService.SpaceFinder find(Expansion... expansions)
Description copied from interface: SpaceService
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() method For example:
 spaceService.find()
      .withKeys("DEV","PROD")
      .fetchMany(new SimplePageRequest(0, 10);
 
 

Specified by:
find in interface SpaceService
Parameters:
expansions - - the expansion to apply to each fetched space
Returns:
a new SpaceFinder

validator

public SpaceServiceImpl.ValidatorImpl validator()
Description copied from interface: SpaceService
Get the validator view of the Space Service.

Specified by:
validator in interface SpaceService

findContent

public SpaceService.SpaceContentFinder findContent(Space space,
                                                   Expansion... expansions)
                                            throws NotFoundException
Description copied from interface: SpaceService
A finder to locate content in the space

Specified by:
findContent in interface SpaceService
Returns:
Throws:
NotFoundException - if the space does not exist or you do not have permission to view it

getSpace

public com.atlassian.fugue.Option<Space> getSpace(java.lang.String spaceKey,
                                                  Expansion... expansions)
Description copied from interface: SpaceService
Retrieve a space with the given spacekey. A space key uniquely identifies a space.

Specified by:
getSpace in interface SpaceService
Parameters:
spaceKey - - the space key of the space
Returns:
an Option of the space with the given key if one exists.


Copyright © 2003-2014 Atlassian. All Rights Reserved.