mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
GUAC-932: Get rid of APIConstants.
This commit is contained in:
@@ -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";
|
|
||||||
|
|
||||||
}
|
|
@@ -29,7 +29,7 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
|||||||
import org.glyptodon.guacamole.GuacamoleException;
|
import org.glyptodon.guacamole.GuacamoleException;
|
||||||
import org.glyptodon.guacamole.net.auth.Connection;
|
import org.glyptodon.guacamole.net.auth.Connection;
|
||||||
import org.glyptodon.guacamole.net.auth.ConnectionRecord;
|
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;
|
import org.glyptodon.guacamole.protocol.GuacamoleConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -91,7 +91,7 @@ public class APIConnection {
|
|||||||
|
|
||||||
// Use the explicit ROOT group ID
|
// Use the explicit ROOT group ID
|
||||||
if (this.parentIdentifier == null)
|
if (this.parentIdentifier == null)
|
||||||
this.parentIdentifier = APIConstants.ROOT_CONNECTION_GROUP_IDENTIFIER;
|
this.parentIdentifier = APIConnectionGroup.ROOT_IDENTIFIER;
|
||||||
|
|
||||||
GuacamoleConfiguration configuration = connection.getConfiguration();
|
GuacamoleConfiguration configuration = connection.getConfiguration();
|
||||||
|
|
||||||
|
@@ -25,7 +25,6 @@ package org.glyptodon.guacamole.net.basic.rest.connectiongroup;
|
|||||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||||
import org.glyptodon.guacamole.net.auth.ConnectionGroup;
|
import org.glyptodon.guacamole.net.auth.ConnectionGroup;
|
||||||
import org.glyptodon.guacamole.net.auth.ConnectionGroup.Type;
|
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.
|
* 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)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class APIConnectionGroup {
|
public class APIConnectionGroup {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier of the root connection group.
|
||||||
|
*/
|
||||||
|
public static final String ROOT_IDENTIFIER = "ROOT";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of this connection group.
|
* The name of this connection group.
|
||||||
*/
|
*/
|
||||||
@@ -73,7 +77,7 @@ public class APIConnectionGroup {
|
|||||||
|
|
||||||
// Use the explicit ROOT group ID
|
// Use the explicit ROOT group ID
|
||||||
if (this.parentIdentifier == null)
|
if (this.parentIdentifier == null)
|
||||||
this.parentIdentifier = APIConstants.ROOT_CONNECTION_GROUP_IDENTIFIER;
|
this.parentIdentifier = ROOT_IDENTIFIER;
|
||||||
|
|
||||||
this.name = connectionGroup.getName();
|
this.name = connectionGroup.getName();
|
||||||
this.type = connectionGroup.getType();
|
this.type = connectionGroup.getType();
|
||||||
|
Reference in New Issue
Block a user