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

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


    Endpoint removeRole = new Endpoint("/account/{login}/roles/{context}", Method.DELETE, "removerole");
    removeRole.setDescription("Removes a role from the account");
    removeRole.addFormat(Format.xml());
    removeRole.addStatus(ok("the role has been removed"));
    removeRole.addStatus(notModified("the role had not been owned by the account"));
    removeRole.addStatus(badRequest("the role parameter is blank"));
    removeRole.addStatus(forbidden("insufficient rights to remove the role"));
    removeRole.addStatus(notFound("the account does not exist"));
    removeRole.addStatus(notFound("the site does not exist"));
    removeRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    removeRole.setTestForm(new TestForm());
View Full Code Here


    removeRole.setDescription("Removes a role from the account");
    removeRole.addFormat(Format.xml());
    removeRole.addStatus(ok("the role has been removed"));
    removeRole.addStatus(notModified("the role had not been owned by the account"));
    removeRole.addStatus(badRequest("the role parameter is blank"));
    removeRole.addStatus(forbidden("insufficient rights to remove the role"));
    removeRole.addStatus(notFound("the account does not exist"));
    removeRole.addStatus(notFound("the site does not exist"));
    removeRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    removeRole.setTestForm(new TestForm());
    removeRole.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
View Full Code Here

    removeRole.addFormat(Format.xml());
    removeRole.addStatus(ok("the role has been removed"));
    removeRole.addStatus(notModified("the role had not been owned by the account"));
    removeRole.addStatus(badRequest("the role parameter is blank"));
    removeRole.addStatus(forbidden("insufficient rights to remove the role"));
    removeRole.addStatus(notFound("the account does not exist"));
    removeRole.addStatus(notFound("the site does not exist"));
    removeRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    removeRole.setTestForm(new TestForm());
    removeRole.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    removeRole.addPathParameter(new Parameter("context", Parameter.Type.String, "Role context"));
View Full Code Here

    removeRole.addStatus(ok("the role has been removed"));
    removeRole.addStatus(notModified("the role had not been owned by the account"));
    removeRole.addStatus(badRequest("the role parameter is blank"));
    removeRole.addStatus(forbidden("insufficient rights to remove the role"));
    removeRole.addStatus(notFound("the account does not exist"));
    removeRole.addStatus(notFound("the site does not exist"));
    removeRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    removeRole.setTestForm(new TestForm());
    removeRole.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    removeRole.addPathParameter(new Parameter("context", Parameter.Type.String, "Role context"));
    removeRole.addRequiredParameter(new Parameter("role", Parameter.Type.String, "Role name"));
View Full Code Here

    removeRole.addStatus(notModified("the role had not been owned by the account"));
    removeRole.addStatus(badRequest("the role parameter is blank"));
    removeRole.addStatus(forbidden("insufficient rights to remove the role"));
    removeRole.addStatus(notFound("the account does not exist"));
    removeRole.addStatus(notFound("the site does not exist"));
    removeRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    removeRole.setTestForm(new TestForm());
    removeRole.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    removeRole.addPathParameter(new Parameter("context", Parameter.Type.String, "Role context"));
    removeRole.addRequiredParameter(new Parameter("role", Parameter.Type.String, "Role name"));
    docs.addEndpoint(Endpoint.Type.WRITE, removeRole);
View Full Code Here

    // GET /
    Endpoint sitesEndpoint = new Endpoint("/", Method.GET, "getinfo");
    sitesEndpoint.setDescription("Returns all runtime information");
    sitesEndpoint.addFormat(Format.xml());
    sitesEndpoint.addStatus(ok("the runtime information is returned as part of the response"));
    sitesEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, sitesEndpoint);

    // GET /{component}
    Endpoint siteEndpoint = new Endpoint("/{component}", Method.GET, "getcomponent");
View Full Code Here

    // GET /{component}
    Endpoint siteEndpoint = new Endpoint("/{component}", Method.GET, "getcomponent");
    siteEndpoint.setDescription("Returns the specified part of the runtime information");
    siteEndpoint.addFormat(Format.xml());
    siteEndpoint.addStatus(ok("the component was found and the corresponding runtime information is returned as part of the response"));
    siteEndpoint.addStatus(notFound("the component was not found"));
    siteEndpoint.addPathParameter(new Parameter("component", Parameter.Type.String, "The runtime information component"));
    siteEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, siteEndpoint);
View Full Code Here

    // GET /{component}
    Endpoint siteEndpoint = new Endpoint("/{component}", Method.GET, "getcomponent");
    siteEndpoint.setDescription("Returns the specified part of the runtime information");
    siteEndpoint.addFormat(Format.xml());
    siteEndpoint.addStatus(ok("the component was found and the corresponding runtime information is returned as part of the response"));
    siteEndpoint.addStatus(notFound("the component was not found"));
    siteEndpoint.addPathParameter(new Parameter("component", Parameter.Type.String, "The runtime information component"));
    siteEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, siteEndpoint);

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

    // GET /
    Endpoint sitesEndpoint = new Endpoint("/", Method.GET, "getsites");
    sitesEndpoint.setDescription("Returns all sites");
    sitesEndpoint.addFormat(Format.xml());
    sitesEndpoint.addStatus(ok("the sites are returned as part of the response"));
    sitesEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, sitesEndpoint);

    // GET /{site}
    Endpoint siteEndpoint = new Endpoint("/{site}", Method.GET, "getsite");
View Full Code Here

    // GET /{site}
    Endpoint siteEndpoint = new Endpoint("/{site}", Method.GET, "getsite");
    siteEndpoint.setDescription("Returns the site with the given id");
    siteEndpoint.addFormat(Format.xml());
    siteEndpoint.addStatus(ok("the site was found and is returned as part of the response"));
    siteEndpoint.addStatus(notFound("the site was not found"));
    siteEndpoint.addPathParameter(new Parameter("site", Parameter.Type.String, "The site identifier"));
    siteEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, siteEndpoint);
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.