com.atlassian.confluence.spaces
Interface SpaceGroupManager

All Known Implementing Classes:
DefaultSpaceGroupManager

public interface SpaceGroupManager


Method Summary
 SpaceGroup createSpaceGroup(String key, String name)
          Create a Space Group
 SpaceGroup createSpaceGroup(String key, String name, String creatorName)
          Create a space Group
 SpaceGroup getSpaceGroup(long id)
          Retrieve a space by its ID.
 SpaceGroup getSpaceGroup(String spaceGroupKey)
          Retrieve a spaceGroup by its key.
 List getSpaceGroups()
          Retrieves all SpaceGroups in the system
 Set<SpaceGroup> getSpaceGroupsForUser(String username)
           
 void removeSpaceGroup(SpaceGroup spaceGroup, boolean removeSpaces)
          Removes the spaceGroup without removing the space.
 void saveSpaceGroup(SpaceGroup spaceGroup)
           
 

Method Detail

createSpaceGroup

SpaceGroup createSpaceGroup(String key,
                            String name)
Create a Space Group


createSpaceGroup

SpaceGroup createSpaceGroup(String key,
                            String name,
                            String creatorName)
Create a space Group


saveSpaceGroup

void saveSpaceGroup(SpaceGroup spaceGroup)

removeSpaceGroup

void removeSpaceGroup(SpaceGroup spaceGroup,
                      boolean removeSpaces)
Removes the spaceGroup without removing the space. The contained spaces will be without a spaceGroup.


getSpaceGroup

SpaceGroup getSpaceGroup(long id)
Retrieve a space by its ID. The space can be of any type.

Parameters:
id - the ID of the space
Returns:
the space, or null if no space exists with that id.

getSpaceGroup

SpaceGroup getSpaceGroup(String spaceGroupKey)
Retrieve a spaceGroup by its key.

Parameters:
spaceGroupKey - the key of the spaceGroup to retrieve
Returns:
the spaceGroup, or null if no spaceGroup exists with that key

getSpaceGroups

List getSpaceGroups()
Retrieves all SpaceGroups in the system

Returns:
List of SpaceGroup objects

getSpaceGroupsForUser

Set<SpaceGroup> getSpaceGroupsForUser(String username)
Returns:
a set of space groups for the specified user, and empty set if none found.
Throws:
IllegalArgumentException - if username is null


Copyright © 2003–2015 Atlassian. All rights reserved.