net.cfoster.sedna
Interface UserManagementService

All Superinterfaces:
Configurable, Service

public interface UserManagementService
extends Service

UserManagementService allows a DBA (Database Administrator) or a user with appropriate privileges to manage users, and their individual Privileges.

This interface class is proprietary to the Sedna XML:DB API and is not part of the original XML:DB specification.

Since:
Sedna XML:DB 1.2

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void createUser(java.lang.String username, java.lang.String password)
          Create a new user with a specified password.
 Privileges getPrivileges(java.lang.String username)
          Retrieve a Privileges data access object for a particular user in this database.
 java.lang.String[] listUsers()
          Retrieve a list of all current users held within the database.
 void removeUser(java.lang.String username)
          Drops a user from the database based on their username.
 void setPassword(java.lang.String username, java.lang.String password)
          Sets a new password for the user who has the given username.
 
Methods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Field Detail

SERVICE_NAME

static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

createUser

void createUser(java.lang.String username,
                java.lang.String password)
                throws XMLDBException
Create a new user with a specified password.

Parameters:
username - the user id of the new user account, must be unique.
password - the initial password value for the new user account.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

removeUser

void removeUser(java.lang.String username)
                throws XMLDBException
Drops a user from the database based on their username.

Parameters:
username - the user account which will be deleted.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

getPrivileges

Privileges getPrivileges(java.lang.String username)
                         throws XMLDBException
Retrieve a Privileges data access object for a particular user in this database.

Parameters:
username - is the user id of the user to gain a Privileges data access object.
Returns:
a Privileges data access object.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

setPassword

void setPassword(java.lang.String username,
                 java.lang.String password)
                 throws XMLDBException
Sets a new password for the user who has the given username.

Parameters:
username - the user who will get a new password.
password - the new password for the specified username account.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

listUsers

java.lang.String[] listUsers()
                             throws XMLDBException
Retrieve a list of all current users held within the database.

Returns:
a String[] of user ids within this database.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2