Examples of toXML()


Examples of ch.entwine.weblounge.common.content.SearchResult.toXml()

    }

    // Return the result
    try {
      SearchResult result = repository.find(query);
      return Response.ok(result.toXml()).build();
    } catch (ContentRepositoryException e) {
      logger.error("Error trying to access the content repository", e);
      throw new WebApplicationException(e);
    }
View Full Code Here

Examples of ch.entwine.weblounge.common.content.image.ImageStyle.toXml()

    // Search styles of current site
    for (Module m : site.getModules()) {
      ImageStyle style = m.getImageStyle(styleId);
      if (style != null) {
        ResponseBuilder response = Response.ok(style.toXml());
        return response.build();
      }
    }

    // Search global styles
View Full Code Here

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

    if (composer == null) {
      return Response.status(Status.NOT_FOUND).build();
    }

    // Return the composer
    return Response.ok(composer.toXml()).lastModified(ResourceUtils.getModificationDate(page)).build();
  }

  /**
   * Returns the pagelet specified by <code>pageId</code>,
   * <code>composerId</code> and <code>pageletIndex</code> or a <code>404</code>
View Full Code Here

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

Examples of ch.entwine.weblounge.common.impl.security.WebloungeUserImpl.toXml()

      wu.setResponse(account.getResponse().getBytes(Charset.forName("utf-8")), DigestType.md5);
    for (JpaRole r : account.getRoles()) {
      wu.addPublicCredentials(new RoleImpl(r.getContext(), r.getRolename()));
    }

    return Response.ok(wu.toXml()).build();
  }

  @GET
  @Path("/account/{login}/activate")
  public Response activateAccount(@PathParam("login") String login,
View Full Code Here

Examples of ch.entwine.weblounge.common.security.User.toXml()

      b.append("<modified>");
      User u = modificationCtx.getModifier(l);
      if (u == null)
        u = uri.getSite().getAdministrator();
      b.append(u.toXml());
      b.append("<date>");
      Date d = modificationCtx.getModificationDate(l);
      if (d == null)
        d = new Date();
      b.append(WebloungeDateFormat.formatStatic(d));
View Full Code Here

Examples of ch.entwine.weblounge.common.security.WebloungeUser.toXml()

      wu.setResponse(account.getResponse().getBytes(Charset.forName("utf-8")), DigestType.md5);
    for (JpaRole r : account.getRoles()) {
      wu.addPublicCredentials(new RoleImpl(r.getContext(), r.getRolename()));
    }

    return Response.ok(wu.toXml()).build();
  }

  @GET
  @Path("/account/{login}/activate")
  public Response activateAccount(@PathParam("login") String login,
View Full Code Here

Examples of ch.entwine.weblounge.common.site.Module.toXml()

    Module m = site.getModule(moduleId);
    if (m == null)
      throw new WebApplicationException(Status.NOT_FOUND);

    // Create the response
    String moduleXml = m.toXml();
    moduleXml = moduleXml.replaceAll("( xmlns.*?>)", ">");
    moduleXml = ConfigurationUtils.processTemplate(moduleXml, m, environment);
    ResponseBuilder response = Response.ok(moduleXml);
    return response.build();
  }
View Full Code Here

Examples of ch.entwine.weblounge.common.site.Site.toXml()

    if (site == null) {
      throw new WebApplicationException(Status.NOT_FOUND);
    }

    // Create the response
    String siteXml = site.toXml();
    siteXml = siteXml.replaceAll("<password.*</password>", "");
    siteXml = siteXml.replaceAll("( xmlns.*?>)", ">");
    siteXml = ConfigurationUtils.processTemplate(siteXml, site, environment);
    ResponseBuilder response = Response.ok(siteXml);
    return response.build();
View Full Code Here

Examples of ch.entwine.weblounge.workbench.PageletEditor.toXml()

    } catch (IOException e) {
      throw new WebApplicationException(e);
    }
    if (editor == null)
      throw new WebApplicationException(Status.NOT_FOUND);
    return Response.ok(editor.toXml()).build();
  }

  @POST
  @Produces(MediaType.TEXT_HTML)
  @Path("/renderer/{page}/{composer}/{pageletindex}")
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.