|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.schemedit.security.user.UserManager
public class UserManager
Manages User instances and provides information about users
inlcuding roles, attributes, preferences, etc.
Reads user data from disk as XML Files, provides run-time services to suport UI, and authentication
User.| Constructor Summary | |
|---|---|
UserManager(File userDataDir)
Constructor for the UserManager object |
|
| Method Summary | |
|---|---|
User |
createUser(String username)
Create a new User instance for provided user name. |
void |
deleteUser(String username)
Remove user associated with provided username from registry |
void |
destroy()
Destroy this Usermanager and all the managed users. |
void |
flush()
Write user data to disk. |
User |
getUser(String username)
Gets the User instance having supplied username, or null if user cannot be found. |
List |
getUserDisplayNames()
Return a listing of users including username and fullNames. |
List |
getUsers()
Returns a list of all user instances managed by this UserManager. |
List |
getUsers(Roles.Role maxRole)
Returns all users having role equal to or below maxRole. |
void |
load()
Reads the data dir, constructs user instances, and registers them |
static void |
main(String[] args)
The main program for the UserManager class |
protected static void |
prtln(String s)
NOT YET DOCUMENTED |
void |
register(User user)
Adds provided User instance to the managed users. |
void |
saveUser(User user)
Writes data for specified user to disk as XML file |
static void |
setDebug(boolean bool)
|
void |
showUsers()
Debugging method to print string representation of all managed users |
void |
unregister(User user)
Removes provided user from the managed users. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserManager(File userDataDir)
throws Exception
userDataDir - directory containing XML files of user data
Exception - if the directory cannot be processed| Method Detail |
|---|
public void load()
public User getUser(String username)
username - the username
public User createUser(String username)
throws Exception
username - the username
Exception - if user for provided username exists.public void deleteUser(String username)
username - username of user to delete
public void saveUser(User user)
throws Exception
user - user to be saved
Exception - if provided user does not have a usernamepublic List getUsers()
public List getUsers(Roles.Role maxRole)
maxRole - NOT YET DOCUMENTED
public void register(User user)
user - The feature to be added to the User attributepublic void unregister(User user)
user - User to unregister
public void flush()
throws Exception
First creates Document containing all user data, then reinitializes docMap with the Document so it will be written to disk.
Exception - NOT YET DOCUMENTED
public static void main(String[] args)
throws Exception
args - The command line arguments
Exception - NOT YET DOCUMENTEDpublic List getUserDisplayNames()
public void showUsers()
public void destroy()
public static void setDebug(boolean bool)
protected static void prtln(String s)
s - NOT YET DOCUMENTED
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||