GUACAMOLE-1123: Fixes to comments, method scope, and minor code tweaks.

This commit is contained in:
Virtually Nick
2020-10-15 14:25:57 -04:00
parent 3d761ea794
commit 0430d5510a
11 changed files with 51 additions and 20 deletions

View File

@@ -19,6 +19,7 @@
package org.apache.guacamole.net.auth;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
@@ -100,17 +101,23 @@ public interface Connection extends Identifiable, Connectable, Attributes {
* connections are first), and then in descending order of start time
* (newer connections are first).
*
* @deprecated
* This function has been deprecated in favor of
* {@link getConnectionHistory}, which returns the connection history
* as an ActivityRecordSet that can be easily sorted and filtered.
* While the getHistory() method is provided for API compatibility,
* new implementations should avoid use of this method and, instead,
* implement the getConnectionHistory() method.
*
* @return A list of ConnectionRecrods representing the usage history
* of this Connection.
*
* @throws GuacamoleException If an error occurs while reading the history
* of this connection, or if permission is
* denied.
*
* @deprecated Use {@link getConnectionHistory} instead.
*/
@Deprecated
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException;
List<? extends ConnectionRecord> getHistory() throws GuacamoleException;
/**
* Returns an ActivityRecordSet containing ConnectionRecords that
@@ -127,7 +134,7 @@ public interface Connection extends Identifiable, Connectable, Attributes {
* If an error occurs retrieving history for this Connection, or if
* permission to retrieve the history is denied.
*/
public ActivityRecordSet<ConnectionRecord> getConnectionHistory()
ActivityRecordSet<ConnectionRecord> getConnectionHistory()
throws GuacamoleException;
/**

View File

@@ -19,6 +19,7 @@
package org.apache.guacamole.net.auth;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.guacamole.GuacamoleException;
@@ -95,6 +96,13 @@ public interface User extends Identifiable, Attributes, Permissions {
* sessions are first), and then in descending order of start time
* (newer sessions are first).
*
* @deprecated
* This function is deprecated in favor of {@link getUserHistory}, which
* returns the login history as an ActivityRecordSet which supports
* various sort and filter functions. While this continues to be defined
* for API compatibility, new implementation should avoid this function
* and use getUserHistory(), instead.
*
* @return
* A list of ActivityRecords representing the login history of this
* User.
@@ -102,9 +110,6 @@ public interface User extends Identifiable, Attributes, Permissions {
* @throws GuacamoleException
* If an error occurs while reading the history of this user, or if
* permission is denied.
*
* @deprecated
* Use {@link getUserHistory} instead.
*/
@Deprecated
List<? extends ActivityRecord> getHistory() throws GuacamoleException;
@@ -124,7 +129,7 @@ public interface User extends Identifiable, Attributes, Permissions {
* If an error occurs retrieving this user's login history, or if
* permission to retrieve login history is denied.
*/
public ActivityRecordSet<ActivityRecord> getUserHistory()
ActivityRecordSet<ActivityRecord> getUserHistory()
throws GuacamoleException;
/**