org.xwiki.observation.event
Interface Event

All Known Subinterfaces:
ActionExecutionEvent, AnnotationEvent, BeginEvent, CancelableEvent, ComponentDescriptorEvent, EndEvent, EntityEvent, ExtensionEvent, FilterableEvent, JobEvent, WikiEvent, XClassPropertyEvent, XObjectEvent, XObjectPropertyEvent
All Known Implementing Classes:
AbstractActionExecutionEvent, AbstractAnnotationEvent, AbstractAttachmentEvent, AbstractCancelableEvent, AbstractCommentEvent, AbstractComponentDescriptorEvent, AbstractDocumentEvent, AbstractDocumentEvent, AbstractEntityEvent, AbstractExtensionEvent, AbstractFilterableEvent, AbstractWikiEvent, AbstractWikiMacroExecutionEvent, AbstractXClassPropertyEvent, AbstractXObjectEvent, AbstractXObjectPropertyEvent, ActionExecutedEvent, ActionExecutingEvent, ActionExecutionEvent, AllEvent, AnnotationAddedEvent, AnnotationDeletedEvent, AnnotationUpdatedEvent, ApplicationReadyEvent, ApplicationStartedEvent, ApplicationStoppedEvent, AttachmentAddedEvent, AttachmentDeletedEvent, AttachmentUpdatedEvent, CommentAddedEvent, CommentDeletedEvent, CommentUpdatedEvent, ComponentDescriptorAddedEvent, ComponentDescriptorRemovedEvent, DocumentCreatedEvent, DocumentCreatingEvent, DocumentDeletedEvent, DocumentDeleteEvent, DocumentDeletingEvent, DocumentSaveEvent, DocumentUpdatedEvent, DocumentUpdateEvent, DocumentUpdatingEvent, ExtensionInstalledEvent, ExtensionUninstalledEvent, ExtensionUpgradedEvent, InvalidURLEvent, JobFinishedEvent, JobStartedEvent, LogEvent, PopLevelProgressEvent, PushLevelProgressEvent, RemoteJobStartedEvent, ScriptEvaluatedEvent, ScriptEvaluatingEvent, StepProgressEvent, WikiCopiedEvent, WikiCreatedEvent, WikiCreateFailedEvent, WikiCreatingEvent, WikiDeletedEvent, WikiMacroExecutionFinishedEvent, WikiMacroExecutionStartsEvent, WikiReadyEvent, XARImportedEvent, XARImportingEvent, XClassPropertyAddedEvent, XClassPropertyDeletedEvent, XClassPropertyUpdatedEvent, XObjectAddedEvent, XObjectDeletedEvent, XObjectPropertyAddedEvent, XObjectPropertyDeletedEvent, XObjectPropertyUpdatedEvent, XObjectUpdatedEvent

public interface Event

All Event types must implement this interface.


Method Summary
 boolean matches(Object otherEvent)
          Compares two events to see if they match, meaning that a listener that registered to receive notifications like referenceEvent will be notified of any occuring event for which referenceEvent.matches(occuringEvent) will return true.
 

Method Detail

matches

boolean matches(Object otherEvent)
Compares two events to see if they match, meaning that a listener that registered to receive notifications like referenceEvent will be notified of any occuring event for which referenceEvent.matches(occuringEvent) will return true. The matching algorithm depends on the event implementation. For example for Document events two events match if they implement the same event class and if their EventFilter match. Note that the implementation is left open in order to cater for all the possible ways this Observation component can be used.

Parameters:
otherEvent - the occuring event matched against the current object
Returns:
true if the passed event matches this event, false otherwise.