public class ArangoDB extends InternalArangoDB<ArangoExecutorSync,Response,ConnectionSync>
Modifier and Type | Class and Description |
---|---|
static class |
ArangoDB.Builder |
executor
Constructor and Description |
---|
ArangoDB(CommunicationSync.Builder commBuilder,
VPack vpack,
VPack vpackNull,
VPackParser vpackParser,
CollectionCache collectionCache) |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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.
|
createDatabaseRequest, createDatabaseResponseDeserializer, createUserRequest, deleteUserRequest, getAccessibleDatabasesForRequest, getAccessibleDatabasesForResponseDeserializer, getAccessibleDatabasesRequest, getDatabaseResponseDeserializer, getDatabasesRequest, getLogLevelRequest, getLogsRequest, getUserRequest, getUsersRequest, getUsersResponseDeserializer, getVersionRequest, replaceUserRequest, setLogLevelRequest, updateUserRequest
util
public ArangoDB(CommunicationSync.Builder commBuilder, VPack vpack, VPack vpackNull, VPackParser vpackParser, CollectionCache collectionCache)
protected ArangoExecutorSync executor()
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 nameArangoDBException
public Collection<String> getDatabases() throws ArangoDBException
ArangoDBException
public Collection<String> getAccessibleDatabases() throws ArangoDBException
ArangoDBException
public Collection<String> getAccessibleDatabasesFor(String user) throws ArangoDBException
user
- The name of the user for which you want to query the databasesArangoDBException
public ArangoDBVersion getVersion() throws ArangoDBException
ArangoDBException
public UserEntity createUser(String user, String passwd) throws ArangoDBException
user
- The name of the userpasswd
- The user passwordArangoDBException
public UserEntity createUser(String user, String passwd, UserCreateOptions options) throws ArangoDBException
user
- The name of the userpasswd
- The user passwordoptions
- Additional options, can be nullArangoDBException
public void deleteUser(String user) throws ArangoDBException
user
- The name of the userArangoDBException
public UserEntity getUser(String user) throws ArangoDBException
user
- The name of the userArangoDBException
public Collection<UserEntity> getUsers() throws ArangoDBException
ArangoDBException
public UserEntity updateUser(String user, UserUpdateOptions options) throws ArangoDBException
user
- The name of the useroptions
- Properties of the user to be changedArangoDBException
public UserEntity replaceUser(String user, UserUpdateOptions options) throws ArangoDBException
user
- The name of the useroptions
- Additional properties of the user, can be nullArangoDBException
public Response execute(Request request) throws ArangoDBException
request
- VelocyStream requestArangoDBException
public LogEntity getLogs(LogOptions options) throws ArangoDBException
options
- Additional options, can be nullArangoDBException
public LogLevelEntity getLogLevel() throws ArangoDBException
ArangoDBException
public LogLevelEntity setLogLevel(LogLevelEntity entity) throws ArangoDBException
entity
- loglevel settingsArangoDBException
Copyright © 2016–2017 ArangoDB GmbH. All rights reserved.