public class ArangoDB extends InternalArangoDB<ArangoExecutorSync,Response,ConnectionSync>
| Modifier and Type | Class and Description |
|---|---|
static class |
ArangoDB.Builder |
DEFAULT_PROPERTY_FILEexecutor| Constructor and Description |
|---|
ArangoDB(VstCommunicationSync.Builder vstBuilder,
HttpCommunication.Builder httpBuilder,
ArangoSerialization util,
CollectionCache collectionCache,
Protocol protocol) |
| Modifier and Type | Method and Description |
|---|---|
ArangoDB |
_setCursorInitializer(ArangoCursorInitializer cursorInitializer) |
Boolean |
createDatabase(String name)
Creates a new database
|
UserEntity |
createUser(String user,
String passwd)
Create a new user.
|
UserEntity |
createUser(String user,
String passwd,
UserCreateOptions options)
Create a new user.
|
ArangoDatabase |
db()
Returns a handler of the system database
|
ArangoDatabase |
db(String name)
Returns a handler of the database by the given name
|
void |
deleteUser(String user)
Removes an existing user, identified by user.
|
Response |
execute(Request request)
Generic Execute.
|
protected ArangoExecutorSync |
executor() |
Collection<String> |
getAccessibleDatabases()
Retrieves a list of all databases the current user can access
|
Collection<String> |
getAccessibleDatabasesFor(String user)
List available database to the specified user
|
Collection<String> |
getDatabases()
Retrieves a list of all existing databases
|
LogLevelEntity |
getLogLevel()
Returns the server's current loglevel settings.
|
LogEntity |
getLogs(LogOptions options)
Returns fatal, error, warning or info log messages from the server's global log.
|
ServerRole |
getRole()
Returns the server role.
|
UserEntity |
getUser(String user)
Fetches data about the specified user.
|
Collection<UserEntity> |
getUsers()
Fetches data about all users.
|
ArangoDBVersion |
getVersion()
Returns the server name and version number.
|
void |
grantDefaultCollectionAccess(String user,
Permissions permissions)
Sets the default access level for collections for the user
user. |
void |
grantDefaultDatabaseAccess(String user,
Permissions permissions)
Sets the default access level for databases for the user
user. |
UserEntity |
replaceUser(String user,
UserUpdateOptions options)
Replaces the data of an existing user.
|
LogLevelEntity |
setLogLevel(LogLevelEntity entity)
Modifies and returns the server's current loglevel settings.
|
void |
shutdown() |
UserEntity |
updateUser(String user,
UserUpdateOptions options)
Partially updates the data of an existing user.
|
void |
updateUserDefaultCollectionAccess(String user,
Permissions permissions)
Deprecated.
user
grantDefaultCollectionAccess(String, Permissions) instead |
void |
updateUserDefaultDatabaseAccess(String user,
Permissions permissions)
Deprecated.
use
grantDefaultDatabaseAccess(String, Permissions) instead |
createDatabaseRequest, createDatabaseResponseDeserializer, createUserRequest, deleteUserRequest, getAccessibleDatabasesForRequest, getAccessibleDatabasesForResponseDeserializer, getDatabaseResponseDeserializer, getDatabasesRequest, getLogLevelRequest, getLogsRequest, getRoleRequest, getRoleResponseDeserializer, getUserRequest, getUsersRequest, getUsersResponseDeserializer, loadChunkSize, loadHost, loadHosts, loadMaxConnections, loadPassword, loadPort, loadProtocol, loadTimeout, loadUser, loadUseSsl, replaceUserRequest, setLogLevelRequest, updateUserDefaultCollectionAccessRequest, updateUserDefaultDatabaseAccessRequest, updateUserRequestutilpublic ArangoDB(VstCommunicationSync.Builder vstBuilder, HttpCommunication.Builder httpBuilder, ArangoSerialization util, CollectionCache collectionCache, Protocol protocol)
protected ArangoExecutorSync executor()
executor in class ArangoExecuteable<ArangoExecutorSync,Response,ConnectionSync>public void shutdown()
public ArangoDatabase db()
public ArangoDatabase db(String name)
name - Name of the databasepublic Boolean createDatabase(String name) throws ArangoDBException
name - Has to contain a valid database nameArangoDBExceptionpublic Collection<String> getDatabases() throws ArangoDBException
ArangoDBExceptionpublic Collection<String> getAccessibleDatabases() throws ArangoDBException
ArangoDBExceptionpublic Collection<String> getAccessibleDatabasesFor(String user) throws ArangoDBException
user - The name of the user for which you want to query the databasesArangoDBExceptionpublic ArangoDBVersion getVersion() throws ArangoDBException
ArangoDBExceptionpublic ServerRole getRole() throws ArangoDBException
ArangoDBExceptionpublic UserEntity createUser(String user, String passwd) throws ArangoDBException
user - The name of the userpasswd - The user passwordArangoDBExceptionpublic UserEntity createUser(String user, String passwd, UserCreateOptions options) throws ArangoDBException
user - The name of the userpasswd - The user passwordoptions - Additional options, can be nullArangoDBExceptionpublic void deleteUser(String user) throws ArangoDBException
user - The name of the userArangoDBExceptionpublic UserEntity getUser(String user) throws ArangoDBException
user - The name of the userArangoDBExceptionpublic Collection<UserEntity> getUsers() throws ArangoDBException
ArangoDBExceptionpublic UserEntity updateUser(String user, UserUpdateOptions options) throws ArangoDBException
user - The name of the useroptions - Properties of the user to be changedArangoDBExceptionpublic UserEntity replaceUser(String user, UserUpdateOptions options) throws ArangoDBException
user - The name of the useroptions - Additional properties of the user, can be nullArangoDBException@Deprecated public void updateUserDefaultDatabaseAccess(String user, Permissions permissions) throws ArangoDBException
grantDefaultDatabaseAccess(String, Permissions) insteaduser - The name of the userpermissions - The permissions the user grantArangoDBExceptionpublic void grantDefaultDatabaseAccess(String user, Permissions permissions) throws ArangoDBException
user. You need permission to the _system
database in order to execute this call.user - The name of the userpermissions - The permissions the user grantArangoDBException@Deprecated public void updateUserDefaultCollectionAccess(String user, Permissions permissions) throws ArangoDBException
grantDefaultCollectionAccess(String, Permissions) insteaduser - The name of the userpermissions - The permissions the user grantArangoDBExceptionpublic void grantDefaultCollectionAccess(String user, Permissions permissions) throws ArangoDBException
user. You need permission to the _system
database in order to execute this call.user - The name of the userpermissions - The permissions the user grantArangoDBExceptionpublic Response execute(Request request) throws ArangoDBException
request - VelocyStream requestArangoDBExceptionpublic LogEntity getLogs(LogOptions options) throws ArangoDBException
options - Additional options, can be nullArangoDBExceptionpublic LogLevelEntity getLogLevel() throws ArangoDBException
ArangoDBExceptionpublic LogLevelEntity setLogLevel(LogLevelEntity entity) throws ArangoDBException
entity - loglevel settingsArangoDBExceptionpublic ArangoDB _setCursorInitializer(ArangoCursorInitializer cursorInitializer)
Copyright © 2016–2017 ArangoDB GmbH. All rights reserved.