private boolean INCLUDEINSEARCH(Repository repository) { return INSERVICE(repository) && (ISGROUP(repository) || (INDEXABLE(repository))); }
public void removeItemFromIndex(final Repository repository, final StorageItem item) throws IOException { if (!INDEXABLE(repository) || !INSERVICE(repository)) { return; } // index for proxy repos shouldn't change just because you deleted something locally if (ISPROXY(repository)) { return; } // do the work sharedSingle(repository, new Runnable() { @Override public void run(IndexingContext context) throws IOException { removeItemFromIndex(repository, item, context); } }); }
public TreeNode listNodes(final TreeNodeFactory factory, final String path, final Map<Field, String> hints, final ArtifactInfoFilter artifactInfoFilter, final String repositoryId) throws NoSuchRepositoryException, IOException { final Repository repository = repositoryRegistry.getRepository(repositoryId); if (!INDEXABLE(repository) || !INSERVICE(repository)) { return null; } final TreeNode[] result = new TreeNode[1]; shared(repository, new Runnable() { @Override public void run(IndexingContext context) throws IOException { TreeViewRequest request = new TreeViewRequest(factory, path, hints, artifactInfoFilter, context); // TODO igorf // TreeNode.listChildren lists children on demand using provided context // if context is closed asynchronously, the method will return empty list. // should through IllegalStateException instead. result[0] = indexTreeView.listNodes(request); } }); return result[0]; }
protected void publishRepositoryIndex(final Repository repository) throws IOException { if (!INDEXABLE(repository) || !INSERVICE(repository)) { return; } ForceableReentrantLock reindexLock = getReindexLock(repository); if (reindexLock.tryLock()) { try { shared(repository, new Runnable() { @Override public void run(IndexingContext context) throws IOException { publishRepositoryIndex(repository, context); } }); } finally { reindexLock.unlock(); } } else { log.info( "Repository '{}' is already in the process of being re-indexed. Skipping additional publish index requests.", repository.getId()); } }
throws IOException if (!INDEXABLE(repository) || !INSERVICE(repository)) { return;
if (!INDEXABLE(repository) || !INSERVICE(repository) || !ISPROXY(repository)) { return;
public void addItemToIndex(final Repository repository, final StorageItem item) throws IOException if (!INDEXABLE(repository) || !INSERVICE(repository)) { return;