Package lumis.portal.event
Class PortalEventFilters
- java.lang.Object
-
- lumis.portal.event.PortalEventFilters
-
@StableMinor(version="14.0", sinceVersion="4.2") public abstract class PortalEventFilters extends Object
Provides utility methods forIPortalEventFilter
manipulation.- Since:
- 4.1.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IPortalEventFilter
all()
Returns an event filter that accepts all events.static IPortalEventFilter
and(IPortalEventFilter... filters)
Returns an event filter that accepts only events that all of the given filters would accept.static IPortalEventFilter
byClasses(Class<?>... classes)
Returns an event filter that accepts only events of any of the specified classes.static IPortalEventFilter
byGroups(String... groups)
Returns an event filter that accepts only event that contain any of the specified groups as its group.static IPortalEventFilter
byInstanceOf(Class<?>... classes)
Returns an event filter that accepts events that are instance of any the specified classes.static IPortalEventFilter
not(IPortalEventFilter filter)
Returns an event filter that accepts only events that the given filter would not accept.static IPortalEventFilter
or(IPortalEventFilter... filters)
Returns an event filter that accepts any event that any of the given filters would accept.
-
-
-
Method Detail
-
all
public static IPortalEventFilter all()
Returns an event filter that accepts all events.- Returns:
- an event filter that accepts all events.
- Since:
- 4.1.0
-
byClasses
public static IPortalEventFilter byClasses(Class<?>... classes)
Returns an event filter that accepts only events of any of the specified classes. Events must be exactly of the given classes, subclasses are not accepted. To also accept subclasses, usebyInstanceOf(Class...)
instead.- Parameters:
classes
- the classes.- Returns:
- the event filter.
- Since:
- 4.1.0
-
byInstanceOf
public static IPortalEventFilter byInstanceOf(Class<?>... classes)
Returns an event filter that accepts events that are instance of any the specified classes. The filter will accept events of the given classes or their subclasses.- Parameters:
classes
- the classes.- Returns:
- the event filter.
- Since:
- 4.1.0
- See Also:
byClasses(Class...)
-
byGroups
public static IPortalEventFilter byGroups(String... groups)
Returns an event filter that accepts only event that contain any of the specified groups as its group.- Parameters:
groups
- the groups.- Returns:
- the event filter.
- Since:
- 4.1.0
-
or
public static IPortalEventFilter or(IPortalEventFilter... filters)
Returns an event filter that accepts any event that any of the given filters would accept. This represents a logical OR operation.- Parameters:
filters
- the filters.- Returns:
- the event filter.
- Since:
- 4.1.0
-
and
public static IPortalEventFilter and(IPortalEventFilter... filters)
Returns an event filter that accepts only events that all of the given filters would accept. This represents a logical AND operation.- Parameters:
filters
- the filters.- Returns:
- the event filter.
- Since:
- 4.1.0
-
not
public static IPortalEventFilter not(IPortalEventFilter filter)
Returns an event filter that accepts only events that the given filter would not accept. This represents a logical NOT operation.- Parameters:
filter
- the filter.- Returns:
- the event filter.
- Since:
- 4.1.0
-
-