if(auth.getId() == null || auth.getId().equals(""))
auth.setId(id);
else if(auth.getId().equals(id) == false)
throw new InvalidParameterException("Auth ID mismatch");
AuthResponse response = new AuthResponse(AuthResponse.SUCCESS);
if(error == null){
com.alu.e3.data.model.Auth authDataModel = BeanConverterUtil.toDataModel(auth);
dataManager.updateAuth(authDataModel);
response.setId(auth.getId());
}
else{
error.setErrorCode("400");
response.setStatus(AuthResponse.FAILURE);
response.setError(error);
}
return response;
}
};
}