From: Giulio V. <gva...@us...> - 2004-06-01 12:08:15
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31396/src/org/exist/xmlrpc Modified Files: RpcAPI.java RpcConnection.java RpcServer.java Log Message: add reindexCollection method Index: RpcServer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcServer.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** RpcServer.java 25 May 2004 09:26:10 -0000 1.35 --- RpcServer.java 1 Jun 2004 12:08:06 -0000 1.36 *************** *** 1565,1567 **** --- 1565,1581 ---- } } + + public boolean reindexCollection(User user, String name) + throws EXistException, PermissionDeniedException { + RpcConnection con = pool.get(); + try { + con.reindexCollection(user, name); + return true; + } catch (Exception e) { + handleException(e); + return false; + } finally { + pool.release(con); + } + } } Index: RpcAPI.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcAPI.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** RpcAPI.java 21 May 2004 08:32:15 -0000 1.27 --- RpcAPI.java 1 Jun 2004 12:08:06 -0000 1.28 *************** *** 699,701 **** --- 699,706 ---- byte[] getDocumentChunk(User user, String name, int start, int stop) throws EXistException, PermissionDeniedException, IOException; + + boolean reindexCollection(User user, String name) + throws EXistException, PermissionDeniedException; + + } Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** RpcConnection.java 25 May 2004 09:26:09 -0000 1.58 --- RpcConnection.java 1 Jun 2004 12:08:06 -0000 1.59 *************** *** 1894,1896 **** --- 1894,1911 ---- return buffer; } + + public void reindexCollection(User user, String name) throws Exception, + PermissionDeniedException { + DBBroker broker = null; + try { + broker = brokerPool.get(user); + broker.reindex(name); + LOG.debug("collection " + name + " and sub collection reindexed"); + } catch (Exception e) { + LOG.debug(e); + throw e; + } finally { + brokerPool.release(broker); + } + } } |