mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-462: Add API-level support for associating data with history records.
This commit is contained in:
@@ -19,13 +19,16 @@
|
||||
|
||||
package org.apache.guacamole.net.auth;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* A logging record describing when a user started and ended a particular
|
||||
* activity.
|
||||
*/
|
||||
public interface ActivityRecord {
|
||||
public interface ActivityRecord extends ReadableAttributes {
|
||||
|
||||
/**
|
||||
* Returns the date and time the activity began.
|
||||
@@ -75,4 +78,23 @@ public interface ActivityRecord {
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/**
|
||||
* Returns a UUID that uniquely identifies this record. If provided, this
|
||||
* UUID MUST be deterministic and unique across all {@link ActivityRecord}
|
||||
* objects within the same {@link ActivityRecordSet}, and SHOULD be unique
|
||||
* across all {@link ActivityRecord} objects.
|
||||
*
|
||||
* @return
|
||||
* A UUID that uniquely identifies this record, or null if no such
|
||||
* unique identifier exists.
|
||||
*/
|
||||
public default UUID getUUID() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public default Map<String, String> getAttributes() {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -19,6 +19,8 @@
|
||||
|
||||
package org.apache.guacamole.net.auth;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* A logging record describing when a user started and ended usage of a
|
||||
* particular connection.
|
||||
@@ -70,4 +72,15 @@ public interface ConnectionRecord extends ActivityRecord {
|
||||
*/
|
||||
public String getSharingProfileName();
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>If implemented, this UUID SHOULD be identical to the UUID of the
|
||||
* {@link GuacamoleTunnel} originally returned when the connection was
|
||||
* established to allow extensions and/or the web application to
|
||||
* automatically associate connection information with corresponding
|
||||
* history records, such as log messages and session recordings.
|
||||
*/
|
||||
@Override
|
||||
public UUID getUUID();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user