Class DefaultRestSpaceManager
- java.lang.Object
-
- com.atlassian.confluence.plugins.rest.manager.DefaultRestSpaceManager
-
- All Implemented Interfaces:
RestSpaceManager
public class DefaultRestSpaceManager extends Object implements RestSpaceManager
Default implementation of theRestSpaceManager
.The default maximum size for the
SpaceEntityList
s returned is 50.
-
-
Constructor Summary
Constructors Constructor Description DefaultRestSpaceManager(SpaceManager spaceManager, PageManager pageManager, DefaultRestContentManager restContentManager, EntityBuilderFactory entityBuilderFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpaceEntity
expand(SpaceEntity spaceEntity)
Expands and returns the givenSpaceEntity
.SpaceEntity
getSpaceEntity(Space space)
SpaceEntity
getSpaceEntity(String spaceKey, boolean expand)
Gets theSpaceEntity
for the given spaceKey and expands it if necessary.SpaceEntityList
getSpaceEntityList(SpaceEntityListContext ctx)
Gets theSpaceEntityList
for the givenSpaceEntityListContext
.
-
-
-
Constructor Detail
-
DefaultRestSpaceManager
public DefaultRestSpaceManager(SpaceManager spaceManager, PageManager pageManager, DefaultRestContentManager restContentManager, EntityBuilderFactory entityBuilderFactory)
- Since:
- 7.0.
-
-
Method Detail
-
expand
public SpaceEntity expand(SpaceEntity spaceEntity)
Description copied from interface:RestSpaceManager
Expands and returns the givenSpaceEntity
.- Specified by:
expand
in interfaceRestSpaceManager
- Parameters:
spaceEntity
- the space entity to expand- Returns:
- the expanded space entity
-
getSpaceEntity
public SpaceEntity getSpaceEntity(Space space)
-
getSpaceEntity
public SpaceEntity getSpaceEntity(String spaceKey, boolean expand)
Description copied from interface:RestSpaceManager
Gets theSpaceEntity
for the given spaceKey and expands it if necessary.It is responsible for doing any permission checking and conversion from Confluence's
Space
to aSpaceEntity
.null
is returned, if the current user is not permitted to view the space.- Specified by:
getSpaceEntity
in interfaceRestSpaceManager
- Parameters:
spaceKey
- the space key of the space to retrieveexpand
- whether to expand the space entity
-
getSpaceEntityList
public SpaceEntityList getSpaceEntityList(SpaceEntityListContext ctx)
Description copied from interface:RestSpaceManager
Gets theSpaceEntityList
for the givenSpaceEntityListContext
.It is up to the implementation to decide on default behaviour when values for in the context are not specified. The context passed in however, must not be null.
- Specified by:
getSpaceEntityList
in interfaceRestSpaceManager
- Parameters:
ctx
- the context for which the space entity list is retrieved in
-
-