Class FixedNameEventFilter
java.lang.Object
org.xwiki.observation.event.filter.FixedNameEventFilter
- All Implemented Interfaces:
Serializable,EventFilter
An
EventFilter that matches exactly one document name.- Version:
- $Id: dd02e6ec542f0aec1cffcda7b0c4a503795cfd4f $
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFixedNameEventFilter(String filter) Constructor initializing this event filter with a document name that should be matched. -
Method Summary
-
Constructor Details
-
FixedNameEventFilter
Constructor initializing this event filter with a document name that should be matched.- Parameters:
filter- the name of the matched document
-
-
Method Details
-
getFilter
Description copied from interface:EventFilterProvides access to the filter's criterion.- Specified by:
getFilterin interfaceEventFilter- Returns:
- the filter used in the
EventFilter.matches(EventFilter)method to verify if a passed event filter matches it. - See Also:
-
matches
Description copied from interface:EventFilterCompares two event filters to see if they match, meaning that the "contexts" of two events are compatible. For example, aFixedNameEventFiltermatches another filter only if they both have the same name set as the filter, while anAlwaysMatchingEventFiltermatches any other event filter. A listener that registered to receive notifications likereferenceEventand withreferenceEventFilter, will be notified of any occuring event for whichreferenceEvent.matches(occuringEvent)will returntrueandreferenceEvent.getEventFilter().matches(occurringEvent.getEventFilter()).- Specified by:
matchesin interfaceEventFilter- Parameters:
eventFilter- the event filter to compare to the filter value- Returns:
trueif both event filters match. The matching algorithm is left to the filter event implementation. For example theRegex event filterwill match another filter if that other filter matches the regex.
-
equals
-
hashCode
public int hashCode()
-