@Path(value="json/users") public class JSONBasedUsers extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
logger |
Constructor and Description |
---|
JSONBasedUsers() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createRole(String email,
String ref) |
javax.ws.rs.core.Response |
createUser(String email,
String name) |
javax.ws.rs.core.Response |
defaultUsers() |
javax.ws.rs.core.Response |
updateUser(String email,
String name) |
javax.ws.rs.core.Response |
userProductRole(String id,
String refType) |
javax.ws.rs.core.Response |
userRole(String email) |
@GET @Produces(value="application/json") public javax.ws.rs.core.Response defaultUsers() throws org.json.JSONException
org.json.JSONException
@Path(value="{email}") @GET @Produces(value="application/json") public javax.ws.rs.core.Response userRole(@PathParam(value="email") String email) throws org.json.JSONException
org.json.JSONException
@Path(value="{id : (.+)?}/{refType : (.+)?}") @GET @Produces(value="application/json") public javax.ws.rs.core.Response userProductRole(@PathParam(value="id") String id, @PathParam(value="refType") String refType) throws org.json.JSONException
org.json.JSONException
@POST @Path(value="/add") @Produces(value="application/json") @Consumes(value="application/x-www-form-urlencoded") public javax.ws.rs.core.Response createUser(@FormParam(value="Email") String email, @FormParam(value="Name") String name) throws IOException
IOException
@POST @Path(value="/update") @Produces(value="application/json") @Consumes(value="application/x-www-form-urlencoded") public javax.ws.rs.core.Response updateUser(@FormParam(value="Email") String email, @FormParam(value="Name") String name) throws IOException
IOException
@POST @Path(value="/addrole") @Produces(value="application/json") @Consumes(value="application/x-www-form-urlencoded") public javax.ws.rs.core.Response createRole(@FormParam(value="Email") String email, @FormParam(value="Reference") String ref) throws IOException
IOException
Copyright © 2019. All rights reserved.