lumis.portal.event
Class PortalEventFilters

Package class diagram package PortalEventFilters
java.lang.Object
  extended by lumis.portal.event.PortalEventFilters

public abstract class PortalEventFilters
extends Object

Provides utility methods for IPortalEventFilter manipulation.

Since:
4.1.0

Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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, use byInstanceOf(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


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.