net.cfoster.sedna
Interface RoleManagementService

All Superinterfaces:
Configurable, Service

public interface RoleManagementService
extends Service

RoleManagementService allows Sedna XML:DB users to add, delete, list and and modify roles within the Sedna database.

Roles can be granted to multiple users, so changing privileges for multiple users at once can become easier instead of changing privileges for each user individually.

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 createRole(java.lang.String roleId)
          Create a new role within the database, the name of the role must be unique and is specified by the roleId argument.
 Privileges getPrivileges(java.lang.String roleId)
          Retrieve a Privileges data access object for this role in the database.
 java.lang.String[] listRoles()
          Retrieve a list of all current roles held within the database.
 void removeRole(java.lang.String roleId)
          Removes a role within the database based on the given roleId argument.
 
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

createRole

void createRole(java.lang.String roleId)
                throws XMLDBException
Create a new role within the database, the name of the role must be unique and is specified by the roleId argument.

Parameters:
roleId - is the unique name of the new role to be created.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

removeRole

void removeRole(java.lang.String roleId)
                throws XMLDBException
Removes a role within the database based on the given roleId argument.

Parameters:
roleId - the id of the role to be removed from this database.
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

getPrivileges

Privileges getPrivileges(java.lang.String roleId)
                         throws XMLDBException
Retrieve a Privileges data access object for this role in the database.

Parameters:
roleId - the id of the role for which you will receive the privileges data access object.
Returns:
Privileges data access object
Throws:
XMLDBException
Since:
Sedna XML:DB 1.2

listRoles

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

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