Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.xmldb
Class RemoteUserManagementService

    java.lang.Object
      org.exist.xmldb.RemoteUserManagementService

All Implemented Interfaces:
  Configurable, Service, UserManagementService

public class RemoteUserManagementService
extends java.lang.Object
implements UserManagementService

Constructor Summary
`RemoteUserManagementService(RemoteCollection collection)`

Method Summary
`void` | `addUser(User user)` Add a new user account
`void` | `chmod(int mode)`
`void` | `chmod(Resource res, int mode)` Change permissions for the specified resource.
`void` | `chmod(Resource res, java.lang.String mode)` Change access mode of a resource
`void` | `chmod(java.lang.String mode)` Change access mode of the current collection
`void` | `chown(Resource res, User u, java.lang.String group)` Change the owner of a resource
`void` | `chown(User u, java.lang.String group)` Change the owner of the current collection
`java.lang.String[]` | `getGroups()` Retrieve a list of all existing groups.
`java.lang.String` | `getName()` Gets the name attribute of the UserManagementServiceImpl object
`Permission` | `getPermissions(Collection coll)` Get current permissions for a collection
`Permission` | `getPermissions(Resource res)` Get current permissions for a resource
`java.lang.String` | `getProperty(java.lang.String property)` Gets the property attribute of the UserManagementServiceImpl object
`User` | `getUser(java.lang.String name)` Get user information for specified user
`User[]` | `getUsers()` Get a list of all users currently defined
`java.lang.String` | `getVersion()` Gets the version attribute of the UserManagementServiceImpl object
`java.lang.String` | `hasUserLock(Resource res)` Check if the resource has a user lock.
`Permission[]` | `listCollectionPermissions()` Get permissions for all child collections contained in the current collection.
`Permission[]` | `listResourcePermissions()` Get permissions for all resources contained in the current collection.
`void` | `lockResource(Resource res, User u)` Lock the specified resource for the specified user.
`void` | `removeUser(User u)` Delete a user from the database
`void` | `setCollection(Collection collection)` Sets the collection attribute of the UserManagementServiceImpl object
`void` | `setPermissions(Collection child, Permission perms)` Change permissions for a resource.
`void` | `setPermissions(Resource res, Permission perms)` Change permissions for a resource.
`void` | `setProperty(java.lang.String property, java.lang.String value)` Sets the property attribute of the UserManagementServiceImpl object
`void` | `unlockResource(Resource res)` Unlock the specified resource.
`void` | `updateUser(User user)` Update the specified user

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

Constructor Detail

### RemoteUserManagementService

    public RemoteUserManagementService(RemoteCollection collection)

Method Detail

### addUser

    public void addUser(User user)
                 throws XMLDBException

  Add a new user account

  Specified by:
    `addUser` in interface `UserManagementService`
  Parameters:
    `user` - The user to be added
  Throws:
    `XMLDBException` - Description of the Exception

### setPermissions

    public void setPermissions(Resource res,
                               Permission perms)
                        throws XMLDBException

  Change permissions for a resource.

  Specified by:
    `setPermissions` in interface `UserManagementService`
  Parameters:
    `res` -
    `perms` -
  Throws:
    `XMLDBException`

### setPermissions

    public void setPermissions(Collection child,
                               Permission perms)
                        throws XMLDBException

  Change permissions for a resource.

  Specified by:
    `setPermissions` in interface `UserManagementService`
  Parameters:
    `child` -
    `perms` -
  Throws:
    `XMLDBException`

### chmod

    public void chmod(Resource res,
                      java.lang.String mode)
               throws XMLDBException

  Change access mode of a resource

  Specified by:
    `chmod` in interface `UserManagementService`
  Parameters:
    `mode` - Access mode
    `res` - Description of the Parameter
  Throws:
    `XMLDBException` - Description of the Exception

### chmod

    public void chmod(Resource res,
                      int mode)
               throws XMLDBException

  Description copied from interface: `UserManagementService`
  Change permissions for the specified resource.

  Specified by:
    `chmod` in interface `UserManagementService`
  Throws:
    `XMLDBException`
  See Also:
    `UserManagementService.chmod(org.xmldb.api.base.Resource, int)`

### chmod

    public void chmod(java.lang.String mode)
               throws XMLDBException

  Change access mode of the current collection

  Specified by:
    `chmod` in interface `UserManagementService`
  Parameters:
    `mode` - Access mode
  Throws:
    `XMLDBException` - Description of the Exception

### chmod

    public void chmod(int mode)
               throws XMLDBException

  Specified by:
    `chmod` in interface `UserManagementService`
  Throws:
    `XMLDBException`
  See Also:
    `UserManagementService.chmod(int)`

### lockResource

    public void lockResource(Resource res,
                             User u)
                      throws XMLDBException

  Description copied from interface: `UserManagementService`
  Lock the specified resource for the specified user. A locked resource cannot be changed by other users (except users in group DBA) until the lock is released. Users with admin privileges can always change a resource.

  Specified by:
    `lockResource` in interface `UserManagementService`
  Parameters:
    `res` -
    `u` -
  Throws:
    `XMLDBException`

### hasUserLock

    public java.lang.String hasUserLock(Resource res)
                                 throws XMLDBException

  Description copied from interface: `UserManagementService`
  Check if the resource has a user lock. Returns the name of the owner of the lock or null if no lock has been set on the resource.

  Specified by:
    `hasUserLock` in interface `UserManagementService`
  Parameters:
    `res` -
  Throws:
    `XMLDBException`

