mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Ticket #362: Added parentID property for connection and group.
This commit is contained in:
@@ -99,10 +99,11 @@ public class MySQLConnection extends AbstractConnection {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the ID of the parent connection group for this connection.
|
* Sets the ID of the parent connection group for this connection.
|
||||||
* @param connectionID The ID of the parent connection group for this connection.
|
* @param parentID The ID of the parent connection group for this connection.
|
||||||
*/
|
*/
|
||||||
public void setParentID(Integer parentID) {
|
public void setParentID(Integer parentID) {
|
||||||
this.parentID = parentID;
|
this.parentID = parentID;
|
||||||
|
this.setParentIdentifier(String.valueOf(parentID));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,7 +121,7 @@ public class MySQLConnection extends AbstractConnection {
|
|||||||
List<? extends ConnectionRecord> history, int userID) {
|
List<? extends ConnectionRecord> history, int userID) {
|
||||||
|
|
||||||
this.connectionID = connectionID;
|
this.connectionID = connectionID;
|
||||||
this.parentID = parentID;
|
this.setParentID(parentID);
|
||||||
setName(name);
|
setName(name);
|
||||||
setIdentifier(identifier);
|
setIdentifier(identifier);
|
||||||
setConfiguration(config);
|
setConfiguration(config);
|
||||||
|
@@ -104,7 +104,7 @@ public class MySQLConnectionGroup extends AbstractConnectionGroup {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the ID of the corresponding connection group record.
|
* Sets the ID of the corresponding connection group record.
|
||||||
* @param connectionID The ID to assign to this connection group.
|
* @param connectionGroupID The ID to assign to this connection group.
|
||||||
*/
|
*/
|
||||||
public void setConnectionID(Integer connectionGroupID) {
|
public void setConnectionID(Integer connectionGroupID) {
|
||||||
this.connectionGroupID = connectionGroupID;
|
this.connectionGroupID = connectionGroupID;
|
||||||
@@ -120,10 +120,11 @@ public class MySQLConnectionGroup extends AbstractConnectionGroup {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the ID of the parent connection group for this connection group.
|
* Sets the ID of the parent connection group for this connection group.
|
||||||
* @param connectionID The ID of the parent connection group for this connection group.
|
* @param parentID The ID of the parent connection group for this connection group.
|
||||||
*/
|
*/
|
||||||
public void setParentID(Integer parentID) {
|
public void setParentID(Integer parentID) {
|
||||||
this.parentID = parentID;
|
this.parentID = parentID;
|
||||||
|
this.setParentIdentifier(String.valueOf(parentID));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,6 +132,7 @@ public class MySQLConnectionGroup extends AbstractConnectionGroup {
|
|||||||
*
|
*
|
||||||
* @param connectionGroupID The ID of the associated database record, if any.
|
* @param connectionGroupID The ID of the associated database record, if any.
|
||||||
* @param parentID The ID of the parent connection group for this connection group, if any.
|
* @param parentID The ID of the parent connection group for this connection group, if any.
|
||||||
|
* @param name The name of this connection group.
|
||||||
* @param identifier The unique identifier associated with this connection group.
|
* @param identifier The unique identifier associated with this connection group.
|
||||||
* @param type The type of this connection group.
|
* @param type The type of this connection group.
|
||||||
* @param userID The IID of the user who queried this connection.
|
* @param userID The IID of the user who queried this connection.
|
||||||
@@ -138,7 +140,7 @@ public class MySQLConnectionGroup extends AbstractConnectionGroup {
|
|||||||
public void init(Integer connectionGroupID, Integer parentID, String name,
|
public void init(Integer connectionGroupID, Integer parentID, String name,
|
||||||
String identifier, ConnectionGroup.Type type, int userID) {
|
String identifier, ConnectionGroup.Type type, int userID) {
|
||||||
this.connectionGroupID = connectionGroupID;
|
this.connectionGroupID = connectionGroupID;
|
||||||
this.parentID = parentID;
|
this.setParentID(parentID);
|
||||||
setName(name);
|
setName(name);
|
||||||
setIdentifier(identifier);
|
setIdentifier(identifier);
|
||||||
setType(type);
|
setType(type);
|
||||||
|
@@ -41,6 +41,12 @@ public abstract class AbstractConnection implements Connection {
|
|||||||
*/
|
*/
|
||||||
private String identifier;
|
private String identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The unique identifier of the parent ConnectionGroup for
|
||||||
|
* this Connection.
|
||||||
|
*/
|
||||||
|
private String parentIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GuacamoleConfiguration associated with this connection.
|
* The GuacamoleConfiguration associated with this connection.
|
||||||
*/
|
*/
|
||||||
@@ -66,6 +72,16 @@ public abstract class AbstractConnection implements Connection {
|
|||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getParentIdentifier() {
|
||||||
|
return parentIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setParentIdentifier(String parentIdentifier) {
|
||||||
|
this.parentIdentifier = parentIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GuacamoleConfiguration getConfiguration() {
|
public GuacamoleConfiguration getConfiguration() {
|
||||||
return configuration;
|
return configuration;
|
||||||
|
@@ -38,6 +38,12 @@ public abstract class AbstractConnectionGroup implements ConnectionGroup {
|
|||||||
* The unique identifier associated with this connection group.
|
* The unique identifier associated with this connection group.
|
||||||
*/
|
*/
|
||||||
private String identifier;
|
private String identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The unique identifier of the parent connection group for
|
||||||
|
* this connection group.
|
||||||
|
*/
|
||||||
|
private String parentIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of this connection group.
|
* The type of this connection group.
|
||||||
@@ -63,6 +69,16 @@ public abstract class AbstractConnectionGroup implements ConnectionGroup {
|
|||||||
public void setIdentifier(String identifier) {
|
public void setIdentifier(String identifier) {
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getParentIdentifier() {
|
||||||
|
return parentIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setParentIdentifier(String parentIdentifier) {
|
||||||
|
this.parentIdentifier = parentIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConnectionGroup.Type getType() {
|
public ConnectionGroup.Type getType() {
|
||||||
|
@@ -47,7 +47,7 @@ public interface Connection {
|
|||||||
/**
|
/**
|
||||||
* Sets the name assigned to this Connection.
|
* Sets the name assigned to this Connection.
|
||||||
*
|
*
|
||||||
* @param identifier The name to assign.
|
* @param name The name to assign.
|
||||||
*/
|
*/
|
||||||
public void setName(String name);
|
public void setName(String name);
|
||||||
|
|
||||||
@@ -64,6 +64,24 @@ public interface Connection {
|
|||||||
*/
|
*/
|
||||||
public void setIdentifier(String identifier);
|
public void setIdentifier(String identifier);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the unique identifier of the parent ConnectionGroup for
|
||||||
|
* this Connection.
|
||||||
|
*
|
||||||
|
* @return The unique identifier of the parent ConnectionGroup for
|
||||||
|
* this Connection.
|
||||||
|
*/
|
||||||
|
public String getParentIdentifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the unique identifier of the parent ConnectionGroup for
|
||||||
|
* this Connection.
|
||||||
|
*
|
||||||
|
* @param parentIdentifier The unique identifier of the parent
|
||||||
|
* ConnectionGroup for this Connection.
|
||||||
|
*/
|
||||||
|
public void setParentIdentifier(String parentIdentifier);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the GuacamoleConfiguration associated with this Connection. Note
|
* Returns the GuacamoleConfiguration associated with this Connection. Note
|
||||||
* that because configurations may contain sensitive information, some data
|
* that because configurations may contain sensitive information, some data
|
||||||
|
@@ -47,7 +47,7 @@ public interface ConnectionGroup {
|
|||||||
/**
|
/**
|
||||||
* Sets the name assigned to this ConnectionGroup.
|
* Sets the name assigned to this ConnectionGroup.
|
||||||
*
|
*
|
||||||
* @param identifier The name to assign.
|
* @param name The name to assign.
|
||||||
*/
|
*/
|
||||||
public void setName(String name);
|
public void setName(String name);
|
||||||
|
|
||||||
@@ -63,6 +63,24 @@ public interface ConnectionGroup {
|
|||||||
* @param identifier The identifier to assign.
|
* @param identifier The identifier to assign.
|
||||||
*/
|
*/
|
||||||
public void setIdentifier(String identifier);
|
public void setIdentifier(String identifier);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the unique identifier of the parent ConnectionGroup for
|
||||||
|
* this ConnectionGroup.
|
||||||
|
*
|
||||||
|
* @return The unique identifier of the parent ConnectionGroup for
|
||||||
|
* this ConnectionGroup.
|
||||||
|
*/
|
||||||
|
public String getParentIdentifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the unique identifier of the parent ConnectionGroup for
|
||||||
|
* this ConnectionGroup.
|
||||||
|
*
|
||||||
|
* @param parentIdentifier The unique identifier of the parent
|
||||||
|
* ConnectionGroup for this ConnectionGroup.
|
||||||
|
*/
|
||||||
|
public void setParentIdentifier(String parentIdentifier);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the type of this ConnectionGroup.
|
* Set the type of this ConnectionGroup.
|
||||||
|
@@ -46,6 +46,11 @@ public class APIConnection {
|
|||||||
*/
|
*/
|
||||||
private String identifier;
|
private String identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier of the parent connection group for this connection.
|
||||||
|
*/
|
||||||
|
private String parentIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The history records associated with this connection.
|
* The history records associated with this connection.
|
||||||
*/
|
*/
|
||||||
@@ -71,6 +76,7 @@ public class APIConnection {
|
|||||||
throws GuacamoleException {
|
throws GuacamoleException {
|
||||||
this.name = connection.getName();
|
this.name = connection.getName();
|
||||||
this.identifier = connection.getIdentifier();
|
this.identifier = connection.getIdentifier();
|
||||||
|
this.parentIdentifier = connection.getParentIdentifier();
|
||||||
this.history = connection.getHistory();
|
this.history = connection.getHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,10 +105,27 @@ public class APIConnection {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Sets the unique identifier for this connection.
|
* Sets the unique identifier for this connection.
|
||||||
|
* @param identifier The unique identifier for this connection.
|
||||||
*/
|
*/
|
||||||
public void setIdentifier(String identifier) {
|
public void setIdentifier(String identifier) {
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the unique identifier for this connection.
|
||||||
|
* @return The unique identifier for this connection.
|
||||||
|
*/
|
||||||
|
public String getParentIdentifier() {
|
||||||
|
return parentIdentifier;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Sets the parent connection group identifier for this connection.
|
||||||
|
* @param parentIdentifier The parent connection group identifier
|
||||||
|
* for this connection.
|
||||||
|
*/
|
||||||
|
public void setParentIdentifier(String parentIdentifier) {
|
||||||
|
this.parentIdentifier = parentIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the history records associated with this connection.
|
* Returns the history records associated with this connection.
|
||||||
|
@@ -66,6 +66,16 @@ public class APIConnectionWrapper implements Connection {
|
|||||||
apiConnection.setIdentifier(identifier);
|
apiConnection.setIdentifier(identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getParentIdentifier() {
|
||||||
|
return apiConnection.getParentIdentifier();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setParentIdentifier(String parentIdentifier) {
|
||||||
|
apiConnection.setParentIdentifier(parentIdentifier);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GuacamoleConfiguration getConfiguration() {
|
public GuacamoleConfiguration getConfiguration() {
|
||||||
|
|
||||||
|
@@ -42,6 +42,11 @@ public class APIConnectionGroup {
|
|||||||
*/
|
*/
|
||||||
private String identifier;
|
private String identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier of the parent connection group for this connection group.
|
||||||
|
*/
|
||||||
|
private String parentIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of this connection group.
|
* The type of this connection group.
|
||||||
*/
|
*/
|
||||||
@@ -60,6 +65,7 @@ public class APIConnectionGroup {
|
|||||||
*/
|
*/
|
||||||
public APIConnectionGroup(ConnectionGroup connectionGroup) {
|
public APIConnectionGroup(ConnectionGroup connectionGroup) {
|
||||||
this.identifier = connectionGroup.getIdentifier();
|
this.identifier = connectionGroup.getIdentifier();
|
||||||
|
this.parentIdentifier = connectionGroup.getParentIdentifier();
|
||||||
this.name = connectionGroup.getName();
|
this.name = connectionGroup.getName();
|
||||||
this.type = connectionGroup.getType();
|
this.type = connectionGroup.getType();
|
||||||
}
|
}
|
||||||
@@ -95,6 +101,22 @@ public class APIConnectionGroup {
|
|||||||
public void setIdentifier(String identifier) {
|
public void setIdentifier(String identifier) {
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the unique identifier for this connection group.
|
||||||
|
* @return The unique identifier for this connection group.
|
||||||
|
*/
|
||||||
|
public String getParentIdentifier() {
|
||||||
|
return parentIdentifier;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Sets the parent connection group identifier for this connection group.
|
||||||
|
* @param parentIdentifier The parent connection group identifier
|
||||||
|
* for this connection group.
|
||||||
|
*/
|
||||||
|
public void setParentIdentifier(String parentIdentifier) {
|
||||||
|
this.parentIdentifier = parentIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type of this connection group.
|
* Returns the type of this connection group.
|
||||||
|
@@ -71,6 +71,16 @@ public class APIConnectionGroupWrapper implements ConnectionGroup {
|
|||||||
apiConnectionGroup.setIdentifier(identifier);
|
apiConnectionGroup.setIdentifier(identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getParentIdentifier() {
|
||||||
|
return apiConnectionGroup.getParentIdentifier();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setParentIdentifier(String parentIdentifier) {
|
||||||
|
apiConnectionGroup.setParentIdentifier(parentIdentifier);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setType(Type type) {
|
public void setType(Type type) {
|
||||||
apiConnectionGroup.setType(type);
|
apiConnectionGroup.setType(type);
|
||||||
|
Reference in New Issue
Block a user