Class SurveyBaseVM

    • Constructor Detail

      • SurveyBaseVM

        public SurveyBaseVM()
    • Method Detail

      • init

        public void init()
      • versionsUpdated

        public void versionsUpdated()
      • codeListsUpdated

        public void codeListsUpdated()
      • unitsUpdated

        public void unitsUpdated()
      • tabSetsUpdated

        public void tabSetsUpdated()
      • taxonomiesUpdated

        public void taxonomiesUpdated()
      • currentFormValidated

        public void currentFormValidated​(boolean valid,
                                         Boolean blocking,
                                         Map<String,​List<String>> validationMessagesByField)
      • undoLastChanges

        public void undoLastChanges​(org.zkoss.zk.ui.Component view)
      • undoLastChanges

        public void undoLastChanges()
      • dispatchCurrentFormValidatedCommand

        public void dispatchCurrentFormValidatedCommand()
      • dispatchCurrentFormValidatedCommand

        public void dispatchCurrentFormValidatedCommand​(boolean valid)
      • dispatchCurrentFormValidatedCommand

        public void dispatchCurrentFormValidatedCommand​(boolean valid,
                                                        boolean blocking)
      • dispatchCurrentFormValidatedCommand

        public void dispatchCurrentFormValidatedCommand​(boolean valid,
                                                        boolean blocking,
                                                        Map<String,​List<String>> validationMessagesByField)
      • dispatchSurveyChangedCommand

        public void dispatchSurveyChangedCommand()
      • dispatchSchemaChangedCommand

        public void dispatchSchemaChangedCommand()
      • dispatchTaxonomiesUpdatedCommand

        public void dispatchTaxonomiesUpdatedCommand()
      • dispatchNodeConvertedCommand

        public void dispatchNodeConvertedCommand​(NodeDefinition nodeDef)
      • dispatchValidateAllCommand

        protected void dispatchValidateAllCommand()
      • checkCanLeaveForm

        public boolean checkCanLeaveForm()
      • checkCanLeaveForm

        public boolean checkCanLeaveForm​(SurveyBaseVM.CanLeaveFormConfirmHandler confirmHandler)
        If the current form is valid, execute the onOk method of the specified confirmHandler and returns true, otherwise shows a confirm message handled by the specified confirmHandler and returns false If the form is not valid and the confirmHandler is not specified, shows a warning message.
        Parameters:
        confirmHandler -
        Returns:
      • initSurvey

        protected void initSurvey()
      • getSurveyId

        public Integer getSurveyId()
      • isCollectEarthSurvey

        public boolean isCollectEarthSurvey()
      • isSurveyStored

        public boolean isSurveyStored()
      • isSurveyPublished

        public boolean isSurveyPublished()
      • isSurveyChanged

        public boolean isSurveyChanged()
      • currentLanguageChanged

        public void currentLanguageChanged()
      • surveyChanged

        public void surveyChanged()
      • surveySaved

        public void surveySaved()
      • getDateFormat

        public String getDateFormat()
      • getFormVersionsWithEmptyOption

        public List<Object> getFormVersionsWithEmptyOption()
      • getFormVersionIdsWithEmptyOption

        public List<Integer> getFormVersionIdsWithEmptyOption()
      • getVersionLabel

        public String getVersionLabel​(int id)
      • isSingleRootEntityDefined

        public boolean isSingleRootEntityDefined()
      • getTaxonomyNames

        public List<String> getTaxonomyNames()
      • getUnits

        public List<Unit> getUnits()
      • getUnitNames

        public List<String> getUnitNames()
      • getUnitLabelFromPrecision

        public String getUnitLabelFromPrecision​(Precision precision)
      • getUnitLabelFromName

        public String getUnitLabelFromName​(String name)
      • getUnitLabel

        public String getUnitLabel​(Unit unit)
      • isDefaultLanguage

        public boolean isDefaultLanguage()
      • getDefaultLanguageCode

        public String getDefaultLanguageCode()
      • isCurrentFormValid

        public boolean isCurrentFormValid()
      • isCurrentFormBlocking

        public boolean isCurrentFormBlocking()
      • createBasicModuleParameters

        protected Map<String,​String> createBasicModuleParameters()
      • isCurrentEditedSurvey

        public boolean isCurrentEditedSurvey​(SurveySummary surveySummary)
      • getEditableRecordStepNames

        public List<String> getEditableRecordStepNames()
      • isSurveyRelatedToPublishedSurvey

        protected boolean isSurveyRelatedToPublishedSurvey()