]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/NodeIndexer.java
203dd2e48a762f0a81ca697fa39909f8f208df96
1 package org
.argeo
.slc
.repo
;
4 import javax
.jcr
.observation
.EventListener
;
7 * Adds metadata to an existing node, ideally via observation after it has been
8 * added. THere is a similar concept in ModeShape with which this abstraction
9 * may be merged in the future.
11 public interface NodeIndexer
{
13 * Whether the node at this path will be supported. This is typically use in
14 * an {@link EventListener} before the node is loaded, and would apply on
15 * information contained in the path / file name: file extension, base path,
16 * etc. If the node needs to be loaded, the recommended approach is to
17 * return <code>true</code> here and wait for index to be called, possibly
18 * returning without processing if the node should node be indexed. While
19 * not stricly a requirements, this avoids to open sessions in the indexer,
20 * centrlaizing such tasks in the caller.
22 public Boolean
support(String path
);
25 * Adds the metadata. This is the responsibility of the caller to save the
28 public void index(Node node
);