Interface UserOperations

All Known Implementing Classes:
DefaultUserOperation

public interface UserOperations
Interface that specifies operations to manage ArangoDB users.
Author:
Mark Vollmary
  • Method Summary

    Modifier and Type
    Method
    Description
    com.arangodb.entity.UserEntity
    create(String passwd, com.arangodb.model.UserCreateOptions options)
    Create a new user.
    void
    Removes an existing user, identified by user.
    com.arangodb.entity.UserEntity
    get()
    Fetches data about the specified user.
    com.arangodb.entity.Permissions
    Get the collection access level
    com.arangodb.entity.Permissions
    Get the collection access level
    com.arangodb.entity.Permissions
    Get specific database access level
    void
    grantCollectionAccess(Class<?> entityClass, com.arangodb.entity.Permissions permissions)
    Grants or revoke access to the collection for user.
    void
    grantCollectionAccess(String name, com.arangodb.entity.Permissions permissions)
    Grants or revoke access to the collection for user.
    void
    grantDatabaseAccess(com.arangodb.entity.Permissions permissions)
    Grants or revoke access to the database for the user.
    void
    grantDefaultCollectionAccess(com.arangodb.entity.Permissions permissions)
    Sets the default access level for collections for the user.
    void
    grantDefaultDatabaseAccess(com.arangodb.entity.Permissions permissions)
    Sets the default access level for databases for the user.
    com.arangodb.entity.UserEntity
    replace(com.arangodb.model.UserUpdateOptions options)
    Replaces the data of an existing user.
    void
    resetCollectionAccess(Class<?> entityClass)
    Clear the collection access level, revert back to the default access level.
    void
    Clear the collection access level, revert back to the default access level.
    void
    Clear the database access level, revert back to the default access level.
    com.arangodb.entity.UserEntity
    update(com.arangodb.model.UserUpdateOptions options)
    Partially updates the data of an existing user.
  • Method Details

    • get

      com.arangodb.entity.UserEntity get() throws DataAccessException
      Fetches data about the specified user. You can fetch information about yourself or you need permission to the _system database in order to execute this call.
      Returns:
      information about the user
      Throws:
      DataAccessException
    • create

      com.arangodb.entity.UserEntity create(String passwd, com.arangodb.model.UserCreateOptions options) throws DataAccessException
      Create a new user. This user will not have access to any database. You need permission to the _system database in order to execute this call.
      Parameters:
      passwd - The user password
      options - Additional options, can be null
      Returns:
      information about the user
      Throws:
      DataAccessException
    • update

      com.arangodb.entity.UserEntity update(com.arangodb.model.UserUpdateOptions options) throws DataAccessException
      Partially updates the data of an existing user. You can only change the password of your self. You need access to the _system database to change the active flag.
      Parameters:
      options - Properties of the user to be changed
      Returns:
      information about the user
      Throws:
      DataAccessException
    • replace

      com.arangodb.entity.UserEntity replace(com.arangodb.model.UserUpdateOptions options) throws DataAccessException
      Replaces the data of an existing user. You can only change the password of your self. You need access to the _system database to change the active flag.
      Parameters:
      options - Additional properties of the user, can be null
      Returns:
      information about the user
      Throws:
      DataAccessException
    • delete

      void delete() throws DataAccessException
      Removes an existing user, identified by user. You need access to the _system database.
      Throws:
      DataAccessException
    • grantDefaultDatabaseAccess

      void grantDefaultDatabaseAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException
      Sets the default access level for databases for the user. You need permission to the _system database in order to execute this call.
      Parameters:
      permissions - The permissions the user grant
      Throws:
      DataAccessException
      Since:
      ArangoDB 3.2.0
    • grantDatabaseAccess

      void grantDatabaseAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException
      Grants or revoke access to the database for the user. You need permission to the _system database in order to execute this call.
      Parameters:
      permissions - The permissions the user grant
      Throws:
      DataAccessException
    • resetDatabaseAccess

      void resetDatabaseAccess() throws DataAccessException
      Clear the database access level, revert back to the default access level.
      Throws:
      DataAccessException
      Since:
      ArangoDB 3.2.0
    • grantDefaultCollectionAccess

      void grantDefaultCollectionAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException
      Sets the default access level for collections for the user. You need permission to the _system database in order to execute this call.
      Parameters:
      permissions - The permissions the user grant
      Throws:
      DataAccessException
      Since:
      ArangoDB 3.2.0
    • grantCollectionAccess

      void grantCollectionAccess(Class<?> entityClass, com.arangodb.entity.Permissions permissions) throws DataAccessException
      Grants or revoke access to the collection for user. You need permission to the _system database in order to execute this call.
      Parameters:
      entityClass - The entity type representing the collection
      permissions - The permissions the user grant
      Throws:
      DataAccessException
    • grantCollectionAccess

      void grantCollectionAccess(String name, com.arangodb.entity.Permissions permissions) throws DataAccessException
      Grants or revoke access to the collection for user. You need permission to the _system database in order to execute this call.
      Parameters:
      name - The name of the collection
      permissions - The permissions the user grant
      Throws:
      DataAccessException
    • resetCollectionAccess

      void resetCollectionAccess(Class<?> entityClass) throws DataAccessException
      Clear the collection access level, revert back to the default access level.
      Parameters:
      entityClass - The entity type representing the collection
      Throws:
      DataAccessException
    • resetCollectionAccess

      void resetCollectionAccess(String name) throws DataAccessException
      Clear the collection access level, revert back to the default access level.
      Parameters:
      name - The name of the collection
      Throws:
      DataAccessException
    • getDatabasePermissions

      com.arangodb.entity.Permissions getDatabasePermissions() throws DataAccessException
      Get specific database access level
      Returns:
      permissions of the user
      Throws:
      DataAccessException
      Since:
      ArangoDB 3.2.0
    • getCollectionPermissions

      com.arangodb.entity.Permissions getCollectionPermissions(Class<?> entityClass) throws DataAccessException
      Get the collection access level
      Parameters:
      entityClass - The entity type representing the collection
      Returns:
      permissions of the user
      Throws:
      DataAccessException
      Since:
      ArangoDB 3.2.0
    • getCollectionPermissions

      com.arangodb.entity.Permissions getCollectionPermissions(String name) throws DataAccessException
      Get the collection access level
      Parameters:
      name - The name of the collection
      Returns:
      permissions of the user
      Throws:
      DataAccessException
      Since:
      ArangoDB 3.2.0