SK.gnome.dwarf.mail.store
Class FileACLStore

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.mail.store.GenericFileStore
          extended bySK.gnome.dwarf.mail.store.FileACLStore
All Implemented Interfaces:
ACLStore, SK.gnome.dwarf.Service

public class FileACLStore
extends GenericFileStore
implements ACLStore

This class provides a filesystem-based ACL store.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.mail.store.GenericFileStore
autoCreate, backupObjects, letterSubdirs, userBaseDir
 
Fields inherited from class SK.gnome.dwarf.GenericService
initParameters, parent
 
Fields inherited from interface SK.gnome.dwarf.Service
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED
 
Constructor Summary
FileACLStore(java.lang.String name)
          Creates a new FileACLStore.
 
Method Summary
 void addPermission(java.lang.String user, MailPermission perm)
          Grants the mail permission to the given user.
 MailPermission[] getPermissions(java.lang.String user)
          Returns all mail permissions granted to the given user.
 void removePermission(java.lang.String user, MailPermission perm)
          Revokes the mail permission from the given user.
 void removePermissions(java.lang.String user, java.lang.String mailbox)
          Revokes all mail permission from the given user and mailbox.
 void setPermission(java.lang.String user, MailPermission perm)
          Replaces the mail permission of the given user.
 
Methods inherited from class SK.gnome.dwarf.mail.store.GenericFileStore
create, exists, getUserDirectory, init, listUsers, lock, readObject, remove, setAutoCreate, setBackupObjects, setLetterSubdirs, setUserBaseDir, storeObject, unlock
 
Methods inherited from class SK.gnome.dwarf.GenericService
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, getPrincipal, getShutdownTimeout, getState, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, shutdown, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface SK.gnome.dwarf.mail.store.ACLStore
listUsers
 

Constructor Detail

FileACLStore

public FileACLStore(java.lang.String name)
Creates a new FileACLStore.

Method Detail

addPermission

public void addPermission(java.lang.String user,
                          MailPermission perm)
                   throws MailException
Description copied from interface: ACLStore
Grants the mail permission to the given user.

Specified by:
addPermission in interface ACLStore
Parameters:
user - the user identification
perm - the mail permission
Throws:
MailException - if an error occured

setPermission

public void setPermission(java.lang.String user,
                          MailPermission perm)
                   throws MailException
Description copied from interface: ACLStore
Replaces the mail permission of the given user.

Specified by:
setPermission in interface ACLStore
Parameters:
user - the user identification
perm - the mail permission
Throws:
MailException - if an error occured

removePermission

public void removePermission(java.lang.String user,
                             MailPermission perm)
                      throws MailException
Description copied from interface: ACLStore
Revokes the mail permission from the given user.

Specified by:
removePermission in interface ACLStore
Parameters:
user - the user identification
perm - the mail permission
Throws:
MailException - if an error occured

removePermissions

public void removePermissions(java.lang.String user,
                              java.lang.String mailbox)
                       throws MailException
Description copied from interface: ACLStore
Revokes all mail permission from the given user and mailbox.

Specified by:
removePermissions in interface ACLStore
Parameters:
user - the user identification
mailbox - the full mailbox name
Throws:
MailException - if an error occured

getPermissions

public MailPermission[] getPermissions(java.lang.String user)
                                throws MailException
Description copied from interface: ACLStore
Returns all mail permissions granted to the given user.

Specified by:
getPermissions in interface ACLStore
Parameters:
user - the user identification
Returns:
the granted mail permissions
Throws:
MailException - if an error occured


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.