Examples of VODecisionItem


Examples of org.andromda.samples.animalquiz.decisiontree.VODecisionItem

     */
    public final void getFirstQuestion(ActionMapping mapping, org.andromda.samples.animalquiz.guess.GetFirstQuestionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
    {
        try
        {
            final VODecisionItem item = this.getDecisionService().getFirstQuestion();
            form.setQuestion(item.getPrompt());
           
            // Keep the decision item in the session so that
            // the next step can process it.
            this.getGuessSessionState(request).setLastDecisionItem(item);
        }
View Full Code Here

Examples of org.andromda.samples.animalquiz.decisiontree.VODecisionItem

     * @see org.andromda.samples.animalquiz.guess.GuessController#nextDecisionItemAvailable(org.apache.struts.action.ActionMapping, org.andromda.samples.animalquiz.guess.NextDecisionItemAvailableForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    public final java.lang.String nextDecisionItemAvailable(ActionMapping mapping, org.andromda.samples.animalquiz.guess.NextDecisionItemAvailableForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
    {
        final GuessSessionState sessionState = this.getGuessSessionState(request);
        VODecisionItem item = sessionState.getLastDecisionItem();

        final Long idNextItem = "yes".equals(sessionState.getLastAnswerFromUser()) ?
                item.getIdYesItem() : item.getIdNoItem();

        if (idNextItem != null)
        {
            item = this.getDecisionService().getNextQuestion(idNextItem);

            form.setQuestion(item.getPrompt());

            // Keep the decision item in the session so that
            // the next step can process it.
            sessionState.setLastDecisionItem(item);
            return "yes";
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.