Examples of ResultOfCall


Examples of se.inera.ifv.v2.ResultOfCall

            Question question = new Question(careUnit, parameters.getQuestion());

            questionService.saveQuestion(question);

            response = new ReceiveMedicalCertificateQuestionResponseType();
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.OK);
           
        } catch (Exception e) {
            log.warn("Error handling MedicalCertificateQuestion" ,e);
            // TODO: Fix this error handling
            response = new ReceiveMedicalCertificateQuestionResponseType();
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.ERROR);
            response.getResult().setErrorId(ErrorIdEnum.APPLICATION_ERROR);
            response.getResult().setErrorText(e.getMessage());
        }
View Full Code Here

Examples of se.inera.ifv.v2.ResultOfCall

      Answer answer = new Answer(careUnit, parameters.getAnswer());
      answerService.saveAnswer(answer);
     
     
      ResultOfCall value = new ResultOfCall();
      value.setResultCode(ResultCodeEnum.OK);
      response.setResult(value );
     
        } catch (Exception e) {
            log.warn("Error handling MedicalCertificateAnswer" ,e);
            // TODO: Fix this error handling
            response = new ReceiveMedicalCertificateAnswerResponseType();
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.ERROR);
            response.getResult().setErrorId(ErrorIdEnum.APPLICATION_ERROR);
            response.getResult().setErrorText(e.getMessage());
        }
View Full Code Here

Examples of se.inera.ifv.v2.ResultOfCall

            String careUnit = parameters.getCareUnitId().getExtension();
            log.debug("FindAllQuestions called for careunit:" + careUnit);
           
            QuestionsValue questionValue = questionService.getQuestionsForCareUnit(careUnit);

            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.OK);
            response.setQuestionsLeft(questionValue.getQuestionsLeft());
            response.setQuestions(new QuestionsType());

            for (Question q : questionValue.getQuestions()) {
                QuestionFromFkType questionFromFk = (QuestionFromFkType) q.getMessage();
                QuestionType qt = new QuestionType();
                qt.setId(q.getId().toString());
                qt.setReceivedDate(q.getArrived());
                qt.setQuestion(questionFromFk);

                response.getQuestions().getQuestion().add(qt);

                q.setStatusRetrieved();
            }

            log.debug("FindAllQuestions found " + questionValue.getQuestions().size() " questions for careunit " + careUnit);

        } catch (Exception e) {
            log.warn("Failed to handle FindAllQuestions", e);
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.ERROR);
            response.getResult().setErrorText(e.getMessage());           
        }
        return response;
    }
View Full Code Here

Examples of se.inera.ifv.v2.ResultOfCall

            }
            answerService.deleteAnswersForCareUnit(careUnit, ids);

            log.debug(ids.size() + " answers deleted for careunit:" + careUnit);

            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.OK);

        } catch (Exception e) {
            log.warn("Error handling DeleteAnswer message", e);
            // FIXME: Improved error handling
            response.setResult(new ResultOfCall());
            response.getResult().setErrorText(e.getMessage());
            response.getResult().setResultCode(ResultCodeEnum.ERROR);
        }
        return response;
    }
View Full Code Here

Examples of se.inera.ifv.v2.ResultOfCall

            String careUnit = parameters.getCareUnitId().getExtension();
            log.debug("FindAllAnswers called for careunit:" + careUnit);

            AnswersValue answerValue = answerService.getAnswersForCareUnit(careUnit);

            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.OK);
            response.setAnswersLeft(answerValue.getAnswersLeft());
            response.setAnswers(new AnswersType());

            for (Answer a : answerValue.getAnswers()) {
                AnswerFromFkType answerFromFk = (AnswerFromFkType) a.getMessage();
                AnswerType qt = new AnswerType();
                qt.setId(a.getId().toString());
                qt.setReceivedDate(a.getArrived());
                qt.setAnswer(answerFromFk);

                response.getAnswers().getAnswer().add(qt);

                a.setStatusRetrieved();
            }

            log.debug("FindAllAnswers found " + answerValue.getAnswers().size() " answers for careunit " + careUnit);

        } catch (Exception e) {
            // FIXME: Add better error handling
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.ERROR);
            response.getResult().setErrorText(e.getMessage());
        }
        return response;
    }
View Full Code Here

Examples of se.inera.ifv.v2.ResultOfCall

            questionService.deleteQuestionsForCareUnit(careUnit, ids);
           
            log.debug(ids.size() + " questions deleted for careunit:" + careUnit);
           
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.OK);

        } catch (Exception e) {
            log.warn("Error handling DeleteQuest message", e);
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.ERROR);
            response.getResult().setErrorText(e.getMessage());
        }
        return response;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.