com.atlassian.confluence.spaces
Class DefaultSpaceGroupManager

java.lang.Object
  extended by com.atlassian.confluence.spaces.DefaultSpaceGroupManager
All Implemented Interfaces:
SpaceGroupManager

public class DefaultSpaceGroupManager
extends Object
implements SpaceGroupManager


Constructor Summary
DefaultSpaceGroupManager()
           
 
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)
          Currently this method will return a all spacegroups the user has access to.
 void removeSpaceGroup(SpaceGroup spaceGroup, boolean removeSpaces)
          Removes the spaceGroup without removing the space.
 void saveSpaceGroup(SpaceGroup spaceGroup)
           
 void setSpaceGroupDao(SpaceGroupDao spaceGroupDao)
           
 void setSpaceGroupPermissionManager(SpaceGroupPermissionManager spaceGroupPermissionManager)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSpaceGroupManager

public DefaultSpaceGroupManager()
Method Detail

createSpaceGroup

public SpaceGroup createSpaceGroup(String key,
                                   String name)
Description copied from interface: SpaceGroupManager
Create a Space Group

Specified by:
createSpaceGroup in interface SpaceGroupManager

createSpaceGroup

public SpaceGroup createSpaceGroup(String key,
                                   String name,
                                   String creatorName)
Description copied from interface: SpaceGroupManager
Create a space Group

Specified by:
createSpaceGroup in interface SpaceGroupManager

saveSpaceGroup

public void saveSpaceGroup(SpaceGroup spaceGroup)
Specified by:
saveSpaceGroup in interface SpaceGroupManager

removeSpaceGroup

public void removeSpaceGroup(SpaceGroup spaceGroup,
                             boolean removeSpaces)
Description copied from interface: SpaceGroupManager
Removes the spaceGroup without removing the space. The contained spaces will be without a spaceGroup.

Specified by:
removeSpaceGroup in interface SpaceGroupManager

getSpaceGroup

public SpaceGroup getSpaceGroup(long id)
Description copied from interface: SpaceGroupManager
Retrieve a space by its ID. The space can be of any type.

Specified by:
getSpaceGroup in interface SpaceGroupManager
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)
Description copied from interface: SpaceGroupManager
Retrieve a spaceGroup by its key.

Specified by:
getSpaceGroup in interface SpaceGroupManager
Parameters:
spaceGroupKey - the key of the spaceGroup to retrieve
Returns:
the spaceGroup, or null if no spaceGroup exists with that key

getSpaceGroups

public List getSpaceGroups()
Description copied from interface: SpaceGroupManager
Retrieves all SpaceGroups in the system

Specified by:
getSpaceGroups in interface SpaceGroupManager
Returns:
List of SpaceGroup objects

getSpaceGroupsForUser

public Set<SpaceGroup> getSpaceGroupsForUser(String username)
Currently this method will return a all spacegroups the user has access to. Not matter what permission he has.

Specified by:
getSpaceGroupsForUser in interface SpaceGroupManager
Parameters:
username - The name of the user
Returns:
Set of SpaceGroups

setSpaceGroupDao

public void setSpaceGroupDao(SpaceGroupDao spaceGroupDao)

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

setSpaceGroupPermissionManager

public void setSpaceGroupPermissionManager(SpaceGroupPermissionManager spaceGroupPermissionManager)


Copyright © 2003–2015 Atlassian. All rights reserved.