org.apache.lenya.ac.impl
Class AbstractGroup

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

public abstract class AbstractGroup
extends AbstractItem
implements Accreditable, Group

A group is a set of Groupables.


Constructor Summary
AbstractGroup()
          Creates a new group.
AbstractGroup(java.lang.String id)
          Creates a new group.
 
Method Summary
 void add(Groupable member)
          Adds a member to this group.
 boolean contains(Groupable member)
          Returns if this group contains this member.
 void delete()
          Delete a group
 Accreditable[] getAccreditables()
          Returns the set of accreditables of this accreditable.
 Groupable[] getMembers()
          Returns the members of this group.
 void remove(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
equals, getDescription, getId, getName, hashCode, isValidId, setDescription, setId, setName, toString
 
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, getName, setConfigurationDirectory, setDescription, setName
 

Constructor Detail

AbstractGroup

public AbstractGroup()
Creates a new group.


AbstractGroup

public AbstractGroup(java.lang.String id)
Creates a new group.

Parameters:
id - The group ID.
Method Detail

getMembers

public Groupable[] getMembers()
Returns the members of this group.

Specified by:
getMembers in interface Group
Returns:
An array of Groupables.

add

public void add(Groupable member)
Adds a member to this group.

Specified by:
add in interface Group
Parameters:
member - The member to add.

remove

public void remove(Groupable member)
Removes a member from this group.

Specified by:
remove in interface Group
Parameters:
member - The member to remove.

removeAllMembers

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

Specified by:
removeAllMembers in interface Group

contains

public boolean contains(Groupable member)
Returns if this group contains this member.

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

getAccreditables

public Accreditable[] getAccreditables()
Description copied from interface: Accreditable
Returns the set of accreditables of this accreditable. The set contains the accreditable itself and all collections it belongs to.

Specified by:
getAccreditables in interface Accreditable
Returns:
An array of accreditables.
See Also:
Accreditable.getAccreditables()

delete

public void delete()
            throws AccessControlException
Delete a group

Specified by:
delete in interface Group
Throws:
AccessControlException - if the delete failed


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.