Class BasicObserverConfiguration
java.lang.Object
org.apache.sling.resourceresolver.impl.observation.BasicObserverConfiguration
- All Implemented Interfaces:
ObserverConfiguration
Implementation of a
ObserverConfiguration-
Constructor Summary
ConstructorsConstructorDescriptionBasicObserverConfiguration(PathSet paths, Set<ResourceChange.ChangeType> types, boolean isExternal, PathSet excludePaths, Set<String> propertyNamesHint) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ResourceChangeListenerInfo listener) Add a listenerbooleanThe 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.inthashCode()booleantrueif a listener is interested in external events.booleanChecks 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:ObserverConfigurationtrueif a listener is interested in external events.- Specified by:
includeExternalin interfaceObserverConfiguration- Returns:
trueif a listener is interested in external events.
-
getPaths
Description copied from interface:ObserverConfigurationThe set of paths this listener is interested in. Each entry is absolute.- Specified by:
getPathsin interfaceObserverConfiguration- Returns:
- Non empty set of paths
-
getExcludedPaths
Description copied from interface:ObserverConfigurationThe set of excluded paths. All the paths are sub paths from one entry ofObserverConfiguration.getPaths()- Specified by:
getExcludedPathsin interfaceObserverConfiguration- Returns:
- A set of excluded paths, might be empty.
-
getChangeTypes
Description copied from interface:ObserverConfigurationThe set of types listeners are interested in.- Specified by:
getChangeTypesin interfaceObserverConfiguration- Returns:
- Non empty set of types
-
matches
Description copied from interface:ObserverConfigurationChecks whether a path matches one of the paths of this configuration but is not in the excluded paths set.- Specified by:
matchesin interfaceObserverConfiguration- Parameters:
path- The path to check- Returns:
trueif the path matches the configuration.
-
getPropertyNamesHint
Description copied from interface:ObserverConfigurationSet 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:
getPropertyNamesHintin interfaceObserverConfiguration- Returns:
- Set containing the set of property names or
null
-
hashCode
public int hashCode() -
equals
-
toString
-