@Produces("application/json")
@Path("{id}")
public void update(@PathParam("id") String id, StoredUser user) throws Exception
{
StoredUser stored = getStoredUser(id);
if (stored == null) throw new NotFoundException();
if (user.getName() != null) stored.setName(user.getName());
if (user.getEnabled() != null) stored.setEnabled(user.getEnabled());
if (user.getEmail() != null) stored.setEmail((user.getEmail()));
if (user.getCredentials() != null && user.getCredentials().containsKey("password"))
{