org.apache.lenya.ac.file
Class FileGroupManager

java.lang.Object
  extended by org.apache.lenya.ac.file.FileItemManager
      extended by org.apache.lenya.ac.file.FileGroupManager
All Implemented Interfaces:
GroupManager, ItemManager

public final class FileGroupManager
extends FileItemManager
implements GroupManager

File-based group manager.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lenya.ac.file.FileItemManager
FileItemManager.DirectoryChangeNotifier
 
Field Summary
 
Fields inherited from class org.apache.lenya.ac.file.FileItemManager
PATH
 
Method Summary
 void add(Group group)
          Add a group to this manager
 Group getGroup(java.lang.String groupId)
          Get the group with the given group name.
 Group[] getGroups()
          Get all groups
protected  java.lang.String getSuffix()
          Returns the file extension to be used.
static FileGroupManager instance(java.io.File configurationDirectory)
          Return the GroupManager for the given publication.
 void remove(Group group)
          Remove a group from this manager
 
Methods inherited from class org.apache.lenya.ac.file.FileItemManager
add, addItemManagerListener, contains, getConfigurationDirectory, getFileFilter, getItem, getItemClass, getItemConfiguration, getItems, loadItem, loadItems, notifyAdded, notifyRemoved, remove, removeItem, removeItemManagerListener, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lenya.ac.ItemManager
addItemManagerListener, removeItemManagerListener
 

Method Detail

instance

public static FileGroupManager instance(java.io.File configurationDirectory)
                                 throws AccessControlException
Return the GroupManager for the given publication. The GroupManager is a singleton.

Parameters:
configurationDirectory - for which the GroupManager is requested
Returns:
a GroupManager
Throws:
AccessControlException - if no GroupManager could be instanciated

getGroups

public Group[] getGroups()
Get all groups

Specified by:
getGroups in interface GroupManager
Returns:
an array of groups.

add

public void add(Group group)
         throws AccessControlException
Add a group to this manager

Specified by:
add in interface GroupManager
Parameters:
group - the group to be added
Throws:
AccessControlException - when the notification failed.

remove

public void remove(Group group)
            throws AccessControlException
Remove a group from this manager

Specified by:
remove in interface GroupManager
Parameters:
group - the group to be removed
Throws:
AccessControlException - when the notification failed.

getGroup

public Group getGroup(java.lang.String groupId)
Get the group with the given group name.

Specified by:
getGroup in interface GroupManager
Parameters:
groupId - the id of the requested group
Returns:
a Group or null if there is no group with the given name

getSuffix

protected java.lang.String getSuffix()
Description copied from class: FileItemManager
Returns the file extension to be used.

Specified by:
getSuffix in class FileItemManager
Returns:
A string.
See Also:
FileItemManager.getSuffix()


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