@RequestMapping(value = "/Users({userId})", produces = "application/json", consumes = "application/json", method = DELETE)
public RestEntity removeEntry(@PathVariable String userId, HttpServletRequest request) throws RestException {
if (StringUtils.stringNotEmpty(userId)) {
try {
RequestContext requestContext = ControllerUtil.getRequestContext(request);
userManager.deleteUser(requestContext.getUserSession(), userId);
return null;
} catch (JasDBStorageException e) {
throw new RestException("Unable to remove user", e);
}
} else {
throw new RestException("Unable to delete user, no id specified");
}
}
}