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

Author:
Sameer Charles $Id: MgnlGroup.java 33093 2010-03-19 21:16:40Z gjoseph $
See Also:
Serialized Form

Constructor Summary
protected MgnlGroup(Content groupNode)
           
 
Method Summary
 void addGroup(java.lang.String groupName)
          add subgroup to this group
 void addRole(java.lang.String roleName)
          add role to this group
 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()
          get name of this node
 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)
          returns true if role exist in this group
 void removeGroup(java.lang.String groupName)
          remove subgroup from this group
 void removeRole(java.lang.String roleName)
          remove role from this group
 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()
get name of this node

Specified by:
getName in interface Group
Returns:
group name

addRole

public void addRole(java.lang.String roleName)
             throws java.lang.UnsupportedOperationException,
                    AccessDeniedException
add role to this group

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

addGroup

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

Specified by:
addGroup in interface Group
Parameters:
groupName -
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
remove role from this group

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

removeGroup

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

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

hasRole

public boolean hasRole(java.lang.String roleName)
                throws java.lang.UnsupportedOperationException,
                       AccessDeniedException
returns true if role exist in this group

Specified by:
hasRole in interface Group
Parameters:
roleName -
Throws:
java.lang.UnsupportedOperationException - if the implementation does not exist
AccessDeniedException - if loggen in repository user does not sufficient rights

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-2010 Magnolia International Ltd.. All Rights Reserved.