Jwma

dtw.webmail.util.config
Class Administration

java.lang.Object
  |
  +--dtw.webmail.util.config.Administration
All Implemented Interfaces:
java.io.Serializable

public class Administration
extends java.lang.Object
implements java.io.Serializable

This class...

Version:
(created Feb 24, 2003)
Author:
Dieter Wimberger (wimpi)
See Also:
Serialized Form

Constructor Summary
Administration()
           
 
Method Summary
 void addAdmin(java.lang.String username)
          Adds an administrator (by username).
 java.lang.String getAdminList()
          Convenience method for obtaining the admin users (by username) as a simple comma seperated list.
 boolean isAdmin(java.lang.String username)
          Tests if a given user (by username) has administrative rights.
 boolean isEnabled()
          Tests if the administration part is enabled.
 java.lang.String[] listAdmins()
          Returns the list of users (by username) with administrative rights.
 void removeAdmin(java.lang.String username)
          Removes an administrator (by username).
 void setAdminList(java.lang.String list)
          Convenience method for setting the admin users (by username) as a simple comma seperated list.
 void setEnabled(boolean b)
          Sets the flag that controls if the adminstration part is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Administration

public Administration()
Method Detail

isEnabled

public boolean isEnabled()
Tests if the administration part is enabled.

Returns:
true if enabled, false otherwise.

setEnabled

public void setEnabled(boolean b)
Sets the flag that controls if the adminstration part is enabled.

Parameters:
b - true if enabled, false otherwise.

getAdminList

public java.lang.String getAdminList()
Convenience method for obtaining the admin users (by username) as a simple comma seperated list.

Note that this is supposed to be helpful for simplifying the persistency mechanism.

Returns:
the list as String.

setAdminList

public void setAdminList(java.lang.String list)
Convenience method for setting the admin users (by username) as a simple comma seperated list.

Note that this is supposed to be helpful for simplifying the persistency mechanism.

Returns:
the list as String.

listAdmins

public java.lang.String[] listAdmins()
Returns the list of users (by username) with administrative rights.

Returns:
the list as String[].

addAdmin

public void addAdmin(java.lang.String username)
Adds an administrator (by username).

Parameters:
username - the username as String.

removeAdmin

public void removeAdmin(java.lang.String username)
Removes an administrator (by username).

Parameters:
username - the username as String.

isAdmin

public boolean isAdmin(java.lang.String username)
Tests if a given user (by username) has administrative rights.

Returns:
true if admin rights, false otherwise.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)