Examples of addRequiredParameter()


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

    createAccount.addStatus(conflict("an account with that login already exists"));
    createAccount.addStatus(badRequest("the login is malformed or empty"));
    createAccount.addStatus(notFound("the site does not exist"));
    createAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    createAccount.setTestForm(new TestForm());
    createAccount.addRequiredParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    createAccount.addRequiredParameter(new Parameter("password", Parameter.Type.Password, "Password"));
    createAccount.addOptionalParameter(new Parameter("email", Parameter.Type.String, "E-mail address"));
    docs.addEndpoint(Endpoint.Type.WRITE, createAccount);

    // GET /account/{login}
View Full Code Here

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

    createAccount.addStatus(badRequest("the login is malformed or empty"));
    createAccount.addStatus(notFound("the site does not exist"));
    createAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    createAccount.setTestForm(new TestForm());
    createAccount.addRequiredParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    createAccount.addRequiredParameter(new Parameter("password", Parameter.Type.Password, "Password"));
    createAccount.addOptionalParameter(new Parameter("email", Parameter.Type.String, "E-mail address"));
    docs.addEndpoint(Endpoint.Type.WRITE, createAccount);

    // GET /account/{login}
    Endpoint getAccount = new Endpoint("/account/{login}", Method.GET, "getaccount");
View Full Code Here

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

    addRole.addStatus(notFound("the site does not exist"));
    addRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    addRole.setTestForm(new TestForm());
    addRole.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    addRole.addPathParameter(new Parameter("context", Parameter.Type.String, "Role context"));
    addRole.addRequiredParameter(new Parameter("role", Parameter.Type.String, "Role name"));
    docs.addEndpoint(Endpoint.Type.WRITE, addRole);

    // DELETE /account/{login}/roles/{context}
    Endpoint removeRole = new Endpoint("/account/{login}/roles/{context}", Method.DELETE, "removerole");
    removeRole.setDescription("Removes a role from the account");
View Full Code Here

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

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

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

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

    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"));
    createPDFEndpoint.addRequiredParameter(new Parameter("xml", Parameter.Type.String, "URL to the xml document"));
    createPDFEndpoint.addRequiredParameter(new Parameter("xsl", Parameter.Type.String, "URL to the xsl document"));
    createPDFEndpoint.addOptionalParameter(new Parameter("parameters", Parameter.Type.String, "Parameters, formatted as 'a=b;c=d'"));
    createPDFEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, createPDFEndpoint);
View Full Code Here

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

    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"));
    createPDFEndpoint.addRequiredParameter(new Parameter("xml", Parameter.Type.String, "URL to the xml document"));
    createPDFEndpoint.addRequiredParameter(new Parameter("xsl", Parameter.Type.String, "URL to the xsl document"));
    createPDFEndpoint.addOptionalParameter(new Parameter("parameters", Parameter.Type.String, "Parameters, formatted as 'a=b;c=d'"));
    createPDFEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, createPDFEndpoint);

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

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

    updatePageEndpoint.addStatus(notFound("the site or the page to update were not found"));
    updatePageEndpoint.addStatus(preconditionFailed("the page's etag does not match the value specified in the If-Match header"));
    updatePageEndpoint.addStatus(methodNotAllowed("the site or its content repository is read-only"));
    updatePageEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    updatePageEndpoint.addPathParameter(new Parameter("page", Parameter.Type.String, "The page identifier"));
    updatePageEndpoint.addRequiredParameter(new Parameter("content", Parameter.Type.Text, "The page content"));
    updatePageEndpoint.addOptionalParameter(new Parameter("asynchronous", Parameter.Type.Boolean, "Whether the call is non-blocking", "false"));
    updatePageEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, updatePageEndpoint);

    // DELETE /{page}
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.