user.validateUserToInsert();
this.getServiceUserBean().createUser(user);
listMessages = new ArrayList<Message>();
listMessages.add(new Message(Boolean.FALSE, StatusCodeMessage.CREATED.getIdStatusMessage(),
"Usu�rio criado com sucesso."));
listMessages.add(new Message());
} catch (ValidationException e) {
LOG.error("", e);
listMessages = new ArrayList<Message>();
listMessages.add(new Message(Boolean.TRUE, StatusCodeMessage.INTERNAL_SERVER_ERROR.getIdStatusMessage(), e
.getMessage()));
} catch (Exception e) {
LOG.error("", e);
listMessages = new ArrayList<Message>();
listMessages.add(new Message(Boolean.TRUE, StatusCodeMessage.INTERNAL_SERVER_ERROR.getIdStatusMessage(),
"Ocorreu um erro ao gravar o usu�rio."));
}
return listMessages;
}