Constructor and Description |
---|
SimpleUserDirectory(User user)
Creates a new SimpleUserDirectory which provides access to the single
user provided.
|
Modifier and Type | Method and Description |
---|---|
void |
add(User user)
Adds the given object to the overall set.
|
User |
get(String username)
Returns the object having the given identifier.
|
Set<String> |
getIdentifiers()
Returns a Set containing all identifiers for all objects within this
Directory.
|
void |
move(String identifier,
Directory<String,User> directory)
Moves the object with the given identifier to the given directory.
|
void |
remove(String username)
Removes the object with the given identifier from the overall set.
|
void |
update(User user)
Updates the stored object with the data contained in the given object.
|
public SimpleUserDirectory(User user)
user
- The user to provide access to.public User get(String username) throws GuacamoleException
Directory
get
in interface Directory<String,User>
username
- The identifier to use when locating the object to
return.GuacamoleException
- If an error occurs while retrieving the
object, or if permission for retrieving the
object is denied.public Set<String> getIdentifiers() throws GuacamoleException
Directory
getIdentifiers
in interface Directory<String,User>
GuacamoleException
- If an error occurs while retrieving
the identifiers.public void add(User user) throws GuacamoleException
Directory
add
in interface Directory<String,User>
user
- The object to add.GuacamoleException
- If an error occurs while adding the object , or
if adding the object is not allowed.public void update(User user) throws GuacamoleException
Directory
update
in interface Directory<String,User>
user
- The object which will supply the data for the update.GuacamoleException
- If an error occurs while updating the object,
or if updating the object is not allowed.public void remove(String username) throws GuacamoleException
Directory
remove
in interface Directory<String,User>
username
- The identifier of the object to remove.GuacamoleException
- If an error occurs while removing the object,
or if removing object is not allowed.public void move(String identifier, Directory<String,User> directory) throws GuacamoleException
Directory
move
in interface Directory<String,User>
identifier
- The identifier of the object to remove.directory
- The directory to move the object to.GuacamoleException
- If an error occurs while moving the object,
or if moving object is not allowed.Copyright © 2015. All rights reserved.