Package com.agiletec.aps.util

Examples of com.agiletec.aps.util.ApsProperties.loadFromXml()


    try {
      if (null == this.getQuestionId() || null == this.getStrutsAction()) {
        this.addActionError(this.getText("message.surveyAction.cannotProceed"));
        return INPUT;
      }
      prop.loadFromXml(xml);
      if (this.getStrutsAction() == ApsAdminSystemConstants.EDIT) {
        this.addActionError(this.getText("message.choiceAction.unexpextedAction", new String[]{this.getText("_choice"), this.getText("freeText")}));
        return INPUT;
      }
      choice = new Choice();
View Full Code Here


        }
        // get extra info: questions need the survey type
        int questionnaireValue = res.getInt(13);
        boolean questionnaire = questionnaireValue == 1 ? true:false;
        ApsProperties titles = new ApsProperties();
        titles.loadFromXml(res.getString(14));
        question.setExtraInfo(questionnaire, titles);
        Choice choice = this.buildChoiceRecordFromResultSet(res, 8);
        if (null == choice) continue;
        choice.setExtraInfo(question.getSurveyId(), question.isQuestionnaire(), question.getSurveyTitles(), question.getQuestions());
        if (null == question.getChoice(choice.getId())) {
View Full Code Here

      if (id > 0) {
        survey = new Survey();
        survey.setQuestions(new ArrayList<Question>());
        survey.setId(id);
        ApsProperties prop = new ApsProperties();
        prop.loadFromXml(res.getString(2));
        survey.setDescriptions(prop);
        survey.setGroupName(res.getString(3).trim());
        survey.setStartDate(res.getDate(4));
        survey.setEndDate(res.getDate(5));
        survey.setActive(res.getBoolean(6));
View Full Code Here

        survey.setPublicPartialResult(res.getBoolean(7));
        survey.setPublicResult(res.getBoolean(8));
        survey.setQuestionnaire(res.getBoolean(9));
        survey.setGatherUserInfo(res.getBoolean(10));
        prop = new ApsProperties();
        prop.loadFromXml(res.getString(11));
        survey.setTitles(prop);
        survey.setRestricted(res.getBoolean(12));
        survey.setCheckCookie(res.getBoolean(13));
        survey.setCheckIpAddress(res.getBoolean(14));
        survey.setCheckUsername(res.getBoolean(15));
View Full Code Here

        survey.setCheckCookie(res.getBoolean(13));
        survey.setCheckIpAddress(res.getBoolean(14));
        survey.setCheckUsername(res.getBoolean(15));
        survey.setImageId(res.getString(16));
        prop = new ApsProperties();
        prop.loadFromXml(res.getString(17));
        survey.setImageDescriptions(prop);
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "buildSurveyRecordFromResultSet",
      "Error while building a 'survey' object from the result set");
View Full Code Here

        choice = this.buildChoiceRecordFromResultSet(res, 1);
        // process get extra info
        int surveyId = res.getInt(6);
        boolean questionnaire = res.getInt(7) == 1 ? true:false;
        ApsProperties surveyTitle = new ApsProperties();
        surveyTitle.loadFromXml(res.getString(8));
        ApsProperties questionTitle = new ApsProperties();
        questionTitle.loadFromXml(res.getString(9));
        choice.setExtraInfo(surveyId, questionnaire, surveyTitle, questionTitle);
      }
    } catch (Throwable t) {
View Full Code Here

        int surveyId = res.getInt(6);
        boolean questionnaire = res.getInt(7) == 1 ? true:false;
        ApsProperties surveyTitle = new ApsProperties();
        surveyTitle.loadFromXml(res.getString(8));
        ApsProperties questionTitle = new ApsProperties();
        questionTitle.loadFromXml(res.getString(9));
        choice.setExtraInfo(surveyId, questionnaire, surveyTitle, questionTitle);
      }
    } catch (Throwable t) {
      processDaoException(t, "Error while loading the choice of ID "+id, "loadChoice");
    } finally {
View Full Code Here

    List<Question> questions = new ArrayList<Question>();
    questions.add(question);
    questions.add(question2);
    Date date = new Date();
    ApsProperties prop = new ApsProperties();
    prop.loadFromXml(xml);
    survey.setDescriptions(prop);
    survey.setGroupName("fake");
    survey.setStartDate(date);
    survey.setEndDate(null);
    survey.setActive(true);
View Full Code Here

    survey.setGatherUserInfo(true);
    survey.setRestricted(true);
    survey.setTitles(prop);
    survey.setImageId("IMGXXX");
    prop = new ApsProperties();
    prop.loadFromXml(xmlBarrali);
    survey.setImageDescriptions(prop);
    survey.setQuestions(questions);
    return survey;
  }
 
View Full Code Here

    List<Question> questions = new ArrayList<Question>();
    questions.add(question);
    questions.add(question2);
    Date date = new Date();
    ApsProperties prop = new ApsProperties();
    prop.loadFromXml(xmlDescription);
    survey.setDescriptions(prop);
    survey.setGroupName("fake");
    survey.setStartDate(date);
    survey.setEndDate(null);
    survey.setActive(true);
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.