Package org.apache.guacamole.net.event
Interface DirectoryEvent<ObjectType extends Identifiable>
- Type Parameters:
ObjectType
- The type of object stored within theDirectory
.
- All Superinterfaces:
AuthenticationProviderEvent
,IdentifiableObjectEvent<ObjectType>
,UserEvent
- All Known Subinterfaces:
DirectoryFailureEvent<ObjectType>
,DirectorySuccessEvent<ObjectType>
public interface DirectoryEvent<ObjectType extends Identifiable>
extends IdentifiableObjectEvent<ObjectType>
Abstract basis for events which involve a modification made to the objects
within a
Directory
through the operations exposed by the Directory
interface.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The types of directory operations that may be represented by a DirectoryEvent. -
Method Summary
Modifier and TypeMethodDescriptionReturns the object affected by the operation, if available.Returns the identifier of the object affected by the operation.Returns the operation that was performed/attempted.Methods inherited from interface org.apache.guacamole.net.event.IdentifiableObjectEvent
getAuthenticationProvider, getDirectoryType
Methods inherited from interface org.apache.guacamole.net.event.UserEvent
getAuthenticatedUser
-
Method Details
-
getOperation
DirectoryEvent.Operation getOperation()Returns the operation that was performed/attempted.- Returns:
- The operation that was performed or attempted.
-
getObjectIdentifier
String getObjectIdentifier()Returns the identifier of the object affected by the operation.If the object was just created, this will be the identifier of the new object.
- Specified by:
getObjectIdentifier
in interfaceIdentifiableObjectEvent<ObjectType extends Identifiable>
- Returns:
- The identifier of the object affected by the operation.
-
getObject
ObjectType getObject()Returns the object affected by the operation, if available. Whether the affected object is available is context- and implementation-dependent. There is no general guarantee across all implementations of this event that the affected object will be available. If the object is not available, null is returned.Currently, for object creation (
ADD
), retrieval (GET
), and modification (UPDATE
), it can be expected that the affected object will be available, however the caller should verify this regardless. For deletions (REMOVE
), the object can only be made available for single deletions, and cannot be made available for batch deletions.- Specified by:
getObject
in interfaceIdentifiableObjectEvent<ObjectType extends Identifiable>
- Returns:
- The object affected by the operation performed, or null if that object is not available in the context of this event.
-