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

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


    // GET /suggest/subjects/{hint}
    Endpoint suggestSubjects = new Endpoint("/suggest/subjects/{seed}", Method.GET, "suggestsubjects");
    suggestSubjects.setDescription("Returns suggestions for subjects based on the given seed");
    suggestSubjects.addFormat(new Format("xml", null, null));
    suggestSubjects.addStatus(ok("suggestions based on the seed are returned"));
    suggestSubjects.addStatus(serviceUnavailable("the site is temporarily offline"));
    suggestSubjects.addPathParameter(new Parameter("seed", Parameter.Type.String, "The seed on which suggestions are based"));
    suggestSubjects.addOptionalParameter(new Parameter("limit", Parameter.Type.String, "The maximum number of suggestions"));
    suggestSubjects.addOptionalParameter(new Parameter("highlight", Parameter.Type.String, "The tag name used to highlight matches"));
    suggestSubjects.setTestForm(new TestForm());
View Full Code Here


    // GET /suggest/subjects/{hint}
    Endpoint suggestSubjects = new Endpoint("/suggest/subjects/{seed}", Method.GET, "suggestsubjects");
    suggestSubjects.setDescription("Returns suggestions for subjects based on the given seed");
    suggestSubjects.addFormat(new Format("xml", null, null));
    suggestSubjects.addStatus(ok("suggestions based on the seed are returned"));
    suggestSubjects.addStatus(serviceUnavailable("the site is temporarily offline"));
    suggestSubjects.addPathParameter(new Parameter("seed", Parameter.Type.String, "The seed on which suggestions are based"));
    suggestSubjects.addOptionalParameter(new Parameter("limit", Parameter.Type.String, "The maximum number of suggestions"));
    suggestSubjects.addOptionalParameter(new Parameter("highlight", Parameter.Type.String, "The tag name used to highlight matches"));
    suggestSubjects.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.READ, suggestSubjects);
View Full Code Here

    Endpoint updateAccountChallenge = new Endpoint("/account/{login}/challenge", Method.PUT, "updateaccountchallenge");
    updateAccountChallenge.setDescription("Updates the account challenge");
    updateAccountChallenge.addFormat(Format.xml());
    updateAccountChallenge.addStatus(ok("the challenge has been updated"));
    updateAccountChallenge.addStatus(forbidden("insufficient rights to update the account"));
    updateAccountChallenge.addStatus(notFound("the account does not exist"));
    updateAccountChallenge.addStatus(notFound("the site does not exist"));
    updateAccountChallenge.addStatus(serviceUnavailable("the site is temporarily offline"));
    updateAccountChallenge.setTestForm(new TestForm());
    updateAccountChallenge.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    updateAccountChallenge.addOptionalParameter(new Parameter("challenge", Parameter.Type.String, "Password"));
View Full Code Here

    updateAccountChallenge.setDescription("Updates the account challenge");
    updateAccountChallenge.addFormat(Format.xml());
    updateAccountChallenge.addStatus(ok("the challenge has been updated"));
    updateAccountChallenge.addStatus(forbidden("insufficient rights to update the account"));
    updateAccountChallenge.addStatus(notFound("the account does not exist"));
    updateAccountChallenge.addStatus(notFound("the site does not exist"));
    updateAccountChallenge.addStatus(serviceUnavailable("the site is temporarily offline"));
    updateAccountChallenge.setTestForm(new TestForm());
    updateAccountChallenge.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    updateAccountChallenge.addOptionalParameter(new Parameter("challenge", Parameter.Type.String, "Password"));
    updateAccountChallenge.addOptionalParameter(new Parameter("response", Parameter.Type.Password, "Password"));
View Full Code Here

    updateAccountChallenge.addFormat(Format.xml());
    updateAccountChallenge.addStatus(ok("the challenge has been updated"));
    updateAccountChallenge.addStatus(forbidden("insufficient rights to update the account"));
    updateAccountChallenge.addStatus(notFound("the account does not exist"));
    updateAccountChallenge.addStatus(notFound("the site does not exist"));
    updateAccountChallenge.addStatus(serviceUnavailable("the site is temporarily offline"));
    updateAccountChallenge.setTestForm(new TestForm());
    updateAccountChallenge.addPathParameter(new Parameter("login", Parameter.Type.String, "Unique login name"));
    updateAccountChallenge.addOptionalParameter(new Parameter("challenge", Parameter.Type.String, "Password"));
    updateAccountChallenge.addOptionalParameter(new Parameter("response", Parameter.Type.Password, "Password"));
    docs.addEndpoint(Endpoint.Type.WRITE, updateAccountChallenge);
View Full Code Here

    // DELETE /account/{login}
    Endpoint deleteAccount = new Endpoint("/account/{login}", Method.DELETE, "removeaccount");
    deleteAccount.setDescription("Removes the account from the site");
    deleteAccount.addFormat(Format.xml());
    deleteAccount.addStatus(ok("the account has been removed"));
    deleteAccount.addStatus(notFound("the account does not exist"));
    deleteAccount.addStatus(notFound("the site does not exist"));
    deleteAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    deleteAccount.setTestForm(new TestForm());
    deleteAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
View Full Code Here

    // DELETE /account/{login}
    Endpoint deleteAccount = new Endpoint("/account/{login}", Method.DELETE, "removeaccount");
    deleteAccount.setDescription("Removes the account from the site");
    deleteAccount.addFormat(Format.xml());
    deleteAccount.addStatus(ok("the account has been removed"));
    deleteAccount.addStatus(notFound("the account does not exist"));
    deleteAccount.addStatus(notFound("the site does not exist"));
    deleteAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    deleteAccount.setTestForm(new TestForm());
    deleteAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.WRITE, deleteAccount);
View Full Code Here

    Endpoint deleteAccount = new Endpoint("/account/{login}", Method.DELETE, "removeaccount");
    deleteAccount.setDescription("Removes the account from the site");
    deleteAccount.addFormat(Format.xml());
    deleteAccount.addStatus(ok("the account has been removed"));
    deleteAccount.addStatus(notFound("the account does not exist"));
    deleteAccount.addStatus(notFound("the site does not exist"));
    deleteAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    deleteAccount.setTestForm(new TestForm());
    deleteAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.WRITE, deleteAccount);
View Full Code Here

    deleteAccount.setDescription("Removes the account from the site");
    deleteAccount.addFormat(Format.xml());
    deleteAccount.addStatus(ok("the account has been removed"));
    deleteAccount.addStatus(notFound("the account does not exist"));
    deleteAccount.addStatus(notFound("the site does not exist"));
    deleteAccount.addStatus(serviceUnavailable("the site is temporarily offline"));
    deleteAccount.setTestForm(new TestForm());
    deleteAccount.addPathParameter(new Parameter("login", Parameter.Type.String, "Login name"));
    docs.addEndpoint(Endpoint.Type.WRITE, deleteAccount);

    // PUT /account/{login}/status
View Full Code Here

    // PUT /account/{login}/status
    Endpoint enableAccount = new Endpoint("/account/{login}/status", Method.PUT, "enableaccount");
    enableAccount.setDescription("Enables the account");
    enableAccount.addFormat(Format.xml());
    enableAccount.addStatus(ok("the account has been enabled"));
    enableAccount.addStatus(notModified("the account was already enabled"));
    enableAccount.addStatus(forbidden("insufficient rights to enable the account"));
    enableAccount.addStatus(notFound("the account does not exist"));
    enableAccount.addStatus(notFound("the site does not exist"));
    enableAccount.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.