Examples of exportDocumentView()


Examples of javax.jcr.Session.exportDocumentView()

      session1.save();

      File outputFile = File.createTempFile("jcr_bin_test-", ".tmp");
      outputFile.deleteOnExit();

      session1.exportDocumentView(testNode.getPath(), new FileOutputStream(outputFile), false, false);

      testNode.remove();
      session1.save();

      try
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

      {
         session1.exportSystemView(subRoot1.getPath(), new FileOutputStream(exportFile), false, false);
      }
      else
      {
         session1.exportDocumentView(subRoot1.getPath(), new FileOutputStream(exportFile), false, false);
      }
     
      // remove existed node
      subRoot1.remove();
      session1.save();
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

        Node node = session.getRootNode().addNode("node", "fooType");
        node.setProperty("fooProp", "fooValue");
        session.save();
       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        session.exportDocumentView("/node", out, true, false);
        node.remove();
        session.save();

        session.getWorkspace().importXML(
                "/", new ByteArrayInputStream(out.toByteArray()), IMPORT_UUID_CREATE_NEW);
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

      {
         session1.exportSystemView(subRoot1.getPath(), new FileOutputStream(exportFile), false, false);
      }
      else
      {
         session1.exportDocumentView(subRoot1.getPath(), new FileOutputStream(exportFile), false, false);
      }
     
      // remove existed node
      subRoot1.remove();
      session1.save();
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

      final String fullPath = "/" + EXO_REGISTRY + "/" + entryPath;
      Session session = session(sessionProvider, repositoryService.getCurrentRepository());
      try
      {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         session.exportDocumentView(fullPath, out, true, false);
         return RegistryEntry.parse(out.toByteArray());
      }
      catch (IOException e)
      {
         throw new RepositoryException("Can't export node " + fullPath + " to XML representation " + e);
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

      final String fullPath = "/" + EXO_REGISTRY + "/" + entryPath;
      Session session = session(sessionProvider, repositoryService.getCurrentRepository());
      try
      {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         session.exportDocumentView(fullPath, out, true, false);
         return RegistryEntry.parse(out.toByteArray());
      }
      catch (IOException e)
      {
         throw new RepositoryException("Can't export node " + fullPath + " to XML representation " + e);
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

      newSession.save();

      ByteArrayOutputStream bos = new ByteArrayOutputStream();

      newSession.exportDocumentView(testNode.getPath(), bos, false, false);
      bos.close();
      String exportContent = bos.toString();
      assertFalse(exportContent.contains("newjcr"));

      newSession.logout();
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

      SAXTransformerFactory saxFact = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
      TransformerHandler handler = saxFact.newTransformerHandler();
      handler.setResult(new StreamResult(bos));

      newSession.exportDocumentView(testNode.getPath(), handler, false, false);

      bos.close();
      String exportContent = bos.toString();
      assertFalse(exportContent.contains("newjcr"));
      newSession.logout();
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

      {
         session1.exportSystemView(subRoot1.getPath(), new FileOutputStream(exportFile), false, false);
      }
      else
      {
         session1.exportDocumentView(subRoot1.getPath(), new FileOutputStream(exportFile), false, false);
      }
     
      // remove existed node
      subRoot1.remove();
      session1.save();
View Full Code Here

Examples of org.exoplatform.services.jcr.core.ExtendedSession.exportDocumentView()

      }
      else
      {
         if (isStream)
         {
            extendedSession.exportDocumentView(exportRootNode.getPath(), outStream, false, false);
         }
         else
         {
            SAXTransformerFactory saxFact = (SAXTransformerFactory)TransformerFactory.newInstance();
            TransformerHandler handler = saxFact.newTransformerHandler();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.