package cactusServer.resources; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import cactusServer.entities.Account; import cactusServer.models.Accounts; @Path("/AccountsRest") public class AccountsRest { @POST @Path("/login") @Produces(MediaType.APPLICATION_JSON) public String loginAccount(@QueryParam("userID") String userID, @QueryParam("userPass") String userPass) { return ""; } @POST @Path("/logout") @Produces(MediaType.APPLICATION_JSON) public String logoutAccount(@QueryParam("userID") String userID) { return ""; } @POST @Path("/createAccount") @Produces(MediaType.APPLICATION_JSON) public Account create(@QueryParam("userID") String userID, @QueryParam("userName") String userName, @QueryParam("userPass") String userPass) { return Accounts.getInstance().createAcount(userID, userName, userPass); } @GET @Path("/getAccount") @Produces(MediaType.APPLICATION_JSON) public Account getAccount(@QueryParam("userID") String userID) { return Accounts.getInstance().getAccount(userID); } }