dbXML API

## com.dbxml.db.common.security
Class AccessManagerClient

    java.lang.Object
      com.dbxml.db.client.xmlrpc.ConnectionManager
          com.dbxml.db.common.security.AccessManagerClient

public final class AccessManagerClient
extends ConnectionManager

AccessManagerClient

Field Summary

Fields inherited from class com.dbxml.db.client.xmlrpc.ConnectionManager
`CONNECTION, SECURE, STANDARD`

Constructor Summary
`AccessManagerClient(dbXMLClient dbxmlClient)`

Method Summary
`void` `addRole(java.lang.String roleID)` addRole adds a Role to the Database
`void` `addRoleToUser(java.lang.String userID, java.lang.String roleID)` addRoleToUser adds the specified roleID to the specified userID
`void` `addUser(java.lang.String userID)` addUser adds a new user to the Database
`void` `grant(java.lang.String path, java.lang.String roleID, int permissions)` grant grants access rights to the specified Role ID for the specified path.
`java.util.Map` `listAccessControl(java.lang.String path)` listAccessControl returns an access control list for the specified path.
`java.lang.String[]` `listRoles()` listRoles returns a list of the available Roles
`java.lang.String[]` `listRolesForUser(java.lang.String userID)` listRolesForUser lists the Roles that the specified userID is assigned
`java.lang.String[]` `listUsers()` listUsers returns a list of the available Users
`java.lang.String[]` `listUsersForRole(java.lang.String roleID)` listUsersForRole lists the Users that are assigned to a specified Role ID
`void` `removeRole(java.lang.String roleID)` removeRole removes a Role from the Database
`void` `removeRoleFromUser(java.lang.String userID, java.lang.String roleID)` removeRoleFromUser removes the specified roleID from the specified userID
`void` `removeUser(java.lang.String userID)` removeUser removes the specified userID from the Database
`void` `revoke(java.lang.String path, java.lang.String roleID, int permissions)` revoke revokes access rights from the specified role ID for the specified path.
`void` `setUserPassword(java.lang.String userID, java.lang.String password)` setUserPassword sets the User's password.

Methods inherited from class com.dbxml.db.client.xmlrpc.ConnectionManager
`execute, executeBinary, executeBoolean, executeInt, executeList, executeMap, executeString, getClientPath, getProperties, getProperty, getXmlRpcClient, listProperties, setClientPath, setProperty`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AccessManagerClient

    public AccessManagerClient(dbXMLClient dbxmlClient)

Method Detail

### listUsers

    public java.lang.String[] listUsers()
                                 throws dbXMLException

  listUsers returns a list of the available Users

  Returns:
    The User list
  Throws:
    `dbXMLException`

### addUser

    public void addUser(java.lang.String userID)
                 throws dbXMLException

  addUser adds a new user to the Database

  Parameters:
    `userID` - The User's ID
  Throws:
    `dbXMLException`

### setUserPassword

    public void setUserPassword(java.lang.String userID,
                                java.lang.String password)
                         throws dbXMLException

  setUserPassword sets the User's password. A User cannot be authenticated against Database resources without having a password set.

  Parameters:
    `userID` - The User's ID
    `password` - The User's new password
  Throws:
    `dbXMLException`

### listRolesForUser

    public java.lang.String[] listRolesForUser(java.lang.String userID)
                                        throws dbXMLException

  listRolesForUser lists the Roles that the specified userID is assigned

  Parameters:
    `userID` - The User's ID
  Returns:
    The Role list
  Throws:
    `dbXMLException`

### addRoleToUser

    public void addRoleToUser(java.lang.String userID,
                              java.lang.String roleID)
                       throws dbXMLException

  addRoleToUser adds the specified roleID to the specified userID

  Parameters:
    `userID` - The User's ID
    `roleID` - the Role ID to assign
  Throws:
    `dbXMLException`

### removeRoleFromUser

    public void removeRoleFromUser(java.lang.String userID,
                                   java.lang.String roleID)
                            throws dbXMLException

  removeRoleFromUser removes the specified roleID from the specified userID

  Parameters:
    `userID` - The User's ID
    `roleID` - the Role ID to remove
  Throws:
    `dbXMLException`

### removeUser

    public void removeUser(java.lang.String userID)
                    throws dbXMLException

  removeUser removes the specified userID from the Database

  Parameters:
    `userID` - The User's ID
  Throws:
    `dbXMLException`

### listRoles

    public java.lang.String[] listRoles()
                                 throws dbXMLException

  listRoles returns a list of the available Roles

  Returns:
    The Role list
  Throws:
    `dbXMLException`

### listUsersForRole

    public java.lang.String[] listUsersForRole(java.lang.String roleID)
                                        throws dbXMLException

  listUsersForRole lists the Users that are assigned to a specified Role ID

  Parameters:
    `roleID` - The Role ID
  Returns:
    The User list
  Throws:
    `dbXMLException`

### addRole

    public void addRole(java.lang.String roleID)
                 throws dbXMLException

  addRole adds a Role to the Database

  Parameters:
    `roleID` - The Role ID to add
  Throws:
    `dbXMLException`

### removeRole

    public void removeRole(java.lang.String roleID)
                    throws dbXMLException

  removeRole removes a Role from the Database

  Parameters:
    `roleID` - The Role ID to remove
  Throws:
    `dbXMLException`

### listAccessControl

    public java.util.Map listAccessControl(java.lang.String path)
                                    throws dbXMLException

  listAccessControl returns an access control list for the specified path. The access control list is a Map that keys role IDs to Integer permission requirements.

  Parameters:
    `path` - The Path to check
  Returns:
    The access control list
  Throws:
    `dbXMLException`

### grant

    public void grant(java.lang.String path,
                      java.lang.String roleID,
                      int permissions)
               throws dbXMLException

  grant grants access rights to the specified Role ID for the specified path.

  Parameters:
    `path` - The path to modify
    `roleID` - The Role to grant permissions to
    `permissions` - A permission set to grant
  Throws:
    `dbXMLException`

### revoke

    public void revoke(java.lang.String path,
                       java.lang.String roleID,
                       int permissions)
                throws dbXMLException

  revoke revokes access rights from the specified role ID for the specified path.

  Parameters:
    `path` - The path to modify
    `roleID` - The Role to grant permissions to
    `permissions` - A permission set to grant
  Throws:
    `dbXMLException`

dbXML API

Copyright (c) 2004 The dbXML Group