public class SimpleConnectionGroupDirectory extends Object implements Directory<String,ConnectionGroup>
Constructor and Description |
---|
SimpleConnectionGroupDirectory(Collection<ConnectionGroup> groups)
Creates a new SimpleConnectionGroupDirectory which contains the given
groups.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ConnectionGroup connectionGroup)
Adds the given object to the overall set.
|
ConnectionGroup |
get(String identifier)
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,ConnectionGroup> directory)
Moves the object with the given identifier to the given directory.
|
ConnectionGroup |
putConnectionGroup(ConnectionGroup connectionGroup)
An internal method for modifying the ConnectionGroups in this Directory.
|
void |
remove(String identifier)
Removes the object with the given identifier from the overall set.
|
ConnectionGroup |
removeConnectionGroup(String identifier)
An internal method for removing a ConnectionGroup from this Directory.
|
void |
update(ConnectionGroup connectionGroup)
Updates the stored object with the data contained in the given object.
|
public SimpleConnectionGroupDirectory(Collection<ConnectionGroup> groups)
groups
- A Collection of all groups that should be present in this
connection group directory.public ConnectionGroup get(String identifier) throws GuacamoleException
Directory
get
in interface Directory<String,ConnectionGroup>
identifier
- 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,ConnectionGroup>
GuacamoleException
- If an error occurs while retrieving
the identifiers.public void add(ConnectionGroup connectionGroup) throws GuacamoleException
Directory
add
in interface Directory<String,ConnectionGroup>
connectionGroup
- The object to add.GuacamoleException
- If an error occurs while adding the object , or
if adding the object is not allowed.public void update(ConnectionGroup connectionGroup) throws GuacamoleException
Directory
update
in interface Directory<String,ConnectionGroup>
connectionGroup
- 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 identifier) throws GuacamoleException
Directory
remove
in interface Directory<String,ConnectionGroup>
identifier
- 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,ConnectionGroup> directory) throws GuacamoleException
Directory
move
in interface Directory<String,ConnectionGroup>
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.public ConnectionGroup putConnectionGroup(ConnectionGroup connectionGroup)
connectionGroup
- The connection group to add or update the
Directory with.public ConnectionGroup removeConnectionGroup(String identifier)
identifier
- The identifier of the ConnectionGroup to remove.Copyright © 2016. All Rights Reserved.