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

Examples of ch.entwine.weblounge.common.impl.util.doc.EndpointDocumentation.addEndpoint()


    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);

    // DELETE /{page}/unlock
    Endpoint reindex = new Endpoint("/", Method.DELETE, "reindex");
    reindex.setDescription("Triggers an index operation and returns immediately");
    reindex.addFormat(Format.xml());
View Full Code Here


    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"));
    reindex.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, reindex);

    return EndpointDocumentationGenerator.generate(docs);
  }

}
View Full Code Here

    getScaleLocalizedImage.addPathParameter(new Parameter("language", Parameter.Type.String, "The language identifier"));
    getScaleLocalizedImage.addPathParameter(new Parameter("style", Parameter.Type.String, "The image style identifier"));
    getScaleLocalizedImage.addOptionalParameter(new Parameter("version", Parameter.Type.String, "The version", "0", versions));
    getScaleLocalizedImage.addOptionalParameter(new Parameter("force", Parameter.Type.Boolean, "Force the creation if not available"));
    getScaleLocalizedImage.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getScaleLocalizedImage);

    // DELETE /
    Endpoint removeAll = new Endpoint("/", Method.DELETE, "deleteAll");
    removeAll.setDescription("Deletes all previews of this site");
    removeAll.addStatus(ok("the preview images were removed"));
View Full Code Here

    Endpoint removeAll = new Endpoint("/", Method.DELETE, "deleteAll");
    removeAll.setDescription("Deletes all previews of this site");
    removeAll.addStatus(ok("the preview images were removed"));
    removeAll.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    removeAll.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, removeAll);

    // DELETE /{resource}}
    Endpoint removeByResource = new Endpoint("/{resource}", Method.DELETE, "delete");
    removeByResource.setDescription("Deletes all previews of the resource with the given identifier");
    removeByResource.addStatus(ok("the preview images were removed"));
View Full Code Here

    removeByResource.addStatus(ok("the preview images were removed"));
    removeByResource.addStatus(notFound("the resource was not found or could not be loaded"));
    removeByResource.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    removeByResource.addPathParameter(new Parameter("resource", Parameter.Type.String, "The resource identifier"));
    removeByResource.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, removeByResource);

    // DELETE /styles/{styleid}
    Endpoint removeByStyle = new Endpoint("/styles/{style}", Method.DELETE, "deletebystyle");
    removeByStyle.setDescription("Deletes the previews for the given style");
    removeByStyle.addStatus(ok("the preview images were removed"));
View Full Code Here

    removeByStyle.addStatus(notFound("the resource does not exist in the specified language"));
    removeByStyle.addStatus(badRequest("an invalid image or image style identifier was received"));
    removeByStyle.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    removeByStyle.addPathParameter(new Parameter("style", Parameter.Type.String, "The image style identifier"));
    removeByStyle.setTestForm(new TestForm());
    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());
View Full Code Here

    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);

    // GET /styles/{styleid}
    Endpoint getImageStyle = new Endpoint("/styles/{style}", Method.GET, "getstyle");
    getImageStyle.setDescription("Returns the image style");
    getImageStyle.addFormat(Format.xml());
View Full Code Here

    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"));
    getImageStyle.setTestForm(new TestForm());
    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());
View Full Code Here

    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);

    return EndpointDocumentationGenerator.generate(docs);
  }

}
View Full Code Here

    getAllPagesEndpoint.addOptionalParameter(new Parameter("preferredversion", Parameter.Type.String, "The preferred version", "1", versions));
    getAllPagesEndpoint.addOptionalParameter(new Parameter("limit", Parameter.Type.String, "Number of result items to include", "10"));
    getAllPagesEndpoint.addOptionalParameter(new Parameter("offset", Parameter.Type.String, "Offset within the result set", "0"));
    getAllPagesEndpoint.addOptionalParameter(new Parameter("details", Parameter.Type.Boolean, "Whether to include the all page data", "true"));
    getAllPagesEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getAllPagesEndpoint);

    // GET /{page}
    Endpoint getPageByIdEndpoint = new Endpoint("/{page}", Method.GET, "getpagebyid");
    getPageByIdEndpoint.setDescription("Returns the page with the given id");
    getPageByIdEndpoint.addFormat(Format.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.