info.magnolia.cms.security
Class MgnlGroup

java.lang.Object
  extended by info.magnolia.cms.security.MgnlGroup
All Implemented Interfaces:
Group, Serializable

public class MgnlGroup
extends Object
implements Group

A group stored in the ContentRepository.USER_GROUPS workspace.

Author:
Sameer Charles $Id: MgnlGroup.java 41137 2011-01-06 18:19:25Z gjoseph $
See Also:
Serialized Form

Constructor Summary
protected MgnlGroup(Content groupNode)
           
 
Method Summary
 void addGroup(String groupName)
          Add a subgroup to this group.
 void addRole(String roleName)
           
 Collection<String> getAllGroups()
          Get all groups assigned to this group, collected recursively from subgroups.
 Content getGroupNode()
           
 Collection<String> getGroups()
          Get groups that are directly assigned to group.
 String getName()
           
 String getProperty(String propertyName)
          Gets an arbitrary property from this group.
 Collection<String> getRoles()
          Get roles that are directly assigned to group.
 boolean hasRole(String roleName)
           
 void removeGroup(String groupName)
          Remove a subgroup from this group.
 void removeRole(String roleName)
           
 void setProperty(String propertyName, String value)
          Sets an arbitrary property for this group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MgnlGroup

protected MgnlGroup(Content groupNode)
Parameters:
groupNode - the Content object representing this group
Method Detail

getName

public String getName()
Specified by:
getName in interface Group

addRole

public void addRole(String roleName)
             throws UnsupportedOperationException,
                    AccessDeniedException
Specified by:
addRole in interface Group
Throws:
UnsupportedOperationException
AccessDeniedException

addGroup

public void addGroup(String groupName)
              throws UnsupportedOperationException,
                     AccessDeniedException
Add a subgroup to this group.

Specified by:
addGroup in interface Group
Throws:
UnsupportedOperationException - if the implementation does not support writing
AccessDeniedException - if loggen in repository user does not sufficient rights

removeRole

public void removeRole(String roleName)
                throws UnsupportedOperationException,
                       AccessDeniedException
Specified by:
removeRole in interface Group
Throws:
UnsupportedOperationException
AccessDeniedException

removeGroup

public void removeGroup(String groupName)
                 throws UnsupportedOperationException,
                        AccessDeniedException
Remove a subgroup from this group.

Specified by:
removeGroup in interface Group
Throws:
UnsupportedOperationException
AccessDeniedException

hasRole

public boolean hasRole(String roleName)
                throws UnsupportedOperationException,
                       AccessDeniedException
Specified by:
hasRole in interface Group
Throws:
UnsupportedOperationException
AccessDeniedException

getProperty

public String getProperty(String propertyName)
Description copied from interface: Group
Gets an arbitrary property from this group.

Specified by:
getProperty in interface Group

setProperty

public void setProperty(String propertyName,
                        String value)
Description copied from interface: Group
Sets an arbitrary property for this group.

Specified by:
setProperty in interface Group

getRoles

public Collection<String> getRoles()
Description copied from interface: Group
Get roles that are directly assigned to group.

Specified by:
getRoles in interface Group

getGroups

public Collection<String> getGroups()
Description copied from interface: Group
Get groups that are directly assigned to group.

Specified by:
getGroups in interface Group

getAllGroups

public Collection<String> getAllGroups()
Description copied from interface: Group
Get all groups assigned to this group, collected recursively from subgroups.

Specified by:
getAllGroups in interface Group

getGroupNode

public Content getGroupNode()


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.