org.apache.lenya.ac.file
Class FileGroupManager

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

public final class FileGroupManager
extends FileItemManager
implements org.apache.lenya.ac.GroupManager

File-based group manager.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lenya.ac.file.FileItemManager
FileItemManager.DirectoryChangeNotifier
 
Field Summary
protected static java.lang.String SUFFIX
           
 
Method Summary
 org.apache.lenya.ac.Group add(java.lang.String id)
           
 org.apache.lenya.ac.Group getGroup(java.lang.String groupId)
          Get the group with the given group name.
 org.apache.lenya.ac.Group[] getGroups()
          Get all groups
protected  java.lang.String getSuffix()
          Returns the file extension to be used.
static FileGroupManager instance(org.apache.lenya.ac.AccreditableManager mgr, java.io.File configurationDirectory, org.apache.avalon.framework.logger.Logger logger)
          Return the GroupManager for the given publication.
 void remove(org.apache.lenya.ac.Group group)
          Remove a group from this manager
 
Methods inherited from class org.apache.lenya.ac.file.FileItemManager
add, addItemManagerListener, configure, contains, getAccreditableManager, getConfigurationDirectory, getFileFilter, getItem, getItemConfiguration, getItems, loadItem, loadItems, notifyAdded, notifyRemoved, remove, removeItem, removeItemManagerListener, update
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
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, getAccreditableManager, removeItemManagerListener
 

Field Detail

SUFFIX

protected static final java.lang.String SUFFIX
See Also:
Constant Field Values
Method Detail

instance

public static FileGroupManager instance(org.apache.lenya.ac.AccreditableManager mgr,
                                        java.io.File configurationDirectory,
                                        org.apache.avalon.framework.logger.Logger logger)
                                 throws org.apache.lenya.ac.AccessControlException
Return the GroupManager for the given publication. The GroupManager is a singleton.

Parameters:
mgr - The accreditable manager.
configurationDirectory - for which the GroupManager is requested
logger - The logger.
Returns:
a GroupManager
Throws:
org.apache.lenya.ac.AccessControlException - if no GroupManager could be instanciated

getGroups

public org.apache.lenya.ac.Group[] getGroups()
Get all groups

Specified by:
getGroups in interface org.apache.lenya.ac.GroupManager
Returns:
an array of groups.

add

public org.apache.lenya.ac.Group add(java.lang.String id)
                              throws org.apache.lenya.ac.AccessControlException
Specified by:
add in interface org.apache.lenya.ac.GroupManager
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
GroupManager.add(java.lang.String)

remove

public void remove(org.apache.lenya.ac.Group group)
            throws org.apache.lenya.ac.AccessControlException
Remove a group from this manager

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

getGroup

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

Specified by:
getGroup in interface org.apache.lenya.ac.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 $ Apache Software Foundation. All Rights Reserved.