Class PathFilter
- All Implemented Interfaces:
org.alfresco.event.sdk.handling.filter.EventFilter
This filter provides two configurable modes: - Testing if a node's path exactly matches a provided string. - Testing if a node's path matches a regular expression pattern.
The filter relies on the NodesApi
to fetch node details, specifically to
retrieve the node's path attribute at event evaluation time. Log messages provide
traceability of the filter's decisions for debugging purposes.
Typical usage involves obtaining a configured instance via the factory
methods exposed by a Spring-managed PathFilter
bean:
- pathFilter.of(String path)
to filter by exact path name
- pathFilter.of(Pattern pathPattern)
to filter by regular expression
Integration with Spring ensures that the required NodesApi
dependency
is supplied at runtime. This filter is intended to be used as part of event processing
chains, allowing only events whose nodes match the specified path criteria to pass through.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
test
(org.alfresco.repo.event.v1.model.RepoEvent<org.alfresco.repo.event.v1.model.DataAttributes<org.alfresco.repo.event.v1.model.Resource>> repoEvent) Methods inherited from class org.alfresco.event.sdk.handling.filter.AbstractEventFilter
hasAspectAfter, hasAspectBefore, hasPropertyAfter, hasPropertyBefore, hasResourceBefore, isAssocEvent, isContentEvent, isEventWellFormed, isNodeEvent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.alfresco.event.sdk.handling.filter.EventFilter
and, negate, or
-
Constructor Details
-
PathFilter
@Autowired public PathFilter(org.alfresco.core.handler.NodesApi nodesApi)
-
-
Method Details
-
of
-
of
-
test
public boolean test(org.alfresco.repo.event.v1.model.RepoEvent<org.alfresco.repo.event.v1.model.DataAttributes<org.alfresco.repo.event.v1.model.Resource>> repoEvent)
-