/** Edit Use of Interview Guide */ public void editGuide() { if (selectedInterviewEntity.getInUse() == true) { selectedInterviewEntity.setInUse(Boolean.FALSE); } else { selectedInterviewEntity.setInUse(Boolean.TRUE); } interviewEntityFacade.edit(selectedInterviewEntity); }
/** Create Guide Interview */ public void createGuide() { try { interviewEntityFacade.createGuide(guideName, guideType); } catch (InterviewEntityNameException ex) { Logger.getLogger(GuideWebManagem.class.getName()).log(Level.SEVERE, null, ex); JSFUtil.addErrorMessage(ex.getMessage()); } }
/** Create Interview Questions to a selected Interview Guide */ public void createQuestionsForGuide() { try { InterviewQuestionEntity interviewQuestion = interviewQuestionFacade.createQuestionForGuide( questionName, selectedInterviewEntity, answerType); lstInterviewQuestionEntity = interviewQuestionFacade.getInterviewQuestionEntityByInterview( selectedInterviewEntity.getInterviewId()); interviewEntityFacade.mergeQuestionsInGuide(selectedInterviewEntity, interviewQuestion); } catch (EJBException ex) { Logger.getLogger(ApplicationWebManagem.class.getName()).log(Level.SEVERE, null, ex); } catch (InterviewQuestionNameAlreadyExistsException | MustIntroduceInterviewQuestionException ex) { Logger.getLogger(GuideWebManagem.class.getName()).log(Level.SEVERE, null, ex); JSFUtil.addErrorMessage(ex.getMessage()); } }
/** Remove a select Interview Guide */ public void removeGuide() { interviewEntityFacade.remove(selectedInterviewEntity); FacesContext.getCurrentInstance() .addMessage(null, new FacesMessage("Interview Guide removed with sucess")); }
public List<InterviewEntity> getLstInterviewsInUse() { return interviewEntityFacade.findInterviewsInUse(); }
public List<InterviewEntity> getLstInterviews() { return interviewEntityFacade.findAll(); }