Examples of exportDocumentView()


Examples of javax.jcr.Session.exportDocumentView()

      Session session;
      InputStream srcIs = genXmlSource();     
      if (srcIs != null)
        XMLUtils.toSax(srcIs, this.getXMLConsumer());
      else if ((session = request.getResource().adaptTo(Session.class)) != null) {
        session.exportDocumentView(request.getResource().getPath(), this.getXMLConsumer(), true, true);
      } else
        throw new IllegalArgumentException("cannot generate xml source for " + request.getResource().getPath());
     
    } catch (Throwable t) {
      log.error("SlingGenerator: cannot generate xml source for "
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportDocumentView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportDocumentView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportDocumentView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
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()

         bos = new ByteArrayOutputStream();
         if (viewType != null && (viewType.equalsIgnoreCase("system") || viewType.equalsIgnoreCase("sys")))
            session.exportSystemView(path(repoPath), bos, false, false);
         else
            session.exportDocumentView(path(repoPath), bos, false, false);

      }
      catch (LoginException e)
      {
         return Response.status(HTTPStatus.FORBIDDEN).entity(e.getMessage()).build();
View Full Code Here

Examples of javax.jcr.Session.exportDocumentView()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportDocumentView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
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()

        tmpFile.deleteOnExit();

        // export system view of /a1/b1
        OutputStream out = new FileOutputStream(tmpFile);
        try {
            session.exportDocumentView(b1.getPath(), out, false, false);
        } finally {
            out.close();
        }

        // and import again underneath /a3
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.