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

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


    disableSiteLogins.setDescription("Disables login to the site");
    disableSiteLogins.addFormat(Format.xml());
    disableSiteLogins.addStatus(ok("site logins have been disabled"));
    disableSiteLogins.addStatus(notModified("site logins were already disabled"));
    disableSiteLogins.addStatus(notFound("the site does not exist"));
    disableSiteLogins.addStatus(serviceUnavailable("the site is temporarily offline"));
    disableSiteLogins.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, disableSiteLogins);

    // POST /account
    Endpoint createAccount = new Endpoint("/account", Method.POST, "createaccount");
View Full Code Here


    // POST /account
    Endpoint createAccount = new Endpoint("/account", Method.POST, "createaccount");
    createAccount.setDescription("Creates a new account in this site");
    createAccount.addFormat(Format.xml());
    createAccount.addStatus(created("the account has been created and the account's location is part of the response"));
    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());
View Full Code Here

    // POST /account
    Endpoint createAccount = new Endpoint("/account", Method.POST, "createaccount");
    createAccount.setDescription("Creates a new account in this site");
    createAccount.addFormat(Format.xml());
    createAccount.addStatus(created("the account has been created and the account's location is part of the response"));
    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"));
View Full Code Here

    Endpoint createAccount = new Endpoint("/account", Method.POST, "createaccount");
    createAccount.setDescription("Creates a new account in this site");
    createAccount.addFormat(Format.xml());
    createAccount.addStatus(created("the account has been created and the account's location is part of the response"));
    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"));
View Full Code Here

    createAccount.setDescription("Creates a new account in this site");
    createAccount.addFormat(Format.xml());
    createAccount.addStatus(created("the account has been created and the account's location is part of the response"));
    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"));
View Full Code Here

    createAccount.addFormat(Format.xml());
    createAccount.addStatus(created("the account has been created and the account's location is part of the response"));
    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);
View Full Code Here

    // GET /account/{login}
    Endpoint getAccount = new Endpoint("/account/{login}", Method.GET, "getaccount");
    getAccount.setDescription("Returns the account");
    getAccount.addFormat(Format.xml());
    getAccount.addStatus(ok("the account information has been sent back to the client"));
    getAccount.addStatus(forbidden("insufficient rights to access the account"));
    getAccount.addStatus(notFound("the account does not exist"));
    getAccount.addStatus(notFound("the site does not exist"));
    getAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    getAccount.setTestForm(new TestForm());
View Full Code Here

    // GET /account/{login}
    Endpoint getAccount = new Endpoint("/account/{login}", Method.GET, "getaccount");
    getAccount.setDescription("Returns the account");
    getAccount.addFormat(Format.xml());
    getAccount.addStatus(ok("the account information has been sent back to the client"));
    getAccount.addStatus(forbidden("insufficient rights to access the account"));
    getAccount.addStatus(notFound("the account does not exist"));
    getAccount.addStatus(notFound("the site does not exist"));
    getAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    getAccount.setTestForm(new TestForm());
    getAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
View Full Code Here

    Endpoint getAccount = new Endpoint("/account/{login}", Method.GET, "getaccount");
    getAccount.setDescription("Returns the account");
    getAccount.addFormat(Format.xml());
    getAccount.addStatus(ok("the account information has been sent back to the client"));
    getAccount.addStatus(forbidden("insufficient rights to access the account"));
    getAccount.addStatus(notFound("the account does not exist"));
    getAccount.addStatus(notFound("the site does not exist"));
    getAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    getAccount.setTestForm(new TestForm());
    getAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.READ, getAccount);
View Full Code Here

    getAccount.setDescription("Returns the account");
    getAccount.addFormat(Format.xml());
    getAccount.addStatus(ok("the account information has been sent back to the client"));
    getAccount.addStatus(forbidden("insufficient rights to access the account"));
    getAccount.addStatus(notFound("the account does not exist"));
    getAccount.addStatus(notFound("the site does not exist"));
    getAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    getAccount.setTestForm(new TestForm());
    getAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.READ, getAccount);
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.