GUACAMOLE-1123: Deprecate getHistory() method.

This commit is contained in:
Virtually Nick
2020-08-23 15:05:00 -04:00
parent 71625340f5
commit 3d761ea794
12 changed files with 17 additions and 0 deletions

View File

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

View File

@@ -154,6 +154,7 @@ public class SharedConnection implements Connection {
return null; return null;
} }
@Deprecated
@Override @Override
public List<? extends ConnectionRecord> getHistory() public List<? extends ConnectionRecord> getHistory()
throws GuacamoleException { throws GuacamoleException {

View File

@@ -101,6 +101,7 @@ public class SharedUser implements User {
} }
@Deprecated
@Override @Override
public List<ActivityRecord> getHistory() throws GuacamoleException { public List<ActivityRecord> getHistory() throws GuacamoleException {

View File

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

View File

@@ -93,6 +93,7 @@ public abstract class AbstractUser extends AbstractIdentifiable
* <p>This implementation simply an immutable, empty list. Implementations * <p>This implementation simply an immutable, empty list. Implementations
* that wish to expose user login history should override this function. * that wish to expose user login history should override this function.
*/ */
@Deprecated
@Override @Override
public List<ActivityRecord> getHistory() throws GuacamoleException { public List<ActivityRecord> getHistory() throws GuacamoleException {
return Collections.emptyList(); return Collections.emptyList();

View File

@@ -106,7 +106,10 @@ public interface Connection extends Identifiable, Connectable, Attributes {
* @throws GuacamoleException If an error occurs while reading the history * @throws GuacamoleException If an error occurs while reading the history
* of this connection, or if permission is * of this connection, or if permission is
* denied. * denied.
*
* @deprecated Use {@link getConnectionHistory} instead.
*/ */
@Deprecated
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException; public List<? extends ConnectionRecord> getHistory() throws GuacamoleException;
/** /**

View File

@@ -134,6 +134,7 @@ public class DelegatingConnection implements Connection {
return connection.getLastActive(); return connection.getLastActive();
} }
@Deprecated
@Override @Override
public List<? extends ConnectionRecord> getHistory() public List<? extends ConnectionRecord> getHistory()
throws GuacamoleException { throws GuacamoleException {

View File

@@ -93,6 +93,7 @@ public class DelegatingUser implements User {
return user.getLastActive(); return user.getLastActive();
} }
@Deprecated
@Override @Override
public List<? extends ActivityRecord> getHistory() public List<? extends ActivityRecord> getHistory()
throws GuacamoleException { throws GuacamoleException {

View File

@@ -102,7 +102,11 @@ public interface User extends Identifiable, Attributes, Permissions {
* @throws GuacamoleException * @throws GuacamoleException
* If an error occurs while reading the history of this user, or if * If an error occurs while reading the history of this user, or if
* permission is denied. * permission is denied.
*
* @deprecated
* Use {@link getUserHistory} instead.
*/ */
@Deprecated
List<? extends ActivityRecord> getHistory() throws GuacamoleException; List<? extends ActivityRecord> getHistory() throws GuacamoleException;
/** /**

View File

@@ -285,6 +285,7 @@ public class SimpleConnection extends AbstractConnection {
return null; return null;
} }
@Deprecated
@Override @Override
public List<ConnectionRecord> getHistory() throws GuacamoleException { public List<ConnectionRecord> getHistory() throws GuacamoleException {
return Collections.<ConnectionRecord>emptyList(); return Collections.<ConnectionRecord>emptyList();

View File

@@ -140,6 +140,7 @@ public class APIConnectionWrapper implements Connection {
return null; return null;
} }
@Deprecated
@Override @Override
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException { public List<? extends ConnectionRecord> getHistory() throws GuacamoleException {
return Collections.<ConnectionRecord>emptyList(); return Collections.<ConnectionRecord>emptyList();

View File

@@ -140,6 +140,7 @@ public class APIUserWrapper implements User {
return null; return null;
} }
@Deprecated
@Override @Override
public List<? extends ActivityRecord> getHistory() throws GuacamoleException { public List<? extends ActivityRecord> getHistory() throws GuacamoleException {
return Collections.<ActivityRecord>emptyList(); return Collections.<ActivityRecord>emptyList();