mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
Ticket #362. Got connection create working.
This commit is contained in:
@@ -180,6 +180,9 @@ public class ConnectionDirectory implements Directory<String, Connection>{
|
||||
// Create connection
|
||||
MySQLConnection connection = connectionService.createConnection(
|
||||
name, object.getConfiguration().getProtocol(), user_id, parentID);
|
||||
|
||||
// Set the connection ID
|
||||
object.setIdentifier(connection.getIdentifier());
|
||||
|
||||
// Add connection parameters
|
||||
createConfigurationValues(connection.getConnectionID(),
|
||||
|
@@ -168,6 +168,9 @@ public class ConnectionGroupDirectory implements Directory<String, ConnectionGro
|
||||
// Create connection group
|
||||
MySQLConnectionGroup connectionGroup = connectionGroupService
|
||||
.createConnectionGroup(name, user_id, parentID, mySQLType);
|
||||
|
||||
// Set the connection group ID
|
||||
object.setIdentifier(connectionGroup.getIdentifier());
|
||||
|
||||
// Finally, give the current user full access to the newly created
|
||||
// connection group.
|
||||
|
@@ -21,6 +21,7 @@ package org.glyptodon.guacamole.net.basic.rest.connection;
|
||||
import com.google.inject.Inject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
@@ -49,6 +50,7 @@ import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
@Path("/api/connection")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
public class ConnectionRESTService {
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user