GUACAMOLE-394: Deprecate ConnectionRecordSet. Refactor accordingly.

This commit is contained in:
Michael Jumper
2017-09-09 13:20:43 -07:00
parent cd5d23866d
commit 26122ebc3e
13 changed files with 123 additions and 121 deletions

View File

@@ -27,15 +27,17 @@ import java.util.List;
import java.util.Set;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.auth.jdbc.base.RestrictedObject;
import org.apache.guacamole.net.auth.ActivityRecordSet;
import org.apache.guacamole.net.auth.ActivityRecordSet.SortableProperty;
import org.apache.guacamole.net.auth.ConnectionRecord;
/**
* A JDBC implementation of ConnectionRecordSet. Calls to asCollection() will
* query connection history records from the database. Which records are
* returned will be determined by the values passed in earlier.
* A JDBC implementation of ActivityRecordSet for ConnectionRecords. Calls to
* asCollection() will query connection history records from the database. Which
* records are returned will be determined by the values passed in earlier.
*/
public class ConnectionRecordSet extends RestrictedObject
implements org.apache.guacamole.net.auth.ConnectionRecordSet {
implements ActivityRecordSet<ConnectionRecord> {
/**
* Service for managing connection objects.

View File

@@ -19,7 +19,7 @@
package org.apache.guacamole.auth.jdbc.connection;
import org.apache.guacamole.net.auth.ConnectionRecordSet;
import org.apache.guacamole.net.auth.ActivityRecordSet;
/**
* A sort predicate which species the property to use when sorting connection
@@ -30,7 +30,7 @@ public class ConnectionRecordSortPredicate {
/**
* The property to use when sorting ConnectionRecords.
*/
private final ConnectionRecordSet.SortableProperty property;
private final ActivityRecordSet.SortableProperty property;
/**
* Whether the sort order is descending (true) or ascending (false).
@@ -47,7 +47,7 @@ public class ConnectionRecordSortPredicate {
* @param descending
* Whether the sort order is descending (true) or ascending (false).
*/
public ConnectionRecordSortPredicate(ConnectionRecordSet.SortableProperty property,
public ConnectionRecordSortPredicate(ActivityRecordSet.SortableProperty property,
boolean descending) {
this.property = property;
this.descending = descending;
@@ -59,7 +59,7 @@ public class ConnectionRecordSortPredicate {
* @return
* The property that should be used when sorting ConnectionRecords.
*/
public ConnectionRecordSet.SortableProperty getProperty() {
public ActivityRecordSet.SortableProperty getProperty() {
return property;
}

View File

@@ -28,16 +28,17 @@ import org.apache.guacamole.auth.jdbc.sharing.connectiongroup.SharedRootConnecti
import org.apache.guacamole.auth.jdbc.user.RemoteAuthenticatedUser;
import org.apache.guacamole.form.Form;
import org.apache.guacamole.net.auth.ActiveConnection;
import org.apache.guacamole.net.auth.ActivityRecordSet;
import org.apache.guacamole.net.auth.AuthenticationProvider;
import org.apache.guacamole.net.auth.Connection;
import org.apache.guacamole.net.auth.ConnectionGroup;
import org.apache.guacamole.net.auth.ConnectionRecordSet;
import org.apache.guacamole.net.auth.ConnectionRecord;
import org.apache.guacamole.net.auth.Directory;
import org.apache.guacamole.net.auth.SharingProfile;
import org.apache.guacamole.net.auth.User;
import org.apache.guacamole.net.auth.UserContext;
import org.apache.guacamole.net.auth.simple.SimpleActivityRecordSet;
import org.apache.guacamole.net.auth.simple.SimpleConnectionGroupDirectory;
import org.apache.guacamole.net.auth.simple.SimpleConnectionRecordSet;
import org.apache.guacamole.net.auth.simple.SimpleDirectory;
/**
@@ -175,8 +176,8 @@ public class SharedUserContext implements UserContext {
}
@Override
public ConnectionRecordSet getConnectionHistory() {
return new SimpleConnectionRecordSet();
public ActivityRecordSet<ConnectionRecord> getConnectionHistory() {
return new SimpleActivityRecordSet<ConnectionRecord>();
}
@Override