public class DefaultUserOperation extends Object implements UserOperations
Modifier and Type | Class and Description |
---|---|
static interface |
DefaultUserOperation.CollectionCallback |
Modifier | Constructor and Description |
---|---|
protected |
DefaultUserOperation(com.arangodb.ArangoDatabase db,
String username,
PersistenceExceptionTranslator exceptionTranslator,
DefaultUserOperation.CollectionCallback collectionCallback) |
Modifier and Type | Method and Description |
---|---|
com.arangodb.entity.UserEntity |
create(String passwd,
com.arangodb.model.UserCreateOptions options)
Create a new user.
|
void |
delete()
Removes an existing user, identified by user.
|
com.arangodb.entity.UserEntity |
get()
Fetches data about the specified user.
|
com.arangodb.entity.Permissions |
getCollectionPermissions(Class<?> type)
Get the collection access level
|
com.arangodb.entity.Permissions |
getCollectionPermissions(String name)
Get the collection access level
|
com.arangodb.entity.Permissions |
getDatabasePermissions()
Get specific database access level
|
void |
grantCollectionAccess(Class<?> type,
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<?> type)
Clear the collection access level, revert back to the default access level.
|
void |
resetCollectionAccess(String name)
Clear the collection access level, revert back to the default access level.
|
void |
resetDatabaseAccess()
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.
|
protected DefaultUserOperation(com.arangodb.ArangoDatabase db, String username, PersistenceExceptionTranslator exceptionTranslator, DefaultUserOperation.CollectionCallback collectionCallback)
public com.arangodb.entity.UserEntity get() throws DataAccessException
UserOperations
get
in interface UserOperations
DataAccessException
public com.arangodb.entity.UserEntity create(String passwd, com.arangodb.model.UserCreateOptions options) throws DataAccessException
UserOperations
create
in interface UserOperations
passwd
- The user passwordoptions
- Additional options, can be nullDataAccessException
public com.arangodb.entity.UserEntity update(com.arangodb.model.UserUpdateOptions options) throws DataAccessException
UserOperations
update
in interface UserOperations
options
- Properties of the user to be changedDataAccessException
public com.arangodb.entity.UserEntity replace(com.arangodb.model.UserUpdateOptions options) throws DataAccessException
UserOperations
replace
in interface UserOperations
options
- Additional properties of the user, can be nullDataAccessException
public void delete() throws DataAccessException
UserOperations
delete
in interface UserOperations
DataAccessException
public void grantDefaultDatabaseAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException
UserOperations
grantDefaultDatabaseAccess
in interface UserOperations
permissions
- The permissions the user grantDataAccessException
public void grantDatabaseAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException
UserOperations
grantDatabaseAccess
in interface UserOperations
permissions
- The permissions the user grantDataAccessException
public void resetDatabaseAccess() throws DataAccessException
UserOperations
resetDatabaseAccess
in interface UserOperations
DataAccessException
public void grantDefaultCollectionAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException
UserOperations
grantDefaultCollectionAccess
in interface UserOperations
permissions
- The permissions the user grantDataAccessException
public void grantCollectionAccess(Class<?> type, com.arangodb.entity.Permissions permissions) throws DataAccessException
UserOperations
grantCollectionAccess
in interface UserOperations
type
- The entity type representing the collectionpermissions
- The permissions the user grantDataAccessException
public void grantCollectionAccess(String name, com.arangodb.entity.Permissions permissions) throws DataAccessException
UserOperations
grantCollectionAccess
in interface UserOperations
name
- The name of the collectionpermissions
- The permissions the user grantDataAccessException
public void resetCollectionAccess(Class<?> type) throws DataAccessException
UserOperations
resetCollectionAccess
in interface UserOperations
type
- The entity type representing the collectionDataAccessException
public void resetCollectionAccess(String name) throws DataAccessException
UserOperations
resetCollectionAccess
in interface UserOperations
name
- The name of the collectionDataAccessException
public com.arangodb.entity.Permissions getDatabasePermissions() throws DataAccessException
UserOperations
getDatabasePermissions
in interface UserOperations
DataAccessException
public com.arangodb.entity.Permissions getCollectionPermissions(Class<?> type) throws DataAccessException
UserOperations
getCollectionPermissions
in interface UserOperations
type
- The entity type representing the collectionDataAccessException
public com.arangodb.entity.Permissions getCollectionPermissions(String name) throws DataAccessException
UserOperations
getCollectionPermissions
in interface UserOperations
name
- The name of the collectionDataAccessException
Copyright © 2017–2020 ArangoDB GmbH. All rights reserved.