Ticket #362. Got connection create working.

This commit is contained in:
James Muehlner
2013-09-24 21:47:03 -07:00
parent feb03b87c5
commit 8b2acc99b6
3 changed files with 8 additions and 0 deletions

View File

@@ -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(),

View File

@@ -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.

View File

@@ -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 {
/**