Search in sources :

Example 1 with EventFilterImpl

use of org.apache.jackrabbit.spi.commons.EventFilterImpl in project jackrabbit by apache.

the class EventSubscription method setFilters.

/**
     * Sets a new list of event filters for this subscription.
     *
     * @param filters the new filters.
     * @throws RepositoryException if the filters array contains a unknown
     *                             implementation of EventFilters.
     */
void setFilters(EventFilter[] filters) throws RepositoryException {
    // check type
    for (EventFilter filter : filters) {
        if (!(filter instanceof EventFilterImpl)) {
            throw new RepositoryException("Unknown filter implementation");
        }
    }
    List<EventFilter> tmp = new ArrayList<EventFilter>(Arrays.asList(filters));
    this.filters = Collections.unmodifiableList(tmp);
}
Also used : EventFilterImpl(org.apache.jackrabbit.spi.commons.EventFilterImpl) ArrayList(java.util.ArrayList) RepositoryException(javax.jcr.RepositoryException) EventFilter(org.apache.jackrabbit.spi.EventFilter)

Aggregations

ArrayList (java.util.ArrayList)1 RepositoryException (javax.jcr.RepositoryException)1 EventFilter (org.apache.jackrabbit.spi.EventFilter)1 EventFilterImpl (org.apache.jackrabbit.spi.commons.EventFilterImpl)1