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
 com.atlassian.license.License getLicenseForSpace(String spaceKey)
          Get the license attached to the group of the space.
 com.atlassian.license.License getLicenseForSpaceGroup(String spaceGroupKey)
          Get the license attached to the space group and create a new license object
 SpaceGroup getSpaceGroup(long id)
          Retrieve a space by its ID.
 SpaceGroup getSpaceGroup(String spaceGroupKey)
          Retrieve a spaceGroup by its key.
 com.atlassian.license.License getSpaceGroupLicense(SpaceGroup spaceGroup)
          Retrieves a license stored against a given SpaceGroup
 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 removeSpaceGroupLicense(SpaceGroup spaceGroup)
          Removes the license key from the given spaceGroup
 void saveSpaceGroup(SpaceGroup spaceGroup)
           
 void setSpaceGroupLicense(SpaceGroup spaceGroup, String licenseKey)
          Stores a license key against a given 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

getSpaceGroupLicense

com.atlassian.license.License getSpaceGroupLicense(SpaceGroup spaceGroup)
Retrieves a license stored against a given SpaceGroup

Parameters:
spaceGroup - SpaceGroup to retrieve the License from
Returns:
License stored against the SpaceGroup

setSpaceGroupLicense

void setSpaceGroupLicense(SpaceGroup spaceGroup,
                          String licenseKey)
                          throws com.atlassian.license.LicenseException
Stores a license key against a given SpaceGroup

Parameters:
spaceGroup - SpaceGroup to store the license against
licenseKey - String of the license key
Throws:
com.atlassian.license.LicenseException - if the license cannot be stored.

removeSpaceGroupLicense

void removeSpaceGroupLicense(SpaceGroup spaceGroup)
Removes the license key from the given spaceGroup


getSpaceGroups

List getSpaceGroups()
Retrieves all SpaceGroups in the system

Returns:
List of SpaceGroup objects

getLicenseForSpaceGroup

com.atlassian.license.License getLicenseForSpaceGroup(String spaceGroupKey)
Get the license attached to the space group and create a new license object

Parameters:
spaceGroupKey - key of the space group
Returns:
License

getLicenseForSpace

com.atlassian.license.License getLicenseForSpace(String spaceKey)
Get the license attached to the group of the space. If the space is not part of a spacegroup, return null.

Parameters:
spaceKey - key of the space
Returns:
License

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-2011 Atlassian. All Rights Reserved.