Package ch.entwine.weblounge.common.impl.util.doc

Examples of ch.entwine.weblounge.common.impl.util.doc.Format


    docs.setTitle("Weblounge Workbench");

    // GET /edit/{page}/{composer}/{pageletindex}
    Endpoint getPageletEditor = new Endpoint("/edit/{page}/{composer}/{pageletindex}", Method.GET, "getpageleteditor");
    getPageletEditor.setDescription("Returns the editor for the given pagelet");
    getPageletEditor.addFormat(new Format("xml", null, null));
    getPageletEditor.addStatus(ok("the pagelet was found and it's editing information is returned"));
    getPageletEditor.addStatus(notFound("the page, the composer or the pagelet were not found"));
    getPageletEditor.addStatus(serviceUnavailable("the site is temporarily offline"));
    getPageletEditor.addPathParameter(new Parameter("page", Parameter.Type.String, "The page uri"));
    getPageletEditor.addPathParameter(new Parameter("composer", Parameter.Type.String, "The composer identifier"));
    getPageletEditor.addPathParameter(new Parameter("pageletindex", Parameter.Type.String, "The pagelet's index within the composer (0 based)"));
    getPageletEditor.addOptionalParameter(new Parameter("language", Parameter.Type.String, "The language id"));
    getPageletEditor.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getPageletEditor);
   
    Endpoint getRenderer = new Endpoint("/renderer/{page}/{composer}/{pageletindex}", Method.GET, "getrenderer");
    getRenderer.setDescription("Returns the renderer for the given pagelet");
    getRenderer.addFormat(new Format("html", null, null));
    getRenderer.addStatus(ok("the pagelet was found and it's renderer is returned"));
    getRenderer.addStatus(notFound("the page, the composer, the pagelet or the renderer were not found"));
    getRenderer.addStatus(serviceUnavailable("the site is temporarily offline"));
    getRenderer.addPathParameter(new Parameter("page", Parameter.Type.String, "The page uri"));
    getRenderer.addPathParameter(new Parameter("composer", Parameter.Type.String, "The composer identifier"));
    getRenderer.addPathParameter(new Parameter("pageletindex", Parameter.Type.String, "The pagelet's index within the composer (0 based)"));
    getRenderer.addOptionalParameter(new Parameter("language", Parameter.Type.String, "The language id"));
    getRenderer.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getRenderer);

    // GET /suggest/subjects/{hint}
    Endpoint suggestSubjects = new Endpoint("/suggest/subjects/{seed}", Method.GET, "suggestsubjects");
    suggestSubjects.setDescription("Returns suggestions for subjects based on the given seed");
    suggestSubjects.addFormat(new Format("xml", null, null));
    suggestSubjects.addStatus(ok("suggestions based on the seed are returned"));
    suggestSubjects.addStatus(serviceUnavailable("the site is temporarily offline"));
    suggestSubjects.addPathParameter(new Parameter("seed", Parameter.Type.String, "The seed on which suggestions are based"));
    suggestSubjects.addOptionalParameter(new Parameter("limit", Parameter.Type.String, "The maximum number of suggestions"));
    suggestSubjects.addOptionalParameter(new Parameter("highlight", Parameter.Type.String, "The tag name used to highlight matches"));
View Full Code Here


    docs.setTitle("Weblounge Formatting Object Processor Endpoint");

    // POST /pdf
    Endpoint createPDFEndpoint = new Endpoint("/pdf", Method.POST, "createpdf");
    createPDFEndpoint.setDescription("Creates a PDF document");
    createPDFEndpoint.addFormat(new Format("pdf", "Portable Document Format", "http://en.wikipedia.org/wiki/Portable_Document_Format"));
    createPDFEndpoint.addStatus(ok("the document was created"));
    createPDFEndpoint.addStatus(badRequest("the xml document url is not a regular url"));
    createPDFEndpoint.addStatus(badRequest("the xsl document url is not a regular url"));
    createPDFEndpoint.addStatus(notFound("the xml document could not be accessed at the given address"));
    createPDFEndpoint.addStatus(notFound("the xsl document could not be accessed at the given address"));
View Full Code Here

    String[] versions = { "0", "1" };

    // GET /{resource}/locales/{language}/styles/{styleid}
    Endpoint getScaleLocalizedImage = new Endpoint("/{resource}/locales/{language}/styles/{style}", Method.GET, "localizedstyledimage");
    getScaleLocalizedImage.setDescription("Returns a scaled version of the resource with the given identifier and language");
    getScaleLocalizedImage.addFormat(new Format("xml", null, null));
    getScaleLocalizedImage.addStatus(ok("the resource was scaled using the specified image style and is returned as part of the response"));
    getScaleLocalizedImage.addStatus(notFound("the resource was not found or could not be loaded"));
    getScaleLocalizedImage.addStatus(notFound("the resource does not exist in the specified language"));
    getScaleLocalizedImage.addStatus(badRequest("an invalid image or image style identifier was received"));
    getScaleLocalizedImage.addStatus(badRequest("an invalid language identifier was specified"));
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.impl.util.doc.Format

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.