|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.admin.AdminManager
public class AdminManager
The AdminManager manages the AdminProvider configured for this server, caches knowledge of accounts with admin permissions, and provides a single point of entry for handling getting and setting administrative accounts. The provider can be specified using the system property:
Method Summary | |
---|---|
void |
addAdminAccount(JID jid)
Adds a new account to the list of Admin accounts, based off a JID. |
void |
addAdminAccount(String username)
Adds a new account to the list of Admin accounts, based off a username, which will be converted into a JID. |
void |
clearAdminUsers()
Clears the list of admin users. |
List<JID> |
getAdminAccounts()
Returns the list of admin users from the provider. |
static AdminProvider |
getAdminProvider()
Returns the currently-installed AdminProvider. |
static AdminManager |
getInstance()
Returns a singleton instance of AdminManager. |
boolean |
isUserAdmin(JID jid,
boolean allowAdminIfEmpty)
Returns true if the user is an admin. |
boolean |
isUserAdmin(String username,
boolean allowAdminIfEmpty)
Returns true if the user is an admin. |
void |
refreshAdminAccounts()
Refreshs the list of admin users from the provider. |
void |
removeAdminAccount(JID jid)
Removes an account from the list of Admin accounts, based off JID. |
void |
removeAdminAccount(String username)
Removes an account from the list of Admin accounts, based off username, which will be converted to a JID. |
void |
setAdminJIDs(List<JID> jids)
Sets the list of admin users based off of a list of jids. |
void |
setAdminUsers(List<String> usernames)
Sets the list of admin users based off of a list of usernames. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AdminProvider getAdminProvider()
public static AdminManager getInstance()
public void refreshAdminAccounts()
public List<JID> getAdminAccounts()
public void addAdminAccount(String username)
username
- Username of account to add to list of admins.public void addAdminAccount(JID jid)
jid
- JID of account to add to list of admins.public void removeAdminAccount(String username)
username
- Username of user to remove from admin list.public void removeAdminAccount(JID jid)
jid
- JID of user to remove from admin list.public boolean isUserAdmin(String username, boolean allowAdminIfEmpty)
username
- Username of user to check whether they are an admin or not.allowAdminIfEmpty
- Allows the "admin" user to log in if the adminList is empty.
public boolean isUserAdmin(JID jid, boolean allowAdminIfEmpty)
jid
- JID of user to check whether they are an admin or not.allowAdminIfEmpty
- Allows the "admin" user to log in if the adminList is empty.
public void clearAdminUsers()
public void setAdminUsers(List<String> usernames)
usernames
- List of usernames to set as admins.public void setAdminJIDs(List<JID> jids)
jids
- List of jids to set as admins.
|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |