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.
|
||||
* @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) {
|
||||
this.parentID = parentID;
|
||||
this.setParentIdentifier(String.valueOf(parentID));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,7 +121,7 @@ public class MySQLConnection extends AbstractConnection {
|
||||
List<? extends ConnectionRecord> history, int userID) {
|
||||
|
||||
this.connectionID = connectionID;
|
||||
this.parentID = parentID;
|
||||
this.setParentID(parentID);
|
||||
setName(name);
|
||||
setIdentifier(identifier);
|
||||
setConfiguration(config);
|
||||
|
@@ -104,7 +104,7 @@ public class MySQLConnectionGroup extends AbstractConnectionGroup {
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
this.connectionGroupID = connectionGroupID;
|
||||
@@ -120,10 +120,11 @@ public class MySQLConnectionGroup extends AbstractConnectionGroup {
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
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 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 type The type of this connection group.
|
||||
* @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,
|
||||
String identifier, ConnectionGroup.Type type, int userID) {
|
||||
this.connectionGroupID = connectionGroupID;
|
||||
this.parentID = parentID;
|
||||
this.setParentID(parentID);
|
||||
setName(name);
|
||||
setIdentifier(identifier);
|
||||
setType(type);
|
||||
|
@@ -41,6 +41,12 @@ public abstract class AbstractConnection implements Connection {
|
||||
*/
|
||||
private String identifier;
|
||||
|
||||
/**
|
||||
* The unique identifier of the parent ConnectionGroup for
|
||||
* this Connection.
|
||||
*/
|
||||
private String parentIdentifier;
|
||||
|
||||
/**
|
||||
* The GuacamoleConfiguration associated with this connection.
|
||||
*/
|
||||
@@ -66,6 +72,16 @@ public abstract class AbstractConnection implements Connection {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParentIdentifier() {
|
||||
return parentIdentifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParentIdentifier(String parentIdentifier) {
|
||||
this.parentIdentifier = parentIdentifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuacamoleConfiguration getConfiguration() {
|
||||
return configuration;
|
||||
|
@@ -39,6 +39,12 @@ public abstract class AbstractConnectionGroup implements ConnectionGroup {
|
||||
*/
|
||||
private String identifier;
|
||||
|
||||
/**
|
||||
* The unique identifier of the parent connection group for
|
||||
* this connection group.
|
||||
*/
|
||||
private String parentIdentifier;
|
||||
|
||||
/**
|
||||
* The type of this connection group.
|
||||
*/
|
||||
@@ -64,6 +70,16 @@ public abstract class AbstractConnectionGroup implements ConnectionGroup {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParentIdentifier() {
|
||||
return parentIdentifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParentIdentifier(String parentIdentifier) {
|
||||
this.parentIdentifier = parentIdentifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionGroup.Type getType() {
|
||||
return type;
|
||||
|
@@ -47,7 +47,7 @@ public interface 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);
|
||||
|
||||
@@ -64,6 +64,24 @@ public interface Connection {
|
||||
*/
|
||||
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
|
||||
* that because configurations may contain sensitive information, some data
|
||||
|
@@ -47,7 +47,7 @@ public interface 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);
|
||||
|
||||
@@ -64,6 +64,24 @@ public interface ConnectionGroup {
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
@@ -46,6 +46,11 @@ public class APIConnection {
|
||||
*/
|
||||
private String identifier;
|
||||
|
||||
/**
|
||||
* The identifier of the parent connection group for this connection.
|
||||
*/
|
||||
private String parentIdentifier;
|
||||
|
||||
/**
|
||||
* The history records associated with this connection.
|
||||
*/
|
||||
@@ -71,6 +76,7 @@ public class APIConnection {
|
||||
throws GuacamoleException {
|
||||
this.name = connection.getName();
|
||||
this.identifier = connection.getIdentifier();
|
||||
this.parentIdentifier = connection.getParentIdentifier();
|
||||
this.history = connection.getHistory();
|
||||
}
|
||||
|
||||
@@ -99,11 +105,28 @@ public class APIConnection {
|
||||
}
|
||||
/**
|
||||
* Sets the unique identifier for this connection.
|
||||
* @param identifier The unique identifier for this connection.
|
||||
*/
|
||||
public void setIdentifier(String 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.
|
||||
* @return The history records associated with this connection.
|
||||
|
@@ -66,6 +66,16 @@ public class APIConnectionWrapper implements Connection {
|
||||
apiConnection.setIdentifier(identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParentIdentifier() {
|
||||
return apiConnection.getParentIdentifier();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParentIdentifier(String parentIdentifier) {
|
||||
apiConnection.setParentIdentifier(parentIdentifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuacamoleConfiguration getConfiguration() {
|
||||
|
||||
|
@@ -42,6 +42,11 @@ public class APIConnectionGroup {
|
||||
*/
|
||||
private String identifier;
|
||||
|
||||
/**
|
||||
* The identifier of the parent connection group for this connection group.
|
||||
*/
|
||||
private String parentIdentifier;
|
||||
|
||||
/**
|
||||
* The type of this connection group.
|
||||
*/
|
||||
@@ -60,6 +65,7 @@ public class APIConnectionGroup {
|
||||
*/
|
||||
public APIConnectionGroup(ConnectionGroup connectionGroup) {
|
||||
this.identifier = connectionGroup.getIdentifier();
|
||||
this.parentIdentifier = connectionGroup.getParentIdentifier();
|
||||
this.name = connectionGroup.getName();
|
||||
this.type = connectionGroup.getType();
|
||||
}
|
||||
@@ -96,6 +102,22 @@ public class APIConnectionGroup {
|
||||
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.
|
||||
* @return The type of this connection group.
|
||||
|
@@ -71,6 +71,16 @@ public class APIConnectionGroupWrapper implements ConnectionGroup {
|
||||
apiConnectionGroup.setIdentifier(identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParentIdentifier() {
|
||||
return apiConnectionGroup.getParentIdentifier();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParentIdentifier(String parentIdentifier) {
|
||||
apiConnectionGroup.setParentIdentifier(parentIdentifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(Type type) {
|
||||
apiConnectionGroup.setType(type);
|
||||
|
Reference in New Issue
Block a user