Package nsf.playground.impexp

Examples of nsf.playground.impexp.JsonImport


              LookAheadInputStream lis = new LookAheadInputStream(is, 16);
              if(!lis.startsWith("PK")) {
                result(req, resp, HttpServletResponse.SC_BAD_REQUEST, "The uploaded file is not a zip file");
                return;
              }
              JsonImport imp = new JsonImport(new JsonImport.ZipImportSource(lis));
             
              // Delete all the documents
              View view = DominoUtils.getCurrentDatabase().getView("AllSnippetsById");
              try {
                view.getAllEntriesByKey(key).removeAll(true);
              } finally {
                view.recycle();
              }
             
              // And import the new ones
              imp.importDocuments(DominoUtils.getCurrentDatabase());
             
              result(req, resp, HttpServletResponse.SC_OK, "");
            } finally {
              StreamUtil.close(is);
            }
View Full Code Here

TOP

Related Classes of nsf.playground.impexp.JsonImport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.