dbXML API

com.dbxml.db.core.security
Class AccessUtils

java.lang.Object
  extended bycom.dbxml.db.core.security.AccessUtils

public final class AccessUtils
extends java.lang.Object

AccessUtils manages Users, Roles, and Access control lists for dbXML. This class is provided as a convenience engine for SecurityManager implementations, though some SecurityManagers may choose to utilize other methods of managing permissions.


Constructor Summary
AccessUtils(Database database)
           
 
Method Summary
 java.lang.String[] listPaths()
           
 java.lang.String[] listRoles()
           
 java.lang.String[] listUsers()
           
 java.lang.String[] listUsersForRole(java.lang.String roleID)
           
 Access readAccess(java.lang.String path)
           
 Role readRole(java.lang.String roleID)
           
 User readUser(java.lang.String userID)
           
 void removeAccess(java.lang.String path)
           
 void removeRole(Role role)
           
 void removeUser(User user)
           
 void storeAccess(Access access)
           
 void storeRole(Role role)
           
 void storeUser(User user)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessUtils

public AccessUtils(Database database)
Method Detail

listUsers

public java.lang.String[] listUsers()
                             throws DBException
Throws:
DBException

readUser

public User readUser(java.lang.String userID)
              throws InvalidUserException
Throws:
InvalidUserException

storeUser

public void storeUser(User user)
               throws DBException
Throws:
DBException

removeUser

public void removeUser(User user)
                throws DBException
Throws:
DBException

listRoles

public java.lang.String[] listRoles()
                             throws DBException
Throws:
DBException

listUsersForRole

public java.lang.String[] listUsersForRole(java.lang.String roleID)
                                    throws DBException
Throws:
DBException

readRole

public Role readRole(java.lang.String roleID)
              throws InvalidRoleException
Throws:
InvalidRoleException

storeRole

public void storeRole(Role role)
               throws DBException
Throws:
DBException

removeRole

public void removeRole(Role role)
                throws DBException
Throws:
DBException

listPaths

public java.lang.String[] listPaths()
                             throws DBException
Throws:
DBException

readAccess

public Access readAccess(java.lang.String path)
                  throws InvalidAccessException
Throws:
InvalidAccessException

storeAccess

public void storeAccess(Access access)
                 throws DBException
Throws:
DBException

removeAccess

public void removeAccess(java.lang.String path)
                  throws DBException
Throws:
DBException

dbXML API

Copyright (c) 2004 The dbXML Group