GUACAMOLE-1123: Provide default interface implementations for history methods.

This commit is contained in:
Virtually Nick
2020-10-27 15:14:32 -04:00
parent 0430d5510a
commit ba060f5534
14 changed files with 139 additions and 134 deletions

View File

@@ -259,12 +259,6 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
public Date getLastActive() {
return getModel().getLastActive();
}
@Deprecated
@Override
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException {
return connectionService.retrieveHistory(getCurrentUser(), this);
}
@Override
public ActivityRecordSet<ConnectionRecord> getConnectionHistory()

View File

@@ -22,18 +22,14 @@ package org.apache.guacamole.auth.jdbc.sharing.connection;
import com.google.inject.Inject;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.GuacamoleUnsupportedException;
import org.apache.guacamole.auth.jdbc.sharing.connectiongroup.SharedRootConnectionGroup;
import org.apache.guacamole.auth.jdbc.tunnel.GuacamoleTunnelService;
import org.apache.guacamole.auth.jdbc.user.RemoteAuthenticatedUser;
import org.apache.guacamole.net.GuacamoleTunnel;
import org.apache.guacamole.net.auth.ActivityRecordSet;
import org.apache.guacamole.net.auth.Connection;
import org.apache.guacamole.net.auth.ConnectionRecord;
import org.apache.guacamole.protocol.GuacamoleClientInformation;
import org.apache.guacamole.protocol.GuacamoleConfiguration;
@@ -154,19 +150,6 @@ public class SharedConnection implements Connection {
return null;
}
@Deprecated
@Override
public List<? extends ConnectionRecord> getHistory()
throws GuacamoleException {
throw new GuacamoleUnsupportedException("SharedConnection objects do not provide history.");
}
@Override
public ActivityRecordSet<ConnectionRecord> getConnectionHistory()
throws GuacamoleException {
throw new GuacamoleUnsupportedException("SharedConnection objects do not provide history.");
}
@Override
public Set<String> getSharingProfileIdentifiers()
throws GuacamoleException {

View File

@@ -21,13 +21,9 @@ package org.apache.guacamole.auth.jdbc.sharing.user;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.GuacamoleUnsupportedException;
import org.apache.guacamole.auth.jdbc.sharing.permission.SharedObjectPermissionSet;
import org.apache.guacamole.net.auth.ActivityRecord;
import org.apache.guacamole.net.auth.ActivityRecordSet;
import org.apache.guacamole.net.auth.AuthenticatedUser;
import org.apache.guacamole.net.auth.Connection;
import org.apache.guacamole.net.auth.ConnectionGroup;
@@ -101,18 +97,6 @@ public class SharedUser implements User {
}
@Deprecated
@Override
public List<ActivityRecord> getHistory() throws GuacamoleException {
throw new GuacamoleUnsupportedException("SharedUser objects do not provide login history.");
}
@Override
public ActivityRecordSet<ActivityRecord> getUserHistory()
throws GuacamoleException {
throw new GuacamoleUnsupportedException("SharedUser objects do not provide login history.");
}
@Override
public String getPassword() {
return null;

View File

@@ -754,12 +754,6 @@ public class ModeledUser extends ModeledPermissions<UserModel> implements User {
return getModel().getLastActive();
}
@Deprecated
@Override
public List<ActivityRecord> getHistory() throws GuacamoleException {
return userService.retrieveHistory(getCurrentUser(), this);
}
@Override
public ActivityRecordSet<ActivityRecord> getUserHistory()
throws GuacamoleException {