Class BasicObserverConfiguration
java.lang.Object
org.apache.sling.resourceresolver.impl.observation.BasicObserverConfiguration
- All Implemented Interfaces:
ObserverConfiguration
Implementation of a
ObserverConfiguration
-
Constructor Summary
ConstructorDescriptionBasicObserverConfiguration
(PathSet paths, Set<ResourceChange.ChangeType> types, boolean isExternal, PathSet excludePaths, Set<String> propertyNamesHint) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(ResourceChangeListenerInfo listener) Add a listenerboolean
The set of types listeners are interested in.The set of excluded paths.All listeners associated with this configurationgetPaths()
The set of paths this listener is interested in.Set containing the set of property names which serves as an optional hint for the underlying to only report property changes enlisted, ie the underlying might ignore this.int
hashCode()
boolean
true
if a listener is interested in external events.boolean
Checks whether a path matches one of the paths of this configuration but is not in the excluded paths set.toString()
-
Constructor Details
-
BasicObserverConfiguration
-
BasicObserverConfiguration
-
-
Method Details
-
addListener
Add a listener- Parameters:
listener
- The listener
-
getListeners
All listeners associated with this configuration- Returns:
- List of listeners, might be empty
-
includeExternal
public boolean includeExternal()Description copied from interface:ObserverConfiguration
true
if a listener is interested in external events.- Specified by:
includeExternal
in interfaceObserverConfiguration
- Returns:
true
if a listener is interested in external events.
-
getPaths
Description copied from interface:ObserverConfiguration
The set of paths this listener is interested in. Each entry is absolute.- Specified by:
getPaths
in interfaceObserverConfiguration
- Returns:
- Non empty set of paths
-
getExcludedPaths
Description copied from interface:ObserverConfiguration
The set of excluded paths. All the paths are sub paths from one entry ofObserverConfiguration.getPaths()
- Specified by:
getExcludedPaths
in interfaceObserverConfiguration
- Returns:
- A set of excluded paths, might be empty.
-
getChangeTypes
Description copied from interface:ObserverConfiguration
The set of types listeners are interested in.- Specified by:
getChangeTypes
in interfaceObserverConfiguration
- Returns:
- Non empty set of types
-
matches
Description copied from interface:ObserverConfiguration
Checks whether a path matches one of the paths of this configuration but is not in the excluded paths set.- Specified by:
matches
in interfaceObserverConfiguration
- Parameters:
path
- The path to check- Returns:
true
if the path matches the configuration.
-
getPropertyNamesHint
Description copied from interface:ObserverConfiguration
Set containing the set of property names which serves as an optional hint for the underlying to only report property changes enlisted, ie the underlying might ignore this.- Specified by:
getPropertyNamesHint
in interfaceObserverConfiguration
- Returns:
- Set containing the set of property names or
null
-
hashCode
public int hashCode() -
equals
-
toString
-