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,
org.springframework.dao.support.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, org.springframework.dao.support.PersistenceExceptionTranslator exceptionTranslator, DefaultUserOperation.CollectionCallback collectionCallback)
public com.arangodb.entity.UserEntity get() throws org.springframework.dao.DataAccessException
UserOperations
get
in interface UserOperations
org.springframework.dao.DataAccessException
public com.arangodb.entity.UserEntity create(String passwd, com.arangodb.model.UserCreateOptions options) throws org.springframework.dao.DataAccessException
UserOperations
create
in interface UserOperations
passwd
- The user passwordoptions
- Additional options, can be nullorg.springframework.dao.DataAccessException
public com.arangodb.entity.UserEntity update(com.arangodb.model.UserUpdateOptions options) throws org.springframework.dao.DataAccessException
UserOperations
update
in interface UserOperations
options
- Properties of the user to be changedorg.springframework.dao.DataAccessException
public com.arangodb.entity.UserEntity replace(com.arangodb.model.UserUpdateOptions options) throws org.springframework.dao.DataAccessException
UserOperations
replace
in interface UserOperations
options
- Additional properties of the user, can be nullorg.springframework.dao.DataAccessException
public void delete() throws org.springframework.dao.DataAccessException
UserOperations
delete
in interface UserOperations
org.springframework.dao.DataAccessException
public void grantDefaultDatabaseAccess(com.arangodb.entity.Permissions permissions) throws org.springframework.dao.DataAccessException
UserOperations
grantDefaultDatabaseAccess
in interface UserOperations
permissions
- The permissions the user grantorg.springframework.dao.DataAccessException
public void grantDatabaseAccess(com.arangodb.entity.Permissions permissions) throws org.springframework.dao.DataAccessException
UserOperations
grantDatabaseAccess
in interface UserOperations
permissions
- The permissions the user grantorg.springframework.dao.DataAccessException
public void resetDatabaseAccess() throws org.springframework.dao.DataAccessException
UserOperations
resetDatabaseAccess
in interface UserOperations
org.springframework.dao.DataAccessException
public void grantDefaultCollectionAccess(com.arangodb.entity.Permissions permissions) throws org.springframework.dao.DataAccessException
UserOperations
grantDefaultCollectionAccess
in interface UserOperations
permissions
- The permissions the user grantorg.springframework.dao.DataAccessException
public void grantCollectionAccess(Class<?> type, com.arangodb.entity.Permissions permissions) throws org.springframework.dao.DataAccessException
UserOperations
grantCollectionAccess
in interface UserOperations
type
- The entity type representing the collectionpermissions
- The permissions the user grantorg.springframework.dao.DataAccessException
public void grantCollectionAccess(String name, com.arangodb.entity.Permissions permissions) throws org.springframework.dao.DataAccessException
UserOperations
grantCollectionAccess
in interface UserOperations
name
- The name of the collectionpermissions
- The permissions the user grantorg.springframework.dao.DataAccessException
public void resetCollectionAccess(Class<?> type) throws org.springframework.dao.DataAccessException
UserOperations
resetCollectionAccess
in interface UserOperations
type
- The entity type representing the collectionorg.springframework.dao.DataAccessException
public void resetCollectionAccess(String name) throws org.springframework.dao.DataAccessException
UserOperations
resetCollectionAccess
in interface UserOperations
name
- The name of the collectionorg.springframework.dao.DataAccessException
public com.arangodb.entity.Permissions getDatabasePermissions() throws org.springframework.dao.DataAccessException
UserOperations
getDatabasePermissions
in interface UserOperations
org.springframework.dao.DataAccessException
public com.arangodb.entity.Permissions getCollectionPermissions(Class<?> type) throws org.springframework.dao.DataAccessException
UserOperations
getCollectionPermissions
in interface UserOperations
type
- The entity type representing the collectionorg.springframework.dao.DataAccessException
public com.arangodb.entity.Permissions getCollectionPermissions(String name) throws org.springframework.dao.DataAccessException
UserOperations
getCollectionPermissions
in interface UserOperations
name
- The name of the collectionorg.springframework.dao.DataAccessException
Copyright © 2017–2018 ArangoDB GmbH. All rights reserved.