diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/APIConstants.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/APIConstants.java deleted file mode 100644 index f6277eeaa..000000000 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/APIConstants.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2014 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package org.glyptodon.guacamole.net.basic.rest; - -/** - * Useful constants for the REST API. - * - * @author James Muehlner - */ -public class APIConstants { - - /** - * The identifier of the ROOT connection group. - */ - public static final String ROOT_CONNECTION_GROUP_IDENTIFIER = "ROOT"; - -} diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/APIConnection.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/APIConnection.java index dab0c3884..5ef022cd4 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/APIConnection.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/APIConnection.java @@ -29,7 +29,7 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.glyptodon.guacamole.GuacamoleException; import org.glyptodon.guacamole.net.auth.Connection; import org.glyptodon.guacamole.net.auth.ConnectionRecord; -import org.glyptodon.guacamole.net.basic.rest.APIConstants; +import org.glyptodon.guacamole.net.basic.rest.connectiongroup.APIConnectionGroup; import org.glyptodon.guacamole.protocol.GuacamoleConfiguration; /** @@ -91,7 +91,7 @@ public class APIConnection { // Use the explicit ROOT group ID if (this.parentIdentifier == null) - this.parentIdentifier = APIConstants.ROOT_CONNECTION_GROUP_IDENTIFIER; + this.parentIdentifier = APIConnectionGroup.ROOT_IDENTIFIER; GuacamoleConfiguration configuration = connection.getConfiguration(); diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connectiongroup/APIConnectionGroup.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connectiongroup/APIConnectionGroup.java index 4ac155d39..16d2a0121 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connectiongroup/APIConnectionGroup.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connectiongroup/APIConnectionGroup.java @@ -25,7 +25,6 @@ package org.glyptodon.guacamole.net.basic.rest.connectiongroup; import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.glyptodon.guacamole.net.auth.ConnectionGroup; import org.glyptodon.guacamole.net.auth.ConnectionGroup.Type; -import org.glyptodon.guacamole.net.basic.rest.APIConstants; /** * A simple connection group to expose through the REST endpoints. @@ -35,6 +34,11 @@ import org.glyptodon.guacamole.net.basic.rest.APIConstants; @JsonIgnoreProperties(ignoreUnknown = true) public class APIConnectionGroup { + /** + * The identifier of the root connection group. + */ + public static final String ROOT_IDENTIFIER = "ROOT"; + /** * The name of this connection group. */ @@ -73,7 +77,7 @@ public class APIConnectionGroup { // Use the explicit ROOT group ID if (this.parentIdentifier == null) - this.parentIdentifier = APIConstants.ROOT_CONNECTION_GROUP_IDENTIFIER; + this.parentIdentifier = ROOT_IDENTIFIER; this.name = connectionGroup.getName(); this.type = connectionGroup.getType();