Class SurveyBaseVM
java.lang.Object
org.openforis.collect.designer.viewmodel.BaseVM
org.openforis.collect.designer.viewmodel.SurveyBaseVM
- Direct Known Subclasses:
AttributeConversionVM,BaseSurveyFileImportVM,CodeListsPopUpVM,CollectEarthPreviewPopUpVM,PreviewPopUpVM,PreviewPreferencesVM,SamplingPointDataVM,SchemaObjectSelectorPopUpVM,SchemaVM,SurveyEditVM,SurveyFileRandomGridGenerationParametersPopUpVM,SurveyObjectBaseVM
- Author:
- S. Ricci
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringstatic final Stringstatic final Stringstatic final Stringprotected SchemaUpdaterprotected CollectSurveystatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.openforis.collect.designer.viewmodel.BaseVM
COLLECT_EARTH_PROJECT_FILE_CREATOR_LOADER, jobManager, userGroupManager, userManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancheckCanLeaveForm(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.booleancheckCanLeaveForm(SurveyBaseVM.CanLeaveFormConfirmHandler confirmHandler, String messageKey) voidvoidcurrentFormValidated(boolean valid, Boolean blocking, Map<String, List<String>> validationMessagesByField) voidvoidvoiddispatchCurrentFormValidatedCommand(boolean valid) voiddispatchCurrentFormValidatedCommand(boolean valid, boolean blocking) voiddispatchCurrentFormValidatedCommand(boolean valid, boolean blocking, Map<String, List<String>> validationMessagesByField) voidvoidvoidvoidprotected voidprotected SurveyEditVMgetUnitLabel(UnitFormObject unitFormObject) getUnitLabel(Unit unit) getUnitLabelFromName(String name) getUnitLabelFromPrecision(Precision precision) getUnits()getVersionLabel(int id) voidinit()protected voidbooleanbooleanisCurrentEditedSurvey(SurveySummary surveySummary) booleanbooleanbooleanbooleanbooleanbooleanprotected booleanbooleanprotected <T extends NamedObject>
List<T> sortByName(List<T> items) voidvoidvoidvoidvoidvoidundoLastChanges(org.zkoss.zk.ui.Component view) voidvoidMethods inherited from class org.openforis.collect.designer.viewmodel.BaseVM
closePopUp, getComponentsPath, getDefaultPublicUserGroupItem, getFormFieldValue, getFormFieldValue, getInitParameter, getLoggedUser, getLoggedUsername, getSession, getSessionStatus, getUserGroupsModel, initUserGroupsModel, joinList, joinValues, notifyChange, openPopUp, openPopUp, prettyDateFormat, setFormFieldValue, setFormFieldValue
-
Field Details
-
VERSIONS_UPDATED_GLOBAL_COMMAND
- See Also:
-
UNDO_LAST_CHANGES_GLOBAL_COMMAND
- See Also:
-
SURVEY_CHANGED_GLOBAL_COMMAND
- See Also:
-
SCHEMA_CHANGED_GLOBAL_COMMAND
- See Also:
-
NODE_CONVERTED_GLOBAL_COMMAND
- See Also:
-
SURVEY_SAVED_GLOBAL_COMMAND
- See Also:
-
VALIDATE_ALL_GLOBAL_COMMAND
- See Also:
-
DATE_FORMAT
-
survey
-
currentLanguageCode
-
fieldLabelKeyPrefixes
-
schemaUpdater
-
-
Constructor Details
-
SurveyBaseVM
public SurveyBaseVM()
-
-
Method Details
-
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
-
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
-
dispatchSurveyChangedCommand
public void dispatchSurveyChangedCommand() -
dispatchSchemaChangedCommand
public void dispatchSchemaChangedCommand() -
dispatchTaxonomiesUpdatedCommand
public void dispatchTaxonomiesUpdatedCommand() -
dispatchNodeConvertedCommand
-
dispatchValidateAllCommand
protected void dispatchValidateAllCommand() -
checkCanLeaveForm
public boolean checkCanLeaveForm() -
checkCanLeaveForm
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:
-
checkCanLeaveForm
public boolean checkCanLeaveForm(SurveyBaseVM.CanLeaveFormConfirmHandler confirmHandler, String messageKey) -
initSurvey
protected void initSurvey() -
getSurvey
-
getSurveyId
-
isCollectEarthSurvey
public boolean isCollectEarthSurvey() -
isSurveyStored
public boolean isSurveyStored() -
isSurveyPublished
public boolean isSurveyPublished() -
isSurveyChanged
public boolean isSurveyChanged() -
getRootVM
-
currentLanguageChanged
public void currentLanguageChanged() -
surveyChanged
public void surveyChanged() -
surveySaved
public void surveySaved() -
getDateFormat
-
getFormVersions
-
getFormVersionsWithEmptyOption
-
getFormVersionIdsWithEmptyOption
-
getVersionLabel
-
getRootEntities
-
isSingleRootEntityDefined
public boolean isSingleRootEntityDefined() -
getCodeLists
-
getTaxonomyNames
-
getUnits
-
getUnitNames
-
getUnitLabelFromPrecision
-
getUnitLabelFromName
-
getUnitLabel
-
getUnitLabel
-
isDefaultLanguage
public boolean isDefaultLanguage() -
getDefaultLanguageCode
-
getCurrentLanguageCode
- Overrides:
getCurrentLanguageCodein classBaseVM
-
isCurrentFormValid
public boolean isCurrentFormValid() -
isCurrentFormBlocking
public boolean isCurrentFormBlocking() -
getExpressionValidator
-
sortByName
-
createBasicModuleParameters
-
isCurrentEditedSurvey
-
getEditableRecordStepNames
-
isSurveyRelatedToPublishedSurvey
protected boolean isSurveyRelatedToPublishedSurvey()
-