com.atlassian.confluence.spaces
Interface SpaceGroupManager

All Known Implementing Classes:
DefaultSpaceGroupManager

public interface SpaceGroupManager


Method Summary
 SpaceGroup createSpaceGroup(String key, String name, String creatorName)
           
 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
 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

public SpaceGroup createSpaceGroup(String key,
                                   String name,
                                   String creatorName)

saveSpaceGroup

public void saveSpaceGroup(SpaceGroup spaceGroup)

removeSpaceGroup

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

Parameters:
spaceGroup -
removeSpaces -

getSpaceGroup

public 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

public 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

public 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

public 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

removeSpaceGroupLicense

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

Parameters:
spaceGroup -

getSpaceGroups

public List getSpaceGroups()
Retrieves all SpaceGroups in the system

Returns:
List of SpaceGroup objects

getLicenseForSpaceGroup

public 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

public 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


Confluence is developed by Atlassian.