Class DefaultUserOperation
java.lang.Object
com.arangodb.springframework.core.template.DefaultUserOperation
- All Implemented Interfaces:
UserOperations
- Author:
- Mark Vollmary
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultUserOperation(com.arangodb.ArangoDatabase db, String username, PersistenceExceptionTranslator exceptionTranslator, DefaultUserOperation.CollectionCallback collectionCallback) -
Method Summary
Modifier and TypeMethodDescriptioncom.arangodb.entity.UserEntityCreate a new user.voiddelete()Removes an existing user, identified by user.com.arangodb.entity.UserEntityget()Fetches data about the specified user.com.arangodb.entity.PermissionsgetCollectionPermissions(Class<?> type) Get the collection access levelcom.arangodb.entity.PermissionsGet the collection access levelcom.arangodb.entity.PermissionsGet specific database access levelvoidgrantCollectionAccess(Class<?> type, com.arangodb.entity.Permissions permissions) Grants or revoke access to the collection for user.voidgrantCollectionAccess(String name, com.arangodb.entity.Permissions permissions) Grants or revoke access to the collection for user.voidgrantDatabaseAccess(com.arangodb.entity.Permissions permissions) Grants or revoke access to the database for the user.voidgrantDefaultCollectionAccess(com.arangodb.entity.Permissions permissions) Sets the default access level for collections for the user.voidgrantDefaultDatabaseAccess(com.arangodb.entity.Permissions permissions) Sets the default access level for databases for the user.com.arangodb.entity.UserEntityreplace(com.arangodb.model.UserUpdateOptions options) Replaces the data of an existing user.voidresetCollectionAccess(Class<?> type) Clear the collection access level, revert back to the default access level.voidresetCollectionAccess(String name) Clear the collection access level, revert back to the default access level.voidClear the database access level, revert back to the default access level.com.arangodb.entity.UserEntityupdate(com.arangodb.model.UserUpdateOptions options) Partially updates the data of an existing user.
-
Constructor Details
-
DefaultUserOperation
protected DefaultUserOperation(com.arangodb.ArangoDatabase db, String username, PersistenceExceptionTranslator exceptionTranslator, DefaultUserOperation.CollectionCallback collectionCallback)
-
-
Method Details
-
get
Description copied from interface:UserOperationsFetches 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.- Specified by:
getin interfaceUserOperations- Returns:
- information about the user
- Throws:
DataAccessException
-
create
public com.arangodb.entity.UserEntity create(String passwd, com.arangodb.model.UserCreateOptions options) throws DataAccessException Description copied from interface:UserOperationsCreate 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.- Specified by:
createin interfaceUserOperations- Parameters:
passwd- The user passwordoptions- Additional options, can be null- Returns:
- information about the user
- Throws:
DataAccessException
-
update
public com.arangodb.entity.UserEntity update(com.arangodb.model.UserUpdateOptions options) throws DataAccessException Description copied from interface:UserOperationsPartially 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.- Specified by:
updatein interfaceUserOperations- Parameters:
options- Properties of the user to be changed- Returns:
- information about the user
- Throws:
DataAccessException
-
replace
public com.arangodb.entity.UserEntity replace(com.arangodb.model.UserUpdateOptions options) throws DataAccessException Description copied from interface:UserOperationsReplaces 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.- Specified by:
replacein interfaceUserOperations- Parameters:
options- Additional properties of the user, can be null- Returns:
- information about the user
- Throws:
DataAccessException
-
delete
Description copied from interface:UserOperationsRemoves an existing user, identified by user. You need access to the _system database.- Specified by:
deletein interfaceUserOperations- Throws:
DataAccessException
-
grantDefaultDatabaseAccess
public void grantDefaultDatabaseAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException Description copied from interface:UserOperationsSets the default access level for databases for the user. You need permission to the _system database in order to execute this call.- Specified by:
grantDefaultDatabaseAccessin interfaceUserOperations- Parameters:
permissions- The permissions the user grant- Throws:
DataAccessException
-
grantDatabaseAccess
public void grantDatabaseAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException Description copied from interface:UserOperationsGrants or revoke access to the database for the user. You need permission to the _system database in order to execute this call.- Specified by:
grantDatabaseAccessin interfaceUserOperations- Parameters:
permissions- The permissions the user grant- Throws:
DataAccessException
-
resetDatabaseAccess
Description copied from interface:UserOperationsClear the database access level, revert back to the default access level.- Specified by:
resetDatabaseAccessin interfaceUserOperations- Throws:
DataAccessException
-
grantDefaultCollectionAccess
public void grantDefaultCollectionAccess(com.arangodb.entity.Permissions permissions) throws DataAccessException Description copied from interface:UserOperationsSets the default access level for collections for the user. You need permission to the _system database in order to execute this call.- Specified by:
grantDefaultCollectionAccessin interfaceUserOperations- Parameters:
permissions- The permissions the user grant- Throws:
DataAccessException
-
grantCollectionAccess
public void grantCollectionAccess(Class<?> type, com.arangodb.entity.Permissions permissions) throws DataAccessException Description copied from interface:UserOperationsGrants or revoke access to the collection for user. You need permission to the _system database in order to execute this call.- Specified by:
grantCollectionAccessin interfaceUserOperations- Parameters:
type- The entity type representing the collectionpermissions- The permissions the user grant- Throws:
DataAccessException
-
grantCollectionAccess
public void grantCollectionAccess(String name, com.arangodb.entity.Permissions permissions) throws DataAccessException Description copied from interface:UserOperationsGrants or revoke access to the collection for user. You need permission to the _system database in order to execute this call.- Specified by:
grantCollectionAccessin interfaceUserOperations- Parameters:
name- The name of the collectionpermissions- The permissions the user grant- Throws:
DataAccessException
-
resetCollectionAccess
Description copied from interface:UserOperationsClear the collection access level, revert back to the default access level.- Specified by:
resetCollectionAccessin interfaceUserOperations- Parameters:
type- The entity type representing the collection- Throws:
DataAccessException
-
resetCollectionAccess
Description copied from interface:UserOperationsClear the collection access level, revert back to the default access level.- Specified by:
resetCollectionAccessin interfaceUserOperations- Parameters:
name- The name of the collection- Throws:
DataAccessException
-
getDatabasePermissions
Description copied from interface:UserOperationsGet specific database access level- Specified by:
getDatabasePermissionsin interfaceUserOperations- Returns:
- permissions of the user
- Throws:
DataAccessException
-
getCollectionPermissions
public com.arangodb.entity.Permissions getCollectionPermissions(Class<?> type) throws DataAccessException Description copied from interface:UserOperationsGet the collection access level- Specified by:
getCollectionPermissionsin interfaceUserOperations- Parameters:
type- The entity type representing the collection- Returns:
- permissions of the user
- Throws:
DataAccessException
-
getCollectionPermissions
public com.arangodb.entity.Permissions getCollectionPermissions(String name) throws DataAccessException Description copied from interface:UserOperationsGet the collection access level- Specified by:
getCollectionPermissionsin interfaceUserOperations- Parameters:
name- The name of the collection- Returns:
- permissions of the user
- Throws:
DataAccessException
-