Class SimpleUser

All Implemented Interfaces:
Attributes, Disableable, Identifiable, Permissions, ReadableAttributes, User

public class SimpleUser extends AbstractUser
A read-only User implementation which has no permissions. Implementations that need to define permissions should extend this class and override the associated getters.
  • Constructor Details

    • SimpleUser

      public SimpleUser()
      Creates a completely uninitialized SimpleUser.
    • SimpleUser

      public SimpleUser(String username)
      Creates a new SimpleUser having the given username.
      Parameters:
      username - The username to assign to this SimpleUser.
    • SimpleUser

      @Deprecated public SimpleUser(String username, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers)
      Deprecated.
      Extend and override the applicable permission set getters instead, relying on SimpleUser to expose no permissions by default for all permission sets that aren't overridden. See SimpleObjectPermissionSet for convenient methods of providing a read-only permission set with specific permissions.
      Creates a new SimpleUser having the given username and READ access to the connections and connection groups having the given identifiers.
      Parameters:
      username - The username to assign to this SimpleUser.
      connectionIdentifiers - The identifiers of all connections this user has READ access to.
      connectionGroupIdentifiers - The identifiers of all connection groups this user has READ access to.
    • SimpleUser

      @Deprecated public SimpleUser(String username, Collection<String> userIdentifiers, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers)
      Deprecated.
      Extend and override the applicable permission set getters instead, relying on SimpleUser to expose no permissions by default for all permission sets that aren't overridden. See SimpleObjectPermissionSet for convenient methods of providing a read-only permission set with specific permissions.
      Creates a new SimpleUser having the given username and READ access to the users, connections, and groups having the given identifiers.
      Parameters:
      username - The username to assign to this SimpleUser.
      userIdentifiers - The identifiers of all users this user has READ access to.
      connectionIdentifiers - The identifiers of all connections this user has READ access to.
      connectionGroupIdentifiers - The identifiers of all connection groups this user has READ access to.
  • Method Details

    • getConnectionPermissions

      public ObjectPermissionSet getConnectionPermissions() throws org.apache.guacamole.GuacamoleException
      Description copied from class: AbstractUser
      Returns all connection permissions given to this object.

      This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.

      Specified by:
      getConnectionPermissions in interface Permissions
      Overrides:
      getConnectionPermissions in class AbstractUser
      Returns:
      An ObjectPermissionSet of all connection permissions granted to this object.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
    • getConnectionGroupPermissions

      public ObjectPermissionSet getConnectionGroupPermissions() throws org.apache.guacamole.GuacamoleException
      Description copied from class: AbstractUser
      Returns all connection group permissions given to this object.

      This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.

      Specified by:
      getConnectionGroupPermissions in interface Permissions
      Overrides:
      getConnectionGroupPermissions in class AbstractUser
      Returns:
      An ObjectPermissionSet of all connection group permissions granted to this object.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
    • getUserPermissions

      public ObjectPermissionSet getUserPermissions() throws org.apache.guacamole.GuacamoleException
      Description copied from class: AbstractUser
      Returns all user permissions given to this object.

      This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.

      Specified by:
      getUserPermissions in interface Permissions
      Overrides:
      getUserPermissions in class AbstractUser
      Returns:
      An ObjectPermissionSet of all user permissions granted to this object.
      Throws:
      org.apache.guacamole.GuacamoleException - If an error occurs while retrieving permissions, or if reading all permissions is not allowed.