org.apache.lenya.ac.impl
Class AbstractGroup

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.impl.AbstractItem
          extended by org.apache.lenya.ac.impl.AbstractGroup
All Implemented Interfaces:
java.lang.Comparable, org.apache.avalon.framework.logger.LogEnabled, org.apache.lenya.ac.Accreditable, org.apache.lenya.ac.Group, org.apache.lenya.ac.Identifiable, org.apache.lenya.ac.Item
Direct Known Subclasses:
FileGroup

public abstract class AbstractGroup
extends AbstractItem
implements org.apache.lenya.ac.Accreditable, org.apache.lenya.ac.Group

A group is a set of Groupables.


Constructor Summary
AbstractGroup(org.apache.lenya.ac.ItemManager itemManager, org.apache.avalon.framework.logger.Logger logger)
          Creates a new group.
AbstractGroup(org.apache.lenya.ac.ItemManager itemManager, org.apache.avalon.framework.logger.Logger logger, java.lang.String id)
          Creates a new group.
 
Method Summary
 void add(org.apache.lenya.ac.Groupable member)
          Adds a member to this group.
 boolean contains(org.apache.lenya.ac.Groupable member)
          Returns if this group contains this member.
 void delete()
          Delete a group
 org.apache.lenya.ac.Accreditable[] getAccreditables()
           
 org.apache.lenya.ac.Groupable[] getMembers()
          Returns the members of this group.
 void remove(org.apache.lenya.ac.Groupable member)
          Removes a member from this group.
 void removeAllMembers()
          Removes all members from this group.
 
Methods inherited from class org.apache.lenya.ac.impl.AbstractItem
compareTo, equals, getAccreditableManager, getDescription, getId, getItemManager, getName, hashCode, setDescription, setId, setName, toString
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.lenya.ac.Group
save
 
Methods inherited from interface org.apache.lenya.ac.Item
configure, getDescription, getId, getItemManager, getName, setDescription, setName
 
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
 

Constructor Detail

AbstractGroup

public AbstractGroup(org.apache.lenya.ac.ItemManager itemManager,
                     org.apache.avalon.framework.logger.Logger logger)
Creates a new group.

Parameters:
itemManager - The item manager.
logger - The logger.

AbstractGroup

public AbstractGroup(org.apache.lenya.ac.ItemManager itemManager,
                     org.apache.avalon.framework.logger.Logger logger,
                     java.lang.String id)
Creates a new group.

Parameters:
itemManager - The item manager.
logger - The logger.
id - The group ID.
Method Detail

getMembers

public org.apache.lenya.ac.Groupable[] getMembers()
Returns the members of this group.

Specified by:
getMembers in interface org.apache.lenya.ac.Group
Returns:
An array of Groupables.

add

public void add(org.apache.lenya.ac.Groupable member)
Adds a member to this group.

Specified by:
add in interface org.apache.lenya.ac.Group
Parameters:
member - The member to add.

remove

public void remove(org.apache.lenya.ac.Groupable member)
Removes a member from this group.

Specified by:
remove in interface org.apache.lenya.ac.Group
Parameters:
member - The member to remove.

removeAllMembers

public void removeAllMembers()
Removes all members from this group.

Specified by:
removeAllMembers in interface org.apache.lenya.ac.Group

contains

public boolean contains(org.apache.lenya.ac.Groupable member)
Returns if this group contains this member.

Specified by:
contains in interface org.apache.lenya.ac.Group
Parameters:
member - The member to check.
Returns:
A boolean value.

getAccreditables

public org.apache.lenya.ac.Accreditable[] getAccreditables()
Specified by:
getAccreditables in interface org.apache.lenya.ac.Accreditable
See Also:
Accreditable.getAccreditables()

delete

public void delete()
            throws org.apache.lenya.ac.AccessControlException
Delete a group

Specified by:
delete in interface org.apache.lenya.ac.Group
Throws:
org.apache.lenya.ac.AccessControlException - if the delete failed


Copyright $ Apache Software Foundation. All Rights Reserved.