diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContext.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContext.java index ea88cc7f4..171642e7b 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContext.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserContext.java @@ -33,12 +33,12 @@ import java.util.Collections; import org.glyptodon.guacamole.GuacamoleException; import org.glyptodon.guacamole.auth.jdbc.base.RestrictedObject; import org.glyptodon.guacamole.auth.jdbc.activeconnection.ActiveConnectionDirectory; +import org.glyptodon.guacamole.form.Parameter; import org.glyptodon.guacamole.net.auth.ActiveConnection; import org.glyptodon.guacamole.net.auth.Connection; import org.glyptodon.guacamole.net.auth.ConnectionGroup; import org.glyptodon.guacamole.net.auth.Directory; import org.glyptodon.guacamole.net.auth.User; -import org.glyptodon.guacamole.net.auth.attribute.Attribute; /** * UserContext implementation which is driven by an arbitrary, underlying @@ -134,18 +134,18 @@ public class UserContext extends RestrictedObject } @Override - public Collection getUserAttributes() { - return Collections.emptyList(); + public Collection getUserAttributes() { + return Collections.emptyList(); } @Override - public Collection getConnectionAttributes() { - return Collections.emptyList(); + public Collection getConnectionAttributes() { + return Collections.emptyList(); } @Override - public Collection getConnectionGroupAttributes() { - return Collections.emptyList(); + public Collection getConnectionGroupAttributes() { + return Collections.emptyList(); } } diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/UserContext.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/UserContext.java index 0d782e9dc..e5d1f2547 100644 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/UserContext.java +++ b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/UserContext.java @@ -24,7 +24,7 @@ package org.glyptodon.guacamole.net.auth; import java.util.Collection; import org.glyptodon.guacamole.GuacamoleException; -import org.glyptodon.guacamole.net.auth.attribute.Attribute; +import org.glyptodon.guacamole.form.Parameter; /** * The context of an active user. The functions of this class enforce all @@ -121,7 +121,7 @@ public interface UserContext { * @return * A collection of all attributes applicable to users. */ - Collection getUserAttributes(); + Collection getUserAttributes(); /** * Retrieves a collection of all attributes applicable to connections. This @@ -132,7 +132,7 @@ public interface UserContext { * @return * A collection of all attributes applicable to connections. */ - Collection getConnectionAttributes(); + Collection getConnectionAttributes(); /** * Retrieves a collection of all attributes applicable to connection @@ -143,6 +143,6 @@ public interface UserContext { * @return * A collection of all attributes applicable to connection groups. */ - Collection getConnectionGroupAttributes(); + Collection getConnectionGroupAttributes(); } diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/attribute/Attribute.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/attribute/Attribute.java deleted file mode 100644 index 38e75b538..000000000 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/attribute/Attribute.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2015 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package org.glyptodon.guacamole.net.auth.attribute; - -import org.glyptodon.guacamole.net.auth.Identifiable; - -/** - * An arbitrary attribute. Each attribute associates an identifier with a - * type, where the type dictates the semantics and legal values of the - * attribute. - * - * @author Michael Jumper - */ -public class Attribute implements Identifiable { - - /** - * The string which uniquely identifies this attribute. - */ - private String identifier; - - /** - * The type of this attribute. - */ - private Type type; - - /** - * Specific types of attributes. Each attribute type describes the kind of - * values the attribute can accept, and defines any semantics associated - * with those values. - */ - public enum Type { - - /** - * A text attribute, accepting arbitrary values. - */ - TEXT, - - /** - * A username attribute. This attribute type generally behaves - * identically to arbitrary text attributes, but has semantic - * differences. - */ - USERNAME, - - /** - * A password attribute, whose value is sensitive and must be hidden. - */ - PASSWORD, - - /** - * A numeric attribute, whose value must contain only digits. - */ - NUMERIC, - - /** - * A boolean attribute, whose value is either blank or "true". - */ - BOOLEAN, - - /** - * An enumerated attribute, whose legal values are fully enumerated - * by a provided, finite list. - */ - ENUM, - - /** - * A text attribute that can span more than one line. - */ - MULTILINE - - } - - @Override - public String getIdentifier() { - return identifier; - } - - @Override - public void setIdentifier(String identifier) { - this.identifier = identifier; - } - - /** - * Returns the type of this attribute. The attribute type dictates the kind - * of values the attribute can contain, and the semantics of the attribute - * as a whole. - * - * @return - * The type of this attribute. - */ - public Type getType() { - return type; - } - - /** - * Sets the type of this attribute. Attribute type dictates the kind of - * values the attribute can contain, and the semantics of the attribute as - * a whole. - * - * @param type - * The type to associate with this attribute. - */ - void setType(Type type) { - this.type = type; - } - -} diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/attribute/package-info.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/attribute/package-info.java deleted file mode 100644 index e653cf71a..000000000 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/attribute/package-info.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * Provides classes which describe the various attributes that can be - * associated with Guacamole objects, such as a user or a connection. - */ -package org.glyptodon.guacamole.net.auth.attribute; diff --git a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/simple/SimpleUserContext.java b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/simple/SimpleUserContext.java index ddbaef80f..1f722428f 100644 --- a/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/simple/SimpleUserContext.java +++ b/guacamole-ext/src/main/java/org/glyptodon/guacamole/net/auth/simple/SimpleUserContext.java @@ -28,13 +28,13 @@ import java.util.Collections; import java.util.Map; import java.util.UUID; import org.glyptodon.guacamole.GuacamoleException; +import org.glyptodon.guacamole.form.Parameter; import org.glyptodon.guacamole.net.auth.ActiveConnection; import org.glyptodon.guacamole.net.auth.Connection; import org.glyptodon.guacamole.net.auth.ConnectionGroup; import org.glyptodon.guacamole.net.auth.Directory; import org.glyptodon.guacamole.net.auth.User; import org.glyptodon.guacamole.net.auth.UserContext; -import org.glyptodon.guacamole.net.auth.attribute.Attribute; import org.glyptodon.guacamole.protocol.GuacamoleConfiguration; /** @@ -176,18 +176,18 @@ public class SimpleUserContext implements UserContext { } @Override - public Collection getUserAttributes() { - return Collections.emptyList(); + public Collection getUserAttributes() { + return Collections.emptyList(); } @Override - public Collection getConnectionAttributes() { - return Collections.emptyList(); + public Collection getConnectionAttributes() { + return Collections.emptyList(); } @Override - public Collection getConnectionGroupAttributes() { - return Collections.emptyList(); + public Collection getConnectionGroupAttributes() { + return Collections.emptyList(); } }