GUAC-1193 Add required connection name property to connection record.

This commit is contained in:
James Muehlner
2015-10-13 20:04:24 -07:00
parent 3c271da9b4
commit 03c1ac1876
8 changed files with 91 additions and 16 deletions

View File

@@ -37,6 +37,11 @@ public class ConnectionRecordModel {
*/
private String connectionIdentifier;
/**
* The name of the connection associated with this connection record.
*/
private String connectionName;
/**
* The database ID of the user associated with this connection record.
*/
@@ -82,6 +87,32 @@ public class ConnectionRecordModel {
this.connectionIdentifier = connectionIdentifier;
}
/**
* Returns the name of the connection associated with this connection
* record.
*
* @return
* The name of the connection associated with this connection
* record.
*/
public String getConnectionName() {
return connectionName;
}
/**
* Sets the name of the connection associated with this connection
* record.
*
* @param connectionName
* The name of the connection to associate with this connection
* record.
*/
public void setConnectionName(String connectionName) {
this.connectionName = connectionName;
}
/**
* Returns the database ID of the user associated with this connection
* record.

View File

@@ -56,6 +56,11 @@ public class ModeledConnectionRecord implements ConnectionRecord {
return model.getConnectionIdentifier();
}
@Override
public String getConnectionName() {
return model.getConnectionName();
}
@Override
public Date getStartDate() {
return model.getStartDate();

View File

@@ -169,6 +169,11 @@ public class ActiveConnectionRecord implements ConnectionRecord {
return connection.getIdentifier();
}
@Override
public String getConnectionName() {
return connection.getName();
}
@Override
public Date getStartDate() {
return startDate;

View File

@@ -42,7 +42,6 @@ import org.glyptodon.guacamole.net.auth.Connection;
import org.glyptodon.guacamole.net.auth.ConnectionGroup;
import org.glyptodon.guacamole.net.auth.Directory;
import org.glyptodon.guacamole.net.auth.User;
import org.glyptodon.guacamole.net.auth.simple.SimpleConnectionRecordSet;
/**
* UserContext implementation which is driven by an arbitrary, underlying