Interface DirectoryEvent<ObjectType extends Identifiable>

Type Parameters:
ObjectType - The type of object stored within the Directory.
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.
  • 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 interface IdentifiableObjectEvent<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 interface IdentifiableObjectEvent<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.