use of de.alpharogroup.design.pattern.observer.event.EventObject in project bundle-app-ui by astrapi69.
the class ImportBundleApplicationStartPanel method updateWizardButtons.
protected void updateWizardButtons() {
final ImportWizardModel modelObject = getModelObject().getModelObject();
final String bundleAppName = modelObject.getBundleAppName();
if (bundleAppName != null) {
bundleAppName.trim();
}
final Locale defaultLocale = modelObject.getDefaultLocale();
final File rootDir = modelObject.getRootDir();
if (StringUtils.isNotEmpty(bundleAppName) && defaultLocale != null && rootDir != null) {
modelObject.setAllValid();
final EventSource<EventObject<NavigationEventState>> eventSource = MainApplication.getImportNavigationState();
eventSource.fireEvent(new EventObject<>(NavigationEventState.UPDATE));
} else {
modelObject.reset();
}
}
use of de.alpharogroup.design.pattern.observer.event.EventObject in project bundle-app-ui by astrapi69.
the class ImportWizardPanel method startResolving.
private void startResolving() throws IOException {
final File rootDir = getModelObject().getRootDir();
final Locale defaultLocale = getModelObject().getDefaultLocale();
final PropertiesListResolver resolver1 = new PropertiesListResolver(rootDir, defaultLocale);
resolver1.resolve();
final List<KeyValuePair<File, Locale>> propertiesList = resolver1.getPropertiesList();
getModelObject().setFoundProperties(ConvertExtensions.convertAndSort(propertiesList));
getModelObject().setDbImport(true);
final EventSource<EventObject<ImportWizardModel>> eventSource = MainApplication.getImportWizardModel();
eventSource.fireEvent(new EventObject<>(getModelObject()));
// set buttons state...
getModelObject().setValidPrevious(true);
getModelObject().setValidFinish(true);
final EventSource<EventObject<NavigationEventState>> navigationEventState = MainApplication.getImportNavigationState();
navigationEventState.fireEvent(new EventObject<>(NavigationEventState.UPDATE));
}
Aggregations