info.magnolia.cms.security
Class MgnlGroup

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

public class MgnlGroup
extends java.lang.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(java.lang.String groupName)
          Add a subgroup to this group.
 void addRole(java.lang.String roleName)
           
 java.util.Collection<java.lang.String> getAllGroups()
          Get all groups assigned to this group, collected recursively from subgroups.
 Content getGroupNode()
           
 java.util.Collection<java.lang.String> getGroups()
          Get groups that are directly assigned to group.
 java.lang.String getName()
           
 java.lang.String getProperty(java.lang.String propertyName)
          Gets an arbitrary property from this group.
 java.util.Collection<java.lang.String> getRoles()
          Get roles that are directly assigned to group.
 boolean hasRole(java.lang.String roleName)
           
 void removeGroup(java.lang.String groupName)
          Remove a subgroup from this group.
 void removeRole(java.lang.String roleName)
           
 void setProperty(java.lang.String propertyName, java.lang.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 java.lang.String getName()
Specified by:
getName in interface Group

addRole

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

addGroup

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

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

removeRole

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

removeGroup

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

Specified by:
removeGroup in interface Group
Throws:
java.lang.UnsupportedOperationException
AccessDeniedException

hasRole

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

getProperty

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

Specified by:
getProperty in interface Group

setProperty

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

Specified by:
setProperty in interface Group

getRoles

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

Specified by:
getRoles in interface Group

getGroups

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

Specified by:
getGroups in interface Group

getAllGroups

public java.util.Collection<java.lang.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-2011 Magnolia International Ltd.. All Rights Reserved.