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

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


    disableAccount.addStatus(ok("the account has been disabled"));
    disableAccount.addStatus(notModified("the account is already disabled"));
    disableAccount.addStatus(forbidden("insufficient rights to disable the account"));
    disableAccount.addStatus(notFound("the account does not exist"));
    disableAccount.addStatus(notFound("the site does not exist"));
    disableAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    disableAccount.setTestForm(new TestForm());
    disableAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.WRITE, disableAccount);

    // POST /account/{login}/roles/{context}
View Full Code Here


    // POST /account/{login}/roles/{context}
    Endpoint addRole = new Endpoint("/account/{login}/roles/{context}", Method.POST, "addrole");
    addRole.setDescription("Adds a role to the account");
    addRole.addFormat(Format.xml());
    addRole.addStatus(ok("the role has been added"));
    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    addRole.addStatus(notFound("the site does not exist"));
View Full Code Here

    // POST /account/{login}/roles/{context}
    Endpoint addRole = new Endpoint("/account/{login}/roles/{context}", Method.POST, "addrole");
    addRole.setDescription("Adds a role to the account");
    addRole.addFormat(Format.xml());
    addRole.addStatus(ok("the role has been added"));
    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    addRole.addStatus(notFound("the site does not exist"));
    addRole.addStatus(serviceUnavailable("the site is temporarily offline"));
View Full Code Here

    Endpoint addRole = new Endpoint("/account/{login}/roles/{context}", Method.POST, "addrole");
    addRole.setDescription("Adds a role to the account");
    addRole.addFormat(Format.xml());
    addRole.addStatus(ok("the role has been added"));
    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    addRole.addStatus(notFound("the site does not exist"));
    addRole.addStatus(serviceUnavailable("the site is temporarily offline"));
    addRole.setTestForm(new TestForm());
View Full Code Here

    addRole.setDescription("Adds a role to the account");
    addRole.addFormat(Format.xml());
    addRole.addStatus(ok("the role has been added"));
    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    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"));
View Full Code Here

    addRole.addFormat(Format.xml());
    addRole.addStatus(ok("the role has been added"));
    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    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"));
View Full Code Here

    addRole.addStatus(ok("the role has been added"));
    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    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"));
View Full Code Here

    addRole.addStatus(notModified("the role is already owned by the account"));
    addRole.addStatus(badRequest("the role parameter is blank"));
    addRole.addStatus(forbidden("insufficient rights to add the role"));
    addRole.addStatus(notFound("the account does not exist"));
    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);
View Full Code Here

    // DELETE /account/{login}/roles/{context}
    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"));
View Full Code Here

    // DELETE /account/{login}/roles/{context}
    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"));
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.