public class SimpleUserContext extends Object implements UserContext
Constructor and Description |
---|
SimpleUserContext(AuthenticationProvider authProvider,
Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
Creates a new SimpleUserContext which provides access to only those
configurations within the given Map.
|
SimpleUserContext(AuthenticationProvider authProvider,
String username,
Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
Creates a new SimpleUserContext for the user with the given username
which provides access to only those configurations within the given Map.
|
Modifier and Type | Method and Description |
---|---|
Directory<ActiveConnection> |
getActiveConnectionDirectory()
Retrieves a Directory which can be used to view and manipulate
active connections, but only as allowed by the permissions given to the
user.
|
AuthenticationProvider |
getAuthenticationProvider()
Returns the AuthenticationProvider which created this UserContext, which
may not be the same AuthenticationProvider that authenticated the user
associated with this UserContext.
|
Collection<Form> |
getConnectionAttributes()
Retrieves a collection of all attributes applicable to connections.
|
Directory<Connection> |
getConnectionDirectory()
Retrieves a Directory which can be used to view and manipulate
connections and their configurations, but only as allowed by the
permissions given to the user.
|
Collection<Form> |
getConnectionGroupAttributes()
Retrieves a collection of all attributes applicable to connection
groups.
|
Directory<ConnectionGroup> |
getConnectionGroupDirectory()
Retrieves a Directory which can be used to view and manipulate
connection groups and their members, but only as allowed by the
permissions given to the user.
|
ConnectionRecordSet |
getConnectionHistory()
Retrieves all connection records visible to current user.
|
Object |
getResource()
Returns an arbitrary REST resource representing this UserContext.
|
ConnectionGroup |
getRootConnectionGroup()
Retrieves a connection group which can be used to view and manipulate
connections, but only as allowed by the permissions given to the user of
this UserContext.
|
Collection<Form> |
getSharingProfileAttributes()
Retrieves a collection of all attributes applicable to sharing profiles.
|
Directory<SharingProfile> |
getSharingProfileDirectory()
Retrieves a Directory which can be used to view and manipulate
sharing profiles and their configurations, but only as allowed by the
permissions given to the user.
|
Collection<Form> |
getUserAttributes()
Retrieves a collection of all attributes applicable to users.
|
Directory<User> |
getUserDirectory()
Retrieves a Directory which can be used to view and manipulate other
users, but only as allowed by the permissions given to the user of this
UserContext.
|
User |
self()
Returns the User whose access rights control the operations of this
UserContext.
|
public SimpleUserContext(AuthenticationProvider authProvider, Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
authProvider
- The AuthenticationProvider creating this UserContext.configs
- A Map of all configurations for which the user associated with this
UserContext has read access.public SimpleUserContext(AuthenticationProvider authProvider, String username, Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
authProvider
- The AuthenticationProvider creating this UserContext.username
- The username of the user associated with this UserContext.configs
- A Map of all configurations for which the user associated with
this UserContext has read access.public User self()
UserContext
self
in interface UserContext
public Object getResource() throws org.apache.guacamole.GuacamoleException
UserContext
getResource
in interface UserContext
org.apache.guacamole.GuacamoleException
- If the REST resource cannot be returned due to an error.public AuthenticationProvider getAuthenticationProvider()
UserContext
getAuthenticationProvider
in interface UserContext
public Directory<User> getUserDirectory() throws org.apache.guacamole.GuacamoleException
UserContext
getUserDirectory
in interface UserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while creating the
Directory.public Directory<Connection> getConnectionDirectory() throws org.apache.guacamole.GuacamoleException
UserContext
getConnectionDirectory
in interface UserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while creating the
Directory.public Directory<ConnectionGroup> getConnectionGroupDirectory() throws org.apache.guacamole.GuacamoleException
UserContext
getConnectionGroupDirectory
in interface UserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while creating the
Directory.public ConnectionGroup getRootConnectionGroup() throws org.apache.guacamole.GuacamoleException
UserContext
getRootConnectionGroup
in interface UserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while creating the
Directory.public Directory<SharingProfile> getSharingProfileDirectory() throws org.apache.guacamole.GuacamoleException
UserContext
getSharingProfileDirectory
in interface UserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while creating the Directory.public Directory<ActiveConnection> getActiveConnectionDirectory() throws org.apache.guacamole.GuacamoleException
UserContext
getActiveConnectionDirectory
in interface UserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while creating the Directory.public ConnectionRecordSet getConnectionHistory() throws org.apache.guacamole.GuacamoleException
UserContext
getConnectionHistory
in interface UserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the connection records.public Collection<Form> getUserAttributes()
UserContext
getUserAttributes
in interface UserContext
public Collection<Form> getConnectionAttributes()
UserContext
getConnectionAttributes
in interface UserContext
public Collection<Form> getConnectionGroupAttributes()
UserContext
getConnectionGroupAttributes
in interface UserContext
public Collection<Form> getSharingProfileAttributes()
UserContext
getSharingProfileAttributes
in interface UserContext
Copyright © 2017. All rights reserved.