### unlockResource

    public void unlockResource(Resource res)
                        throws XMLDBException

  Description copied from interface: `UserManagementService`
  Unlock the specified resource. The current user has to be same who locked the resource. Exception: admin users can always unlock a resource.

  Specified by:
    `unlockResource` in interface `UserManagementService`
  Parameters:
    `res` -
  Throws:
    `XMLDBException`

### chown

    public void chown(User u,
                      java.lang.String group)
               throws XMLDBException

  Change the owner of the current collection

  Specified by:
    `chown` in interface `UserManagementService`
  Parameters:
    `u` - Description of the Parameter
    `group` - Description of the Parameter
  Throws:
    `XMLDBException` - Description of the Exception

### chown

    public void chown(Resource res,
                      User u,
                      java.lang.String group)
               throws XMLDBException

  Change the owner of a resource

  Specified by:
    `chown` in interface `UserManagementService`
  Parameters:
    `res` - Resource
    `u` - The new owner of the resource
    `group` - The owner group
  Throws:
    `XMLDBException` - Description of the Exception

### getName

    public java.lang.String getName()

  Gets the name attribute of the UserManagementServiceImpl object

  Specified by:
    `getName` in interface `UserManagementService`
  Returns:
    The name value

### getPermissions

    public Permission getPermissions(Collection coll)
                              throws XMLDBException

  Get current permissions for a collection

  Specified by:
    `getPermissions` in interface `UserManagementService`
  Parameters:
    `coll` - Collection
  Returns:
    The permissions value
  Throws:
    `XMLDBException` - Description of the Exception

### getPermissions

    public Permission getPermissions(Resource res)
                              throws XMLDBException

  Get current permissions for a resource

  Specified by:
    `getPermissions` in interface `UserManagementService`
  Parameters:
    `res` - Description of the Parameter
  Returns:
    The permissions value
  Throws:
    `XMLDBException` - Description of the Exception

### listResourcePermissions

    public Permission[] listResourcePermissions()
                                         throws XMLDBException

  Description copied from interface: `UserManagementService`
  Get permissions for all resources contained in the current collection. Returns a list of permissions in the same order as Collection.listResources().

  Specified by:
    `listResourcePermissions` in interface `UserManagementService`
  Returns:
    Permission[]
  Throws:
    `XMLDBException`

### listCollectionPermissions

    public Permission[] listCollectionPermissions()
                                           throws XMLDBException

  Description copied from interface: `UserManagementService`
  Get permissions for all child collections contained in the current collection. Returns a list of permissions in the same order as Collection.listChildCollections().

  Specified by:
    `listCollectionPermissions` in interface `UserManagementService`
  Returns:
    Permission[]
  Throws:
    `XMLDBException`

### getProperty

    public java.lang.String getProperty(java.lang.String property)
                                 throws XMLDBException

  Gets the property attribute of the UserManagementServiceImpl object

  Specified by:
    `getProperty` in interface `UserManagementService`
  Parameters:
    `property` - Description of the Parameter
  Returns:
    The property value
  Throws:
    `XMLDBException` - Description of the Exception

### getUser

    public User getUser(java.lang.String name)
                 throws XMLDBException

  Get user information for specified user

  Specified by:
    `getUser` in interface `UserManagementService`
  Parameters:
    `name` - Description of the Parameter
  Returns:
    The user value
  Throws:
    `XMLDBException` - Description of the Exception

### getUsers

    public User[] getUsers()
                    throws XMLDBException

  Get a list of all users currently defined

  Specified by:
    `getUsers` in interface `UserManagementService`
  Returns:
    The users value
  Throws:
    `XMLDBException` - Description of the Exception

### getVersion

    public java.lang.String getVersion()

  Gets the version attribute of the UserManagementServiceImpl object

  Specified by:
    `getVersion` in interface `UserManagementService`
  Returns:
    The version value

### removeUser

    public void removeUser(User u)
                    throws XMLDBException

  Description copied from interface: `UserManagementService`
  Delete a user from the database

  Specified by:
    `removeUser` in interface `UserManagementService`
  Parameters:
    `u` -
  Throws:
    `XMLDBException`

### setCollection

    public void setCollection(Collection collection)
                       throws XMLDBException

  Sets the collection attribute of the UserManagementServiceImpl object

  Specified by:
    `setCollection` in interface `UserManagementService`
  Parameters:
    `collection` - The new collection value
  Throws:
    `XMLDBException` - Description of the Exception

### setProperty

    public void setProperty(java.lang.String property,
                            java.lang.String value)
                     throws XMLDBException

  Sets the property attribute of the UserManagementServiceImpl object

  Specified by:
    `setProperty` in interface `UserManagementService`
  Parameters:
    `property` - The new property value
    `value` - The new property value
  Throws:
    `XMLDBException` - Description of the Exception

### updateUser

    public void updateUser(User user)
                    throws XMLDBException

  Update the specified user

  Specified by:
    `updateUser` in interface `UserManagementService`
  Parameters:
    `user` - Description of the Parameter
  Throws:
    `XMLDBException` - Description of the Exception

### getGroups

    public java.lang.String[] getGroups()
                                 throws XMLDBException

  Description copied from interface: `UserManagementService`
  Retrieve a list of all existing groups. Please note: new groups are created automatically if a new group is assigned to a user. You can't add or remove them.

  Specified by:
    `getGroups` in interface `UserManagementService`
  Throws:
    `XMLDBException`

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.