2424import java .io .InputStream ;
2525import java .util .Collection ;
2626import java .util .Properties ;
27- import java .util .concurrent .CompletableFuture ;
2827
2928import javax .net .ssl .SSLContext ;
3029
@@ -227,19 +226,6 @@ public Boolean createDatabase(final String name) throws ArangoDBException {
227226 return executeSync (createDatabaseRequest (name ), createDatabaseResponseDeserializer ());
228227 }
229228
230- /**
231- * creates a new database
232- *
233- * @see <a href="https://docs.arangodb.com/current/HTTP/Database/DatabaseManagement.html#create-database">API
234- * Documentation</a>
235- * @param name
236- * Has to contain a valid database name
237- * @return true if the database was created successfully.
238- */
239- public CompletableFuture <Boolean > createDatabaseAsync (final String name ) {
240- return executeAsync (createDatabaseRequest (name ), createDatabaseResponseDeserializer ());
241- }
242-
243229 private Request createDatabaseRequest (final String name ) {
244230 final Request request = new Request (ArangoDBConstants .SYSTEM , RequestType .POST ,
245231 ArangoDBConstants .PATH_API_DATABASE );
@@ -266,15 +252,6 @@ public Collection<String> getDatabases() throws ArangoDBException {
266252 return executeSync (getDatabasesRequest (), getDatabaseResponseDeserializer ());
267253 }
268254
269- /**
270- * @see <a href="https://docs.arangodb.com/current/HTTP/Database/DatabaseManagement.html#list-of-databases">API
271- * Documentation</a>
272- * @return a list of all existing databases
273- */
274- public CompletableFuture <Collection <String >> getDatabasesAsync () {
275- return executeAsync (getDatabasesRequest (), getDatabaseResponseDeserializer ());
276- }
277-
278255 private Request getDatabasesRequest () {
279256 return new Request (db ().name (), RequestType .GET , ArangoDBConstants .PATH_API_DATABASE );
280257 }
@@ -301,16 +278,6 @@ public Collection<String> getAccessibleDatabases() throws ArangoDBException {
301278 return executeSync (getAccessibleDatabasesRequest (), getDatabaseResponseDeserializer ());
302279 }
303280
304- /**
305- * @see <a href=
306- * "https://docs.arangodb.com/current/HTTP/Database/DatabaseManagement.html#list-of-accessible-databases">API
307- * Documentation</a>
308- * @return a list of all databases the current user can access
309- */
310- public CompletableFuture <Collection <String >> getAccessibleDatabasesAsync () {
311- return executeAsync (getAccessibleDatabasesRequest (), getDatabaseResponseDeserializer ());
312- }
313-
314281 private Request getAccessibleDatabasesRequest () {
315282 return new Request (db ().name (), RequestType .GET ,
316283 createPath (ArangoDBConstants .PATH_API_DATABASE , ArangoDBConstants .USER ));
@@ -328,17 +295,6 @@ public ArangoDBVersion getVersion() throws ArangoDBException {
328295 return executeSync (getVersionRequest (), ArangoDBVersion .class );
329296 }
330297
331- /**
332- * Returns the server name and version number.
333- *
334- * @see <a href="https://docs.arangodb.com/current/HTTP/MiscellaneousFunctions/index.html#return-server-version">API
335- * Documentation</a>
336- * @return the server version, number
337- */
338- public CompletableFuture <ArangoDBVersion > getVersionAsync () {
339- return executeAsync (getVersionRequest (), ArangoDBVersion .class );
340- }
341-
342298 private Request getVersionRequest () {
343299 return new Request (ArangoDBConstants .SYSTEM , RequestType .GET , ArangoDBConstants .PATH_API_VERSION );
344300 }
@@ -378,41 +334,6 @@ public UserEntity createUser(final String user, final String passwd, final UserC
378334 return executeSync (createUserRequest (user , passwd , options ), UserEntity .class );
379335 }
380336
381- /**
382- * Create a new user. This user will not have access to any database. You need permission to the _system database in
383- * order to execute this call.
384- *
385- * @see <a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#create-user">API Documentation</a>
386- * @param user
387- * The name of the user
388- * @param passwd
389- * The user password
390- * @return information about the user
391- */
392- public CompletableFuture <UserEntity > createUserAsync (final String user , final String passwd ) {
393- return executeAsync (createUserRequest (user , passwd , new UserCreateOptions ()), UserEntity .class );
394- }
395-
396- /**
397- * Create a new user. This user will not have access to any database. You need permission to the _system database in
398- * order to execute this call.
399- *
400- * @see <a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#create-user">API Documentation</a>
401- * @param user
402- * The name of the user
403- * @param passwd
404- * The user password
405- * @param options
406- * Additional properties of the user, can be null
407- * @return information about the user
408- */
409- public CompletableFuture <UserEntity > createUserAsync (
410- final String user ,
411- final String passwd ,
412- final UserCreateOptions options ) {
413- return executeAsync (createUserRequest (user , passwd , options ), UserEntity .class );
414- }
415-
416337 private Request createUserRequest (final String user , final String passwd , final UserCreateOptions options ) {
417338 final Request request ;
418339 request = new Request (db ().name (), RequestType .POST , ArangoDBConstants .PATH_API_USER );
@@ -433,18 +354,6 @@ public void deleteUser(final String user) throws ArangoDBException {
433354 executeSync (deleteUserRequest (user ), Void .class );
434355 }
435356
436- /**
437- * Removes an existing user, identified by user. You need access to the _system database.
438- *
439- * @see <a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#remove-user">API Documentation</a>
440- * @param user
441- * The name of the user
442- * @return void
443- */
444- public CompletableFuture <Void > deleteUserAsync (final String user ) {
445- return executeAsync (deleteUserRequest (user ), Void .class );
446- }
447-
448357 private Request deleteUserRequest (final String user ) {
449358 return new Request (db ().name (), RequestType .DELETE , createPath (ArangoDBConstants .PATH_API_USER , user ));
450359 }
@@ -463,19 +372,6 @@ public UserEntity getUser(final String user) throws ArangoDBException {
463372 return executeSync (getUserRequest (user ), UserEntity .class );
464373 }
465374
466- /**
467- * Fetches data about the specified user. You can fetch information about yourself or you need permission to the
468- * _system database in order to execute this call.
469- *
470- * @see <a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#fetch-user">API Documentation</a>
471- * @param user
472- * The name of the user
473- * @return information about the user
474- */
475- public CompletableFuture <UserEntity > getUserAsync (final String user ) {
476- return executeAsync (getUserRequest (user ), UserEntity .class );
477- }
478-
479375 private Request getUserRequest (final String user ) {
480376 return new Request (db ().name (), RequestType .GET , createPath (ArangoDBConstants .PATH_API_USER , user ));
481377 }
@@ -492,17 +388,6 @@ public Collection<UserEntity> getUsers() throws ArangoDBException {
492388 return executeSync (getUsersRequest (), getUsersResponseDeserializer ());
493389 }
494390
495- /**
496- * Fetches data about all users. You can only execute this call if you have access to the _system database.
497- *
498- * @see <a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#list-available-users">API
499- * Documentation</a>
500- * @return informations about all users
501- */
502- public CompletableFuture <Collection <UserEntity >> getUsersAsync () {
503- return executeAsync (getUsersRequest (), getUsersResponseDeserializer ());
504- }
505-
506391 private Request getUsersRequest () {
507392 return new Request (db ().name (), RequestType .GET , ArangoDBConstants .PATH_API_USER );
508393 }
@@ -534,21 +419,6 @@ public UserEntity updateUser(final String user, final UserUpdateOptions options)
534419 return executeSync (updateUserRequest (user , options ), UserEntity .class );
535420 }
536421
537- /**
538- * Partially updates the data of an existing user. The name of an existing user must be specified in user. You can
539- * only change the password of your self. You need access to the _system database to change the active flag.
540- *
541- * @see <a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#update-user">API Documentation</a>
542- * @param user
543- * The name of the user
544- * @param options
545- * Properties of the user to be changed
546- * @return information about the user
547- */
548- public CompletableFuture <UserEntity > updateUserAsync (final String user , final UserUpdateOptions options ) {
549- return executeAsync (updateUserRequest (user , options ), UserEntity .class );
550- }
551-
552422 private Request updateUserRequest (final String user , final UserUpdateOptions options ) {
553423 final Request request ;
554424 request = new Request (db ().name (), RequestType .PATCH , createPath (ArangoDBConstants .PATH_API_USER , user ));
@@ -573,22 +443,6 @@ public UserEntity replaceUser(final String user, final UserUpdateOptions options
573443 return executeSync (replaceUserRequest (user , options ), UserEntity .class );
574444 }
575445
576- /**
577- * Replaces the data of an existing user. The name of an existing user must be specified in user. You can only
578- * change the password of your self. You need access to the _system database to change the active flag.
579- *
580- * @see <a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#replace-user">API
581- * Documentation</a>
582- * @param user
583- * The name of the user
584- * @param options
585- * Additional properties of the user, can be null
586- * @return information about the user
587- */
588- public CompletableFuture <UserEntity > replaceUserAsync (final String user , final UserUpdateOptions options ) {
589- return executeAsync (replaceUserRequest (user , options ), UserEntity .class );
590- }
591-
592446 private Request replaceUserRequest (final String user , final UserUpdateOptions options ) {
593447 final Request request ;
594448 request = new Request (db ().name (), RequestType .PUT , createPath (ArangoDBConstants .PATH_API_USER , user ));
@@ -605,10 +459,6 @@ public Response deserialize(final Response response) throws VPackException {
605459 });
606460 }
607461
608- public CompletableFuture <Response > executeAsync (final Request request ) {
609- return executeAsync (request , response -> response );
610- }
611-
612462 /**
613463 * Returns fatal, error, warning or info log messages from the server's global log.
614464 *
@@ -624,20 +474,6 @@ public LogEntity getLogs(final LogOptions options) throws ArangoDBException {
624474 return executeSync (getLogsRequest (options ), LogEntity .class );
625475 }
626476
627- /**
628- * Returns fatal, error, warning or info log messages from the server's global log.
629- *
630- * @see <a href=
631- * "https://docs.arangodb.com/current/HTTP/AdministrationAndMonitoring/index.html#read-global-logs-from-the-server">API
632- * Documentation</a>
633- * @param options
634- * Additional options, can be null
635- * @return the log messages
636- */
637- public CompletableFuture <LogEntity > getLogsAsync (final LogOptions options ) {
638- return executeAsync (getLogsRequest (options ), LogEntity .class );
639- }
640-
641477 private Request getLogsRequest (final LogOptions options ) {
642478 final LogOptions params = options != null ? options : new LogOptions ();
643479 return new Request (ArangoDBConstants .SYSTEM , RequestType .GET , ArangoDBConstants .PATH_API_ADMIN_LOG )
0 commit comments