jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Munteanu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3745) Add JackrabbitObservationManager with additional methods for registering event listeners
Date Wed, 12 Mar 2014 20:30:44 GMT

    [ https://issues.apache.org/jira/browse/JCR-3745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13932312#comment-13932312

Robert Munteanu commented on JCR-3745:

As a suggestion, would it be possible to model this new API after the ones which would be
introduced by JSR-333? That would look something like

public interface JackrabbitEventFilter extends javax.jcr.observation.EventFilter {
  void setAdditionalAbsPaths(String[] absPaths);
  String[] getAdditionalAbsPaths();
  void setNoExternal(boolean noExternal);
  boolean getNoExternal();

public class ObservationManagerImpl implements ObservationManager, EventStateCollectionFactory
   // skipping existing code
  public JackrabbitEventFilter createEventFilter();
  /** Knows how to handle instances of JackrabbitEventFilter in addition to the spec-compliant
behaviour */
  public void addEventListener(EventListener listener, EventFilter filter) throws RepositoryException;

The advantage would be that it minimizes the discrepancies with the proposed JSR-333 API and
that it is a bit more future-proof, in case we decide to introduce additional fields to the

> Add JackrabbitObservationManager with additional methods for registering event listeners
> ----------------------------------------------------------------------------------------
>                 Key: JCR-3745
>                 URL: https://issues.apache.org/jira/browse/JCR-3745
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-api
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
> I'd like to add an additional method for adding event listeners to the Jackrabbit API:

> void addEventListener(EventListener listener, int eventTypes, String[] absPaths, boolean
isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal, boolean noExternal) throws
> Compared to the JCR method of the same name, this method takes an array of absPath and
additional boolean argument: 
> Only events whose associated parent node is at one of the paths in <code>absPaths</code>
(or within its subgraph, if <code>isDeep</code> is <code>true</code>)
will be received. 
> and 
> Additionally, if <code>noExternal</code> is <code>true</code>,
then events from external cluster nodes are ignored. Otherwise, they are not ignored.

This message was sent by Atlassian JIRA

View raw message