Package org.apache.guacamole.net.auth
Interface RelatedObjectSet
- All Known Implementing Classes:
SimpleRelatedObjectSet
public interface RelatedObjectSet
An arbitrary set of existing objects sharing some common relation. Unlike a
Directory, which provides for maintaining the entire lifecycle of its
objects, a RelatedObjectSet only maintains the relation between its
containing object and the objects within the set. Adding/removing an object
from a RelatedObjectSet affects only the status of the specific relationship
represented by the RelatedObjectSet, not the existence of the objects
themselves.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RelatedObjectSet
An immutable instance of RelatedObjectSEt which contains no objects. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObjects
(Set<String> identifiers) Adds the objects having the given identifiers, if not already present.Returns a Set which contains the identifiers of all objects contained within this RelatedObjectSet.void
removeObjects
(Set<String> identifiers) Removes each of the objects having the specified identifiers, if present.
-
Field Details
-
EMPTY_SET
An immutable instance of RelatedObjectSEt which contains no objects.
-
-
Method Details
-
getObjects
Returns a Set which contains the identifiers of all objects contained within this RelatedObjectSet.- Returns:
- A Set which contains the identifiers of all objects contained within this RelatedObjectSet.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the objects within the set, or if objects cannot be retrieved due to lack of permissions to do so.
-
addObjects
Adds the objects having the given identifiers, if not already present. If a specified object is already present, no operation is performed regarding that object.- Parameters:
identifiers
- The identifiers of all objects being added.- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while adding the objects, or if permission to add objects is denied.
-
removeObjects
Removes each of the objects having the specified identifiers, if present. If a specified object is not present, no operation is performed regarding that object.- Parameters:
identifiers
- The identifiers of all objects being removed.- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while removing the objects, or if permission to remove objects is denied.
-