Package org.exoplatform.services.rest.ext.provider

Examples of org.exoplatform.services.rest.ext.provider.XSLTStreamingOutput


         {
            // Collection processing;
            resource = new CollectionResource(uri, node, nsContext);
            istream = ((CollectionResource)resource).getContentAsStream(baseURI);

            XSLTStreamingOutput entity =
               new XSLTStreamingOutput("get.method.template", new StreamSource(istream), xsltParams);
            return Response.ok(entity, MediaType.TEXT_HTML).build();

         }

      }
View Full Code Here


         {
            // Collection processing;
            resource = new CollectionResource(uri, node, nsContext);
            istream = ((CollectionResource)resource).getContentAsStream(baseURI);

            XSLTStreamingOutput entity =
               new XSLTStreamingOutput("get.method.template", new StreamSource(istream), xsltParams);

            return Response.ok(entity, MediaType.TEXT_HTML).build();

         }
View Full Code Here

         {
            // Collection processing;
            resource = new CollectionResource(uri, node, nsContext);
            istream = ((CollectionResource)resource).getContentAsStream(baseURI);

            XSLTStreamingOutput entity = new XSLTStreamingOutput("get.method.template", new StreamSource(istream));

            return Response.ok(entity, MediaType.TEXT_HTML).build();

         }
View Full Code Here

      TestUtils.addFolder(session, folderName, defaultFolderNodeType, "");
      ContainerResponse response = service(WebDAVMethods.GET, getPathWS() + folderName, "", null, null);

      assertEquals(HTTPStatus.OK, response.getStatus());

      XSLTStreamingOutput XSLTout = (XSLTStreamingOutput)response.getEntity();
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      XSLTout.write(byteOut);

      System.out.println("\n" + byteOut.toString() + "\n");

      assertTrue(byteOut.toString().contains(strToTest));
View Full Code Here

      // get a sub-collection
      ContainerResponse response = service(WebDAVMethods.GET, getPathWS() + folderTwo, "", null, null);
      assertEquals(HTTPStatus.OK, response.getStatus());

      // serialize response entity to string
      XSLTStreamingOutput XSLTout = (XSLTStreamingOutput)response.getEntity();
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      XSLTout.write(byteOut);

      assertTrue("Response should contain parent collection href", byteOut.toString().contains(folderOne));
   }
View Full Code Here

      //get a sub-collection
      response = service(WebDAVMethods.GET, getPathWS() + folderTwo, "", null, null);
      assertEquals(HTTPStatus.OK, response.getStatus());

      // serialize response entity to string
      XSLTStreamingOutput XSLTout = (XSLTStreamingOutput)response.getEntity();
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      XSLTout.write(byteOut);

      assertTrue("Response should contain parent collection href", byteOut.toString().contains(folderOne));
   }
View Full Code Here

      String path = getPathWS() + "/folderA/folderB";

      ContainerResponse response = service(WebDAVMethods.GET, path, "", null, null);
      assertEquals("Successful result expected (200), but actual is: " + response.getStatus(), 200, response.getStatus());
     
      XSLTStreamingOutput XSLTout = (XSLTStreamingOutput)response.getEntity();
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      XSLTout.write(byteOut);

      assertTrue("Response should contain parent collection href", byteOut.toString().contains("folderA"));

   }
View Full Code Here

         {
            // Collection processing;
            resource = new CollectionResource(uri, node, nsContext);
            istream = ((CollectionResource)resource).getContentAsStream(baseURI);

            XSLTStreamingOutput entity = new XSLTStreamingOutput("get.method.template", new StreamSource(istream));

            return Response.ok(entity, MediaType.TEXT_HTML).build();

         }
View Full Code Here

         {
            // Collection processing;
            resource = new CollectionResource(uri, node, nsContext);
            istream = ((CollectionResource)resource).getContentAsStream(baseURI);

            XSLTStreamingOutput entity = new XSLTStreamingOutput("get.method.template", new StreamSource(istream));

            return Response.ok(entity, MediaType.TEXT_HTML).build();

         }
View Full Code Here

         {
            // Collection processing;
            resource = new CollectionResource(uri, node, nsContext);
            istream = ((CollectionResource)resource).getContentAsStream(baseURI);

            XSLTStreamingOutput entity = new XSLTStreamingOutput("get.method.template", new StreamSource(istream));

            return Response.ok(entity, MediaType.TEXT_HTML).build();

         }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.rest.ext.provider.XSLTStreamingOutput

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.