Advertisement
shmoula

Untitled

Jun 15th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. private List<NodeRef> getProcessableNodes() {
  2.         List<NodeRef> nodeRefs = null;
  3.  
  4.         String query = "+PATH:\"/app:company_home/st:sites//*\""
  5.                 + " +TYPE:\"mispub:webContent\""
  6.                 + " +@mispub\\:toProcess:true";
  7.  
  8.         SearchParameters sp = new SearchParameters();
  9.         StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
  10.         sp.addStore(storeRef);
  11.         sp.setLanguage(SearchService.LANGUAGE_LUCENE);
  12.  
  13.         sp.setQuery(query);
  14.  
  15.         ResultSet result = searchService.query(sp);
  16.        
  17.         try {
  18.             if (result != null)
  19.                 nodeRefs = result.getNodeRefs();
  20.         } finally {
  21.             result.close();
  22.         }
  23.  
  24.         return nodeRefs;
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement