@Path(value="/users") @RolesAllowed(value="admin") public class UsersService extends Object
Constructor and Description |
---|
UsersService(org.infinispan.Cache cache) |
Modifier and Type | Method and Description |
---|---|
String |
create(StoredUser user) |
Response |
create(UriInfo uriInfo,
StoredUser user) |
Response |
delete(String id) |
User |
get(String id) |
StoredUser |
getStoredUser(String id) |
void |
update(String id,
StoredUser user) |
public String create(StoredUser user) throws Exception
Exception
@POST @Consumes(value="application/json") @Produces(value="application/json") public Response create(@Context UriInfo uriInfo, StoredUser user) throws Exception
Exception
@PUT @Consumes(value="application/json") @Produces(value="application/json") @Path(value="{id}") public void update(@PathParam(value="id") String id, StoredUser user) throws Exception
Exception
@GET @Path(value="{id}") @Produces(value="application/json") public User get(@PathParam(value="id") String id)
public StoredUser getStoredUser(String id)
Copyright © 2015. All Rights Reserved.