code: @Override
      public boolean registerForNotifications(
          ArtifactNotification newListenerPaths,
          ArtifactListener newListener) {
  
          if ( newListenerPaths.getContainer().getRoot() != rootContainer ) {
              throw new IllegalArgumentException();
          }
  
          synchronized ( listenersLock ) {
              boolean addedUncoveredPaths = false;
  
              for ( String newListenerPath : newListenerPaths.getPaths() ) {
                  // Handle non-recursive listener registration as recursive registration.
                  if ( newListenerPath.startsWith("!") ) {
                      newListenerPath = newListenerPath.substring(1);
                  }
  
                  ArtifactListenerSelector artifactSelectorCallback = new ArtifactListenerSelector(newListener);
                  if ( registerListener(newListenerPath, artifactSelectorCallback) ) {
                      addedUncoveredPaths = true;
                  }
              }
  
              if ( addedUncoveredPaths ) {
                  updateMonitor();
              }
          }
  
          return true;
      }
docs: Notification API: Register a listener with the paths which are
  specified by the registration object.
  See {@link ArtifactNotifier#registerForNotifications}.
  
  The registration object must be linked to the root container of
  of this notification.  If the registration is not linked to the
  root container, an <code>IllegalArgumentException</code> is thrown.
  
  The new registration must not duplicate an existing registration.
  
  @param newListenerPaths A notification which has the paths to which
  to register the listener.
  @param The listener which is to be registered to the specified
  paths.
  
  @return True or false, telling if the registration was accepted.
  This implementation always answers true.