Examples of addPathParameter()


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

    updateSiteEndpoint.addFormat(Format.xml());
    updateSiteEndpoint.addStatus(ok("the site was updated"));
    updateSiteEndpoint.addStatus(badRequest("the site identifier was not specified"));
    updateSiteEndpoint.addStatus(badRequest("the site status is malformed"));
    updateSiteEndpoint.addStatus(notFound("the site to update was not found"));
    updateSiteEndpoint.addPathParameter(new Parameter("site", Parameter.Type.String, "The site identifier"));
    updateSiteEndpoint.addOptionalParameter(new Parameter("status", Parameter.Type.Text, "The site status", "on"));
    updateSiteEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, updateSiteEndpoint);

    // GET /{site}/modules
View Full Code Here

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

    Endpoint modulesEndpoint = new Endpoint("/{site}/modules", Method.GET, "getmodules");
    modulesEndpoint.setDescription("Returns the modules of the site with the given id");
    modulesEndpoint.addFormat(Format.xml());
    modulesEndpoint.addStatus(ok("the site was found and its modules are returned as part of the response"));
    modulesEndpoint.addStatus(notFound("the site was not found"));
    modulesEndpoint.addPathParameter(new Parameter("site", Parameter.Type.String, "The site identifier"));
    modulesEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, modulesEndpoint);
   
    // GET /{site}/modules/{module}
    Endpoint moduleEndpoint = new Endpoint("/{site}/modules/{module}", Method.GET, "getmodule");
View Full Code Here

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

    Endpoint moduleEndpoint = new Endpoint("/{site}/modules/{module}", Method.GET, "getmodule");
    moduleEndpoint.setDescription("Returns the module with the given id");
    moduleEndpoint.addFormat(Format.xml());
    moduleEndpoint.addStatus(ok("the module was found and is returned as part of the response"));
    moduleEndpoint.addStatus(notFound("either the site or the module was not found"));
    moduleEndpoint.addPathParameter(new Parameter("site", Parameter.Type.String, "The site identifier"));
    moduleEndpoint.addPathParameter(new Parameter("module", Parameter.Type.String, "The module identifier"));
    moduleEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, moduleEndpoint);

    return EndpointDocumentationGenerator.generate(docs);
View Full Code Here

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

    moduleEndpoint.setDescription("Returns the module with the given id");
    moduleEndpoint.addFormat(Format.xml());
    moduleEndpoint.addStatus(ok("the module was found and is returned as part of the response"));
    moduleEndpoint.addStatus(notFound("either the site or the module was not found"));
    moduleEndpoint.addPathParameter(new Parameter("site", Parameter.Type.String, "The site identifier"));
    moduleEndpoint.addPathParameter(new Parameter("module", Parameter.Type.String, "The module identifier"));
    moduleEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, moduleEndpoint);

    return EndpointDocumentationGenerator.generate(docs);
  }
View Full Code Here

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

    getFileByURIEndpoint.addFormat(Format.xml());
    getFileByURIEndpoint.addStatus(ok("the file was found and is returned as part of the response"));
    getFileByURIEndpoint.addStatus(notFound("the file was not found or could not be loaded"));
    getFileByURIEndpoint.addStatus(badRequest("an invalid file identifier was received"));
    getFileByURIEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    getFileByURIEndpoint.addPathParameter(new Parameter("resource", Parameter.Type.String, "The resource identifier"));
    getFileByURIEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getFileByURIEndpoint);

    // GET /{page}/referrer
    Endpoint getReferrerByURIEndpoint = new Endpoint("/{resource}/referrer", Method.GET, "getreferrer");
View Full Code Here

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

    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("resource", Parameter.Type.String, "The resource identifier"));
    getReferrerByURIEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getReferrerByURIEndpoint);

    // GET /{resource}/content/{language}
    Endpoint getFileContentEndpoint = new Endpoint("/{resource}/content/{language}", Method.GET, "getfilecontent");
View Full Code Here

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

    getFileContentEndpoint.addStatus(ok("the file content was found and is returned as part of the response"));
    getFileContentEndpoint.addStatus(notFound("the file was not found or could not be loaded"));
    getFileContentEndpoint.addStatus(notFound("the file content don't exist in the specified language"));
    getFileContentEndpoint.addStatus(badRequest("an invalid file identifier was received"));
    getFileContentEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    getFileContentEndpoint.addPathParameter(new Parameter("resource", Parameter.Type.String, "The file identifier"));
    getFileContentEndpoint.addPathParameter(new Parameter("language", Parameter.Type.String, "The language identifier"));
    getFileContentEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getFileContentEndpoint);

    // GET /pending
View Full Code Here

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

    getFileContentEndpoint.addStatus(notFound("the file was not found or could not be loaded"));
    getFileContentEndpoint.addStatus(notFound("the file content don't exist in the specified language"));
    getFileContentEndpoint.addStatus(badRequest("an invalid file identifier was received"));
    getFileContentEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    getFileContentEndpoint.addPathParameter(new Parameter("resource", Parameter.Type.String, "The file identifier"));
    getFileContentEndpoint.addPathParameter(new Parameter("language", Parameter.Type.String, "The language identifier"));
    getFileContentEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, getFileContentEndpoint);

    // GET /pending
    Endpoint getPending = new Endpoint("/pending", Method.GET, "getpending");
View Full Code Here

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

    updateFileEndpoint.addStatus(badRequest("the file content was not specified"));
    updateFileEndpoint.addStatus(badRequest("the file content is malformed"));
    updateFileEndpoint.addStatus(preconditionFailed("the file's etag does not match the value specified in the If-Match header"));
    updateFileEndpoint.addStatus(methodNotAllowed("the site or its content repository is read-only"));
    updateFileEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    updateFileEndpoint.addPathParameter(new Parameter("resource", Parameter.Type.String, "The file identifier"));
    updateFileEndpoint.addOptionalParameter(new Parameter("content", Parameter.Type.Text, "The resource data"));
    updateFileEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, updateFileEndpoint);

    // DELETE /{resource}
View Full Code Here

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

    deleteFileEndpoint.addStatus(badRequest("the file was not specified"));
    deleteFileEndpoint.addStatus(notFound("the file was not found"));
    deleteFileEndpoint.addStatus(preconditionFailed("the file is still being referenced"));
    deleteFileEndpoint.addStatus(methodNotAllowed("the site or its content repository is read-only"));
    deleteFileEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    deleteFileEndpoint.addPathParameter(new Parameter("resource", Parameter.Type.String, "The file identifier"));
    deleteFileEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, deleteFileEndpoint);

    // PUT /{resource}/content/{language}
    Endpoint addFileContentEndpoint = new Endpoint("/{resource}/content/{language}", Method.POST, "addfilecontent");
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.