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

Examples of ch.entwine.weblounge.common.impl.util.doc.Endpoint.addFormat()


    docs.setTitle("Weblounge Index");

    // GET /
    Endpoint getStatistics = new Endpoint("/statistics", Method.GET, "getstatistics");
    getStatistics.setDescription("Returns index statistics");
    getStatistics.addFormat(Format.xml());
    getStatistics.addStatus(ok("the index statistics are returned as part of the response"));
    getStatistics.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    getStatistics.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getStatistics);
View Full Code Here


    docs.addEndpoint(Endpoint.Type.READ, getStatistics);

    // DELETE /{page}/unlock
    Endpoint reindex = new Endpoint("/", Method.DELETE, "reindex");
    reindex.setDescription("Triggers an index operation and returns immediately");
    reindex.addFormat(Format.xml());
    reindex.addStatus(ok("the index operation was started"));
    reindex.addStatus(preconditionFailed("the content repository is read only"));
    reindex.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    reindex.addStatus(conflict("the index is already being rebuilt"));
    reindex.addStatus(forbidden("the current user does not have the rights to rebuild the index"));
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

    docs.addEndpoint(Endpoint.Type.WRITE, removeByStyle);

    // GET /styles
    Endpoint getImageStyles = new Endpoint("/styles", Method.GET, "getstyles");
    getImageStyles.setDescription("Returns the image style");
    getImageStyles.addFormat(Format.xml());
    getImageStyles.addStatus(ok("the image styles are returned as part of the response"));
    getImageStyles.addStatus(serviceUnavailable("the site is temporarily offline"));
    getImageStyles.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getImageStyles);
View Full Code Here

    docs.addEndpoint(Endpoint.Type.READ, getImageStyles);

    // GET /styles/{styleid}
    Endpoint getImageStyle = new Endpoint("/styles/{style}", Method.GET, "getstyle");
    getImageStyle.setDescription("Returns the image style");
    getImageStyle.addFormat(Format.xml());
    getImageStyle.addStatus(ok("the image style was found and is returned as part of the response"));
    getImageStyle.addStatus(notFound("the image style was not found"));
    getImageStyle.addStatus(badRequest("an invalid image style identifier was received"));
    getImageStyle.addStatus(serviceUnavailable("the site is temporarily offline"));
    getImageStyle.addPathParameter(new Parameter("style", Parameter.Type.String, "The image style identifier"));
View Full Code Here

    docs.addEndpoint(Endpoint.Type.READ, getImageStyle);

    // POST /
    Endpoint createPreviews = new Endpoint("/", Method.POST, "createpreviews");
    createPreviews.setDescription("Creates the missing preview images");
    createPreviews.addFormat(Format.xml());
    createPreviews.addStatus(ok("the creation of preview images has been started"));
    createPreviews.addStatus(serviceUnavailable("the site is temporarily offline"));
    createPreviews.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, createPreviews);
View Full Code Here

    docs.addEndpoint(Endpoint.Type.WRITE, deletePageEndpoint);

    // GET /{page}/composers/{composerId}
    Endpoint composerEndpoint = new Endpoint("/{page}/composers/{composer}", Method.GET, "getcomposer");
    composerEndpoint.setDescription("Returns the composer with the given id from the indicated page");
    composerEndpoint.addFormat(Format.xml());
    composerEndpoint.addStatus(ok("the composer was found and is returned as part of the response"));
    composerEndpoint.addStatus(notFound("the composer was not found or could not be loaded"));
    composerEndpoint.addStatus(badRequest("an invalid page or composer identifier was received"));
    composerEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    composerEndpoint.addPathParameter(new Parameter("page", Parameter.Type.String, "The page identifier"));
View Full Code Here

    docs.addEndpoint(Endpoint.Type.READ, composerEndpoint);

    // GET /{page}/composers/{composerId}/pagelets/{pageletIndex}
    Endpoint pageletEndpoint = new Endpoint("/{page}/composers/{composer}/pagelets/{pageletindex}", Method.GET, "getpagelet");
    pageletEndpoint.setDescription("Returns the pagelet at the given index from the indicated composer on the page");
    pageletEndpoint.addFormat(Format.xml());
    pageletEndpoint.addStatus(ok("the pagelet was found and is returned as part of the response"));
    pageletEndpoint.addStatus(notFound("the pagelet was not found or could not be loaded"));
    pageletEndpoint.addStatus(badRequest("an invalid page, composer identifier or pagelet index was received"));
    pageletEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    pageletEndpoint.addPathParameter(new Parameter("page", Parameter.Type.String, "The page identifier"));
View Full Code Here

    docs.addEndpoint(Endpoint.Type.READ, pageletEndpoint);

    // GET /{page}/children
    Endpoint getChildPagesByURIEndpoint = new Endpoint("/{page}/children", Method.GET, "getpagechildren");
    getChildPagesByURIEndpoint.setDescription("Returns children of the page with the given id");
    getChildPagesByURIEndpoint.addFormat(Format.xml());
    getChildPagesByURIEndpoint.addStatus(ok("the page was found and its children are returned as part of the response"));
    getChildPagesByURIEndpoint.addStatus(notFound("the page was not found or could not be loaded"));
    getChildPagesByURIEndpoint.addStatus(badRequest("an invalid page identifier was received"));
    getChildPagesByURIEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    getChildPagesByURIEndpoint.addPathParameter(new Parameter("page", Parameter.Type.String, "The page identifier"));
View Full Code Here

    docs.addEndpoint(Endpoint.Type.READ, getChildPagesByURIEndpoint);

    // GET /{page}/referrer
    Endpoint getReferrerByURIEndpoint = new Endpoint("/{page}/referrer", Method.GET, "getreferrer");
    getReferrerByURIEndpoint.setDescription("Returns pages containing references to the page with the given id");
    getReferrerByURIEndpoint.addFormat(Format.xml());
    getReferrerByURIEndpoint.addStatus(ok("the referring pages were found and are returned as part of the response"));
    getReferrerByURIEndpoint.addStatus(badRequest("an invalid page identifier was received"));
    getReferrerByURIEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    getReferrerByURIEndpoint.addPathParameter(new Parameter("page", Parameter.Type.String, "The page identifier"));
    getReferrerByURIEndpoint.setTestForm(new TestForm());
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.