Package ch.entwine.weblounge.common.content.page

Examples of ch.entwine.weblounge.common.content.page.Page.toXml()


    if (!ResourceUtils.hasChanged(request, page)) {
      return Response.notModified().build();
    }

    // Create the response
    ResponseBuilder response = Response.ok(page.toXml());
    response.tag(ResourceUtils.getETagValue(page));
    response.lastModified(ResourceUtils.getModificationDate(page));
    return response.build();
  }
View Full Code Here


      workPage = (Page) contentRepository.get(workURI);
      if (workPage == null) {
        logger.debug("Creating work version of {}", liveURI);
        PageReader reader = new PageReader();
        Page livePage = (Page) contentRepository.get(liveURI);
        workPage = reader.read(IOUtils.toInputStream(livePage.toXml(), "utf-8"), site);
        workPage.setVersion(Resource.WORK);
        contentRepository.putAsynchronously(workPage, false);
      } else {
        workURI.setPath(workPage.getURI().getPath());
      }
View Full Code Here

      buf.append("limit=\"").append(result.getLimit()).append("\" ");
    buf.append("page=\"").append(result.getPage()).append("\" ");
    buf.append("pagesize=\"").append(result.getPageSize()).append("\"");
    buf.append(">");
    if (pageByPath != null) {
      String xml = pageByPath.toXml();
      if (!details) {
        xml = xml.replaceAll("<body>.*</body>", "");
        xml = xml.replaceAll("<body/>", "");
      }
      buf.append(xml);
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.