public List checkForRemovedWatchedFolders()

in src/main/java/org/apache/sling/installer/provider/jcr/impl/InstallerConfig.java [152:168]


    public List<String> checkForRemovedWatchedFolders(final Session session) throws RepositoryException {
        final List<String> removedResources = new LinkedList<String>();
        synchronized ( this.watchedFolders ) {
            final Iterator<WatchedFolder> i = this.watchedFolders.iterator();
            while ( i.hasNext() ) {
                final WatchedFolder wf = i.next();

                logger.debug("Item {} exists? {}", wf.getPath(), session.itemExists(wf.getPath()));
                if (!session.itemExists(wf.getPath())) {
                    logger.info("Deleting {}, path does not exist anymore", wf);
                    removedResources.addAll(wf.scan().toRemove);
                    i.remove();
                }
            }
        }
        return removedResources;
    }