org.exist.security
Class User

java.lang.Object
  extended byorg.exist.security.User

public class User
extends java.lang.Object

Description of the Class

Author:
Wolfgang Meier

Field Summary
static User DEFAULT
           
 
Constructor Summary
User(org.w3c.dom.Element node)
          Read a new user from the given DOM node
User(java.lang.String user)
          Create a new user with name
User(java.lang.String user, java.lang.String password)
          Create a new user with name and password
User(java.lang.String user, java.lang.String password, java.lang.String primaryGroup)
          Create a new user with name, password and primary group
 
Method Summary
 void addGroup(java.lang.String group)
          Add the user to a group
 java.util.Iterator getGroups()
          Get all groups this user belongs to
 java.lang.String getHome()
           
 java.lang.String getName()
          Get the user name
 java.lang.String getPassword()
          Get the user's password
 java.lang.String getPrimaryGroup()
          Get the primary group this user belongs to
 int getUID()
           
 boolean hasGroup(java.lang.String group)
          Is the user a member of group?
 void setHome(java.lang.String homeCollection)
           
 void setPassword(java.lang.String passwd)
          Sets the password attribute of the User object
 void setPasswordDigest(java.lang.String passwd)
          Sets the passwordDigest attribute of the User object
 void setUID(int uid)
           
 java.lang.String toString()
          Description of the Method
 boolean validate(java.lang.String passwd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final User DEFAULT
Constructor Detail

User

public User(java.lang.String user,
            java.lang.String password)
Create a new user with name and password

Parameters:
user - Description of the Parameter
password - Description of the Parameter

User

public User(java.lang.String user)
Create a new user with name

Parameters:
user - Description of the Parameter

User

public User(java.lang.String user,
            java.lang.String password,
            java.lang.String primaryGroup)
Create a new user with name, password and primary group

Parameters:
user - Description of the Parameter
password - Description of the Parameter
primaryGroup - Description of the Parameter

User

public User(org.w3c.dom.Element node)
     throws DatabaseConfigurationException
Read a new user from the given DOM node

Parameters:
node - Description of the Parameter
Throws:
DatabaseConfigurationException - Description of the Exception
Method Detail

addGroup

public final void addGroup(java.lang.String group)
Add the user to a group

Parameters:
group - The feature to be added to the Group attribute

getGroups

public final java.util.Iterator getGroups()
Get all groups this user belongs to

Returns:
The groups value

getName

public final java.lang.String getName()
Get the user name

Returns:
The user value

getUID

public final int getUID()

getPassword

public final java.lang.String getPassword()
Get the user's password

Returns:
Description of the Return Value

getPrimaryGroup

public final java.lang.String getPrimaryGroup()
Get the primary group this user belongs to

Returns:
The primaryGroup value

hasGroup

public final boolean hasGroup(java.lang.String group)
Is the user a member of group?

Parameters:
group - Description of the Parameter
Returns:
Description of the Return Value

setPassword

public final void setPassword(java.lang.String passwd)
Sets the password attribute of the User object

Parameters:
passwd - The new password value

setPasswordDigest

public final void setPasswordDigest(java.lang.String passwd)
Sets the passwordDigest attribute of the User object

Parameters:
passwd - The new passwordDigest value

toString

public final java.lang.String toString()
Description of the Method

Returns:
Description of the Return Value

validate

public final boolean validate(java.lang.String passwd)

setUID

public void setUID(int uid)

setHome

public void setHome(java.lang.String homeCollection)

getHome

public java.lang.String getHome()


Copyright (C) Wolfgang Meier. All rights reserved.