com.atlassian.confluence.spaces
Interface SpaceGroupManager

All Known Implementing Classes:
DefaultSpaceGroupManager

public interface SpaceGroupManager


Method Summary
 SpaceGroup createSpaceGroup(java.lang.String key, java.lang.String name)
          Create a Space Group
 SpaceGroup createSpaceGroup(java.lang.String key, java.lang.String name, java.lang.String creatorName)
          Create a space Group
 com.atlassian.license.License getLicenseForSpace(java.lang.String spaceKey)
          Get the license attached to the group of the space.
 com.atlassian.license.License getLicenseForSpaceGroup(java.lang.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(java.lang.String spaceGroupKey)
          Retrieve a spaceGroup by its key.
 com.atlassian.license.License getSpaceGroupLicense(SpaceGroup spaceGroup)
          Retrieves a license stored against a given SpaceGroup
 java.util.List getSpaceGroups()
          Retrieves all SpaceGroups in the system
 java.util.Set<SpaceGroup> getSpaceGroupsForUser(java.lang.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, java.lang.String licenseKey)
          Stores a license key against a given SpaceGroup
 

Method Detail

createSpaceGroup

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


createSpaceGroup

SpaceGroup createSpaceGroup(java.lang.String key,
                            java.lang.String name,
                            java.lang.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(java.lang.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,
                          java.lang.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

java.util.List getSpaceGroups()
Retrieves all SpaceGroups in the system

Returns:
List of SpaceGroup objects

getLicenseForSpaceGroup

com.atlassian.license.License getLicenseForSpaceGroup(java.lang.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(java.lang.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

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.