From b64c4f3b94f3ac98ee750e5631db7913bf42bfa1 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 26 May 2015 11:16:09 -0700 Subject: [PATCH] GUAC-800: Clarify semantics of getAttributes() / setAttributes(). --- .../glyptodon/guacamole/net/auth/Connection.java | 14 ++++++++------ .../guacamole/net/auth/ConnectionGroup.java | 14 ++++++++------ .../org/glyptodon/guacamole/net/auth/User.java | 14 ++++++++------ 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/Connection.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/Connection.java index 6ab34dab4..9de591be6 100644 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/Connection.java +++ b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/Connection.java @@ -86,21 +86,23 @@ public interface Connection extends Identifiable, Connectable { public void setConfiguration(GuacamoleConfiguration config); /** - * Returns all attributes associated with this connection. + * Returns all attributes associated with this connection. The returned map + * may not be modifiable. * * @return * A map of all attribute identifiers to their corresponding values, - * for all attributes associated with this connection. + * for all attributes associated with this connection, which may not be + * modifiable. */ Map getAttributes(); /** - * Replaces all attributes associated with this connection with the - * attributes in the given map. + * Sets the given attributes. If an attribute within the map is not + * supported, it will simply be dropped. Any attributes not within the + * given map will be left untouched. * * @param attributes - * A map of all attribute identifiers to their corresponding values, - * for all attributes associated with this connection. + * A map of all attribute identifiers to their corresponding values. */ void setAttributes(Map attributes); diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionGroup.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionGroup.java index 25eb11797..0b20f2301 100644 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionGroup.java +++ b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/ConnectionGroup.java @@ -130,21 +130,23 @@ public interface ConnectionGroup extends Identifiable, Connectable { throws GuacamoleException; /** - * Returns all attributes associated with this connection group. + * Returns all attributes associated with this connection group. The + * returned map may not be modifiable. * * @return * A map of all attribute identifiers to their corresponding values, - * for all attributes associated with this connection group. + * for all attributes associated with this connection group, which may + * not be modifiable. */ Map getAttributes(); /** - * Replaces all attributes associated with this connection group with the - * attributes in the given map. + * Sets the given attributes. If an attribute within the map is not + * supported, it will simply be dropped. Any attributes not within the + * given map will be left untouched. * * @param attributes - * A map of all attribute identifiers to their corresponding values, - * for all attributes associated with this connection group. + * A map of all attribute identifiers to their corresponding values. */ void setAttributes(Map attributes); diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/User.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/User.java index b2f13ea23..355dd5def 100644 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/User.java +++ b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/User.java @@ -53,21 +53,23 @@ public interface User extends Identifiable { public void setPassword(String password); /** - * Returns all attributes associated with this user. + * Returns all attributes associated with this user. The returned map may + * not be modifiable. * * @return * A map of all attribute identifiers to their corresponding values, - * for all attributes associated with this user. + * for all attributes associated with this user, which may not be + * modifiable. */ Map getAttributes(); /** - * Replaces all attributes associated with this user with the attributes in - * the given map. + * Sets the given attributes. If an attribute within the map is not + * supported, it will simply be dropped. Any attributes not within the + * given map will be left untouched. * * @param attributes - * A map of all attribute identifiers to their corresponding values, - * for all attributes associated with this user. + * A map of all attribute identifiers to their corresponding values. */ void setAttributes(Map attributes);