Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
d8254119
by Tony Chemit at 2020-12-24T09:01:44+01:00
-
3f9b0e7a
by Tony Chemit at 2020-12-24T10:04:21+01:00
-
08bb3839
by Tony Chemit at 2020-12-24T10:10:37+01:00
-
069b8c34
by Tony Chemit at 2020-12-24T10:10:37+01:00
-
dfc4dea5
by Tony Chemit at 2020-12-24T11:36:55+01:00
30 changed files:
- client/configuration/src/main/config/Client.ini
- client/configuration/src/main/i18n/getters/config.getter
- client/configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
- client/core/src/main/java/fr/ird/observe/client/ClientUIContext.java
- client/core/src/main/java/fr/ird/observe/client/main/body/ClientConfigUI.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java
- client/datasource/actions/pom.xml
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/report/ReportConfigUI.jaxx
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/report/ResultTableModel.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUI.jaxx
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUI.jcss
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUIHandler.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/validate/ValidateConfigUI.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/open/ContentOpen.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/wizard/presets/RemotePresetsUI.jaxx
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jcss
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/actions/TripUIGenerateHomeId.java
- client/i18n/src/main/i18n/translations/observe_en_GB.properties
- client/i18n/src/main/i18n/translations/observe_es_ES.properties
- client/i18n/src/main/i18n/translations/observe_fr_FR.properties
- pom.xml
- server/configuration/src/main/config/Server.ini
- server/configuration/src/main/i18n/getters/config.getter
- server/configuration/src/main/java/fr/ird/observe/server/configuration/ServerConfig.java
- server/i18n/src/main/i18n/translations/observe_en_GB.properties
- server/i18n/src/main/i18n/translations/observe_es_ES.properties
- server/i18n/src/main/i18n/translations/observe_fr_FR.properties
- toolkit/service/src/main/java/fr/ird/observe/services/service/CleanTemporaryFilesTask.java
- toolkit/service/src/main/java/fr/ird/observe/services/service/CleanTemporaryFilesTaskConfiguration.java
Changes:
| ... | ... | @@ -756,11 +756,29 @@ type = fr.ird.observe.dto.validation.SeineBycatchObservedSystemConfig |
| 756 | 756 |
defaultValue = {\"fr.ird.referential.common.Species#1239832684290#0.04680507324710936\": [\"fr.ird.referential.ps.observation.ObservedSystem#0#1.0\",\"fr.ird.referential.ps.observation.ObservedSystem#0#1.1\",\"fr.ird.referential.ps.observation.ObservedSystem#1239832686428#0.9217864901728908\"]}
|
| 757 | 757 |
|
| 758 | 758 |
[option temporaryFilesTimeout]
|
| 759 |
-description = observe.config.temporaryFilesTimeout.description
|
|
| 760 |
-key = observe.config.temporaryFilesTimeout
|
|
| 759 |
+description = observe.config.client.temporaryFiles.timeout.description
|
|
| 760 |
+key = observe.config.client.temporaryFilesTimeout
|
|
| 761 | 761 |
type = int
|
| 762 | 762 |
defaultValue = 120
|
| 763 | 763 |
|
| 764 |
+[option logFilesTimeout]
|
|
| 765 |
+description = observe.config.client.logFiles.timeout.description
|
|
| 766 |
+key = observe.config.client.logFilesTimeout
|
|
| 767 |
+type = int
|
|
| 768 |
+defaultValue = 720
|
|
| 769 |
+ |
|
| 770 |
+[option feedbackFilesTimeout]
|
|
| 771 |
+description = observe.config.client.feedbackFiles.timeout.description
|
|
| 772 |
+key = observe.config.client.feedbackFilesTimeout
|
|
| 773 |
+type = int
|
|
| 774 |
+defaultValue = 720
|
|
| 775 |
+ |
|
| 776 |
+[option backupFilesTimeout]
|
|
| 777 |
+description = observe.config.client.backupFiles.timeout.description
|
|
| 778 |
+key = observe.config.client.backupFilesTimeout
|
|
| 779 |
+type = int
|
|
| 780 |
+defaultValue = 2160
|
|
| 781 |
+ |
|
| 764 | 782 |
[action help]
|
| 765 | 783 |
description = observe.ui.action.commandline.help
|
| 766 | 784 |
action = "fr.ird.observe.client.ObserveCLAction#help"
|
| ... | ... | @@ -7,6 +7,10 @@ observe.config.build.date |
| 7 | 7 |
observe.config.build.number
|
| 8 | 8 |
observe.config.build.version
|
| 9 | 9 |
observe.config.checkServerVersion.description
|
| 10 |
+observe.config.client.backupFiles.timeout.description
|
|
| 11 |
+observe.config.client.feedbackFiles.timeout.description
|
|
| 12 |
+observe.config.client.logFiles.timeout.description
|
|
| 13 |
+observe.config.client.temporaryFiles.timeout.description
|
|
| 10 | 14 |
observe.config.configFileName.description
|
| 11 | 15 |
observe.config.coordinate.format
|
| 12 | 16 |
observe.config.db.locale
|
| ... | ... | @@ -82,7 +86,6 @@ observe.config.speciesList.seine.observation.targetCatch |
| 82 | 86 |
observe.config.swingSessionFile.description
|
| 83 | 87 |
observe.config.temperature.format
|
| 84 | 88 |
observe.config.temporaryDirectory.description
|
| 85 |
-observe.config.temporaryFilesTimeout.description
|
|
| 86 | 89 |
observe.config.ui.autoPopupNumberEditor
|
| 87 | 90 |
observe.config.ui.blockStateColor
|
| 88 | 91 |
observe.config.ui.busyStateColor
|
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 |
package fr.ird.observe.client.configuration;
|
| 23 | 23 |
|
| 24 | 24 |
import com.google.common.collect.ImmutableList;
|
| 25 |
+import com.google.common.collect.ImmutableMap;
|
|
| 25 | 26 |
import com.google.common.collect.ImmutableSet;
|
| 26 | 27 |
import com.google.gson.Gson;
|
| 27 | 28 |
import fr.ird.observe.client.ObServeSwingSessionConfig;
|
| ... | ... | @@ -88,6 +89,7 @@ import java.util.Date; |
| 88 | 89 |
import java.util.LinkedList;
|
| 89 | 90 |
import java.util.List;
|
| 90 | 91 |
import java.util.Locale;
|
| 92 |
+import java.util.Map;
|
|
| 91 | 93 |
import java.util.Objects;
|
| 92 | 94 |
import java.util.Optional;
|
| 93 | 95 |
import java.util.Properties;
|
| ... | ... | @@ -633,6 +635,16 @@ public class ClientConfig extends GeneratedClientConfig implements TripMapConfig |
| 633 | 635 |
return new File(directory, String.format(FEED_BACK_PATTERN, getBuildVersion().toString().replaceAll("\\.", "_"), day, time));
|
| 634 | 636 |
}
|
| 635 | 637 |
|
| 638 |
+ @Override
|
|
| 639 |
+ public Map<Path, Integer> getTemporaryDirectoriesAndTimeout() {
|
|
| 640 |
+ return ImmutableMap.of(
|
|
| 641 |
+ getTemporaryDirectory().toPath(), getTemporaryFilesTimeout(),
|
|
| 642 |
+ getLogDirectory().toPath(), getLogFilesTimeout(),
|
|
| 643 |
+ getFeedBackDirectoryFile().toPath(), getFeedbackFilesTimeout(),
|
|
| 644 |
+ getBackupDirectory().toPath(), getBackupFilesTimeout()
|
|
| 645 |
+ );
|
|
| 646 |
+ }
|
|
| 647 |
+ |
|
| 636 | 648 |
public void saveForUser() {
|
| 637 | 649 |
log.info(t("observe.ui.message.save.configuration", get().getUserConfigFile()));
|
| 638 | 650 |
get().saveForUser(doNotSave);
|
| ... | ... | @@ -90,7 +90,6 @@ public class ClientUIContext implements Closeable { |
| 90 | 90 |
private final ObserveDataSourcesManager dataSourcesManager;
|
| 91 | 91 |
private final BackupsManager backupsManager;
|
| 92 | 92 |
private final LocalDatabaseBackupTimer localDatabaseBackupTimer;
|
| 93 |
- private final ObserveExecutorService executorService;
|
|
| 94 | 93 |
private final BusyModel busyModel;
|
| 95 | 94 |
private final ObserveDataSourceConfigurationMainFactory dataSourceConfigurationMainFactory;
|
| 96 | 95 |
private ObserveMainUI mainUI;
|
| ... | ... | @@ -241,8 +240,7 @@ public class ClientUIContext implements Closeable { |
| 241 | 240 |
this.dataSourcesManager = new ObserveDataSourcesManager(clientConfig, dataSourceConfigurationMainFactory, serviceFactory, selectModel, editModel);
|
| 242 | 241 |
this.backupsManager = new BackupsManager(clientConfig, dataSourcesManager);
|
| 243 | 242 |
this.localDatabaseBackupTimer = new LocalDatabaseBackupTimer(clientConfig, backupsManager, dataSourcesManager);
|
| 244 |
- this.executorService = new ObserveExecutorService();
|
|
| 245 |
- this.actionExecutor = new ObserveActionExecutor(executorService);
|
|
| 243 |
+ this.actionExecutor = new ObserveActionExecutor(new ObserveExecutorService());
|
|
| 246 | 244 |
this.busyModel = new BusyModel();
|
| 247 | 245 |
}
|
| 248 | 246 |
|
| ... | ... | @@ -297,10 +295,6 @@ public class ClientUIContext implements Closeable { |
| 297 | 295 |
return localDatabaseBackupTimer;
|
| 298 | 296 |
}
|
| 299 | 297 |
|
| 300 |
- public ObserveExecutorService getExecutorService() {
|
|
| 301 |
- return executorService;
|
|
| 302 |
- }
|
|
| 303 |
- |
|
| 304 | 298 |
public BackupsManager getBackupsManager() {
|
| 305 | 299 |
return backupsManager;
|
| 306 | 300 |
}
|
| ... | ... | @@ -362,7 +356,7 @@ public class ClientUIContext implements Closeable { |
| 362 | 356 |
}
|
| 363 | 357 |
|
| 364 | 358 |
/**
|
| 365 |
- * Methode pour initialiser l'ui principale sans l'afficher.
|
|
| 359 |
+ * Methode pour initialiser l'interface graphique principale sans l'afficher.
|
|
| 366 | 360 |
*
|
| 367 | 361 |
* @param context le context applicatif
|
| 368 | 362 |
* @param config la configuration a utiliser
|
| ... | ... | @@ -402,13 +396,6 @@ public class ClientUIContext implements Closeable { |
| 402 | 396 |
if (ui.getMainUIBodyContentManager().getCurrentBody() == null) {
|
| 403 | 397 |
ui.changeBodyContent(NoBodyContentComponent.class);
|
| 404 | 398 |
}
|
| 405 |
- //FIXME:BodyContent Ceci doit être fait au niveau du DataSourceEditorBodyContent
|
|
| 406 |
-// // force le redimensionnement du splitpane
|
|
| 407 |
-// ui.getSplitpane().revalidate();
|
|
| 408 |
-//
|
|
| 409 |
-// // force le redimensionnement du splitpane2
|
|
| 410 |
-// ui.getSplitpane2().revalidate();
|
|
| 411 |
- |
|
| 412 | 399 |
// affichage de l'interface graphique
|
| 413 | 400 |
SwingUtilities.invokeLater(() -> ui.setVisible(true));
|
| 414 | 401 |
getObserveSwingSessionHelper().addComponent(ui, replace);
|
| ... | ... | @@ -362,7 +362,11 @@ public class ClientConfigUI extends JXTitledPanel { |
| 362 | 362 |
helper.addOption(ClientConfigOption.BACKUP_USE);
|
| 363 | 363 |
helper.addOption(ClientConfigOption.BACKUP_DELAY);
|
| 364 | 364 |
helper.addOption(ClientConfigOption.BACKUP_AT_CLOSE);
|
| 365 |
- helper.addOption(ClientConfigOption.CHECK_SERVER_VERSION);
|
|
| 365 |
+ |
|
| 366 |
+ helper.addOption(ClientConfigOption.TEMPORARY_FILES_TIMEOUT);
|
|
| 367 |
+ helper.addOption(ClientConfigOption.LOG_FILES_TIMEOUT);
|
|
| 368 |
+ helper.addOption(ClientConfigOption.FEEDBACK_FILES_TIMEOUT);
|
|
| 369 |
+ helper.addOption(ClientConfigOption.BACKUP_FILES_TIMEOUT);
|
|
| 366 | 370 |
|
| 367 | 371 |
helper.addOption(ClientConfigOption.CHANGE_SYNCHRO_SRC);
|
| 368 | 372 |
helper.addOption(ClientConfigOption.H2_CAN_MIGRATE);
|
| ... | ... | @@ -33,12 +33,12 @@ import io.ultreia.java4all.jaxx.widgets.combobox.JaxxComboBox; |
| 33 | 33 |
import org.apache.commons.lang3.StringUtils;
|
| 34 | 34 |
import org.nuiton.jaxx.runtime.JAXXObject;
|
| 35 | 35 |
import org.nuiton.jaxx.runtime.init.UIInitializerSupport;
|
| 36 |
+import org.nuiton.jaxx.runtime.swing.JTextComponents;
|
|
| 36 | 37 |
import org.nuiton.jaxx.widgets.BeanUIUtil;
|
| 37 | 38 |
import org.nuiton.jaxx.widgets.datetime.DateTimeEditor;
|
| 38 | 39 |
import org.nuiton.jaxx.widgets.datetime.TimeEditor;
|
| 39 | 40 |
import org.nuiton.jaxx.widgets.gis.absolute.CoordinatesEditor;
|
| 40 | 41 |
import org.nuiton.jaxx.widgets.number.NumberEditor;
|
| 41 |
-import org.nuiton.jaxx.widgets.select.BeanComboBox;
|
|
| 42 | 42 |
import org.nuiton.jaxx.widgets.select.BeanListHeader;
|
| 43 | 43 |
import org.nuiton.jaxx.widgets.select.FilterableDoubleList;
|
| 44 | 44 |
import org.nuiton.jaxx.widgets.text.BigTextEditor;
|
| ... | ... | @@ -152,15 +152,6 @@ public class DefaultUIInitializer<UI extends JComponent & JAXXObject> extends UI |
| 152 | 152 |
editor.init();
|
| 153 | 153 |
}
|
| 154 | 154 |
|
| 155 |
- protected void init(BeanComboBox<?> editor) {
|
|
| 156 |
- initializerContext.checkFirstPass();
|
|
| 157 |
- editor.setI18nPrefix("observe.common.");
|
|
| 158 |
- editor.setMinimumSize(new Dimension(0, 24));
|
|
| 159 |
- if (StringUtils.isEmpty(editor.getProperty())) {
|
|
| 160 |
- editor.setProperty(editor.getName());
|
|
| 161 |
- }
|
|
| 162 |
- }
|
|
| 163 |
- |
|
| 164 | 155 |
@SuppressWarnings({"unchecked", "rawtypes"})
|
| 165 | 156 |
protected void init(JaxxComboBox editor) {
|
| 166 | 157 |
initializerContext.checkFirstPass();
|
| ... | ... | @@ -209,6 +200,7 @@ public class DefaultUIInitializer<UI extends JComponent & JAXXObject> extends UI |
| 209 | 200 |
protected void init(NumberEditor editor) {
|
| 210 | 201 |
initializerContext.checkFirstPass();
|
| 211 | 202 |
editor.init();
|
| 203 |
+ JTextComponents.addAutoSelect(editor.getTextField());
|
|
| 212 | 204 |
}
|
| 213 | 205 |
|
| 214 | 206 |
protected void init(DateTimeEditor editor) {
|
| ... | ... | @@ -136,10 +136,6 @@ |
| 136 | 136 |
<groupId>io.ultreia.java4all.jaxx</groupId>
|
| 137 | 137 |
<artifactId>jaxx-validator</artifactId>
|
| 138 | 138 |
</dependency>
|
| 139 |
- <dependency>
|
|
| 140 |
- <groupId>io.ultreia.java4all.jaxx</groupId>
|
|
| 141 |
- <artifactId>jaxx-widgets-select</artifactId>
|
|
| 142 |
- </dependency>
|
|
| 143 | 139 |
<dependency>
|
| 144 | 140 |
<groupId>io.ultreia.java4all.jaxx</groupId>
|
| 145 | 141 |
<artifactId>jaxx-widgets-combobox</artifactId>
|
| ... | ... | @@ -40,12 +40,6 @@ public void destroy() { |
| 40 | 40 |
model = null;
|
| 41 | 41 |
stepModel = null;
|
| 42 | 42 |
}
|
| 43 |
- |
|
| 44 |
-@Override
|
|
| 45 |
-protected void finalize() throws Throwable {
|
|
| 46 |
- super.finalize();
|
|
| 47 |
- destroy();
|
|
| 48 |
-}
|
|
| 49 | 43 |
]]>
|
| 50 | 44 |
</script>
|
| 51 | 45 |
|
| ... | ... | @@ -152,12 +152,6 @@ public class ResultTableModel extends AbstractTableModel { |
| 152 | 152 |
fireTableStructureChanged();
|
| 153 | 153 |
}
|
| 154 | 154 |
|
| 155 |
- @Override
|
|
| 156 |
- protected void finalize() throws Throwable {
|
|
| 157 |
- super.finalize();
|
|
| 158 |
- clear();
|
|
| 159 |
- }
|
|
| 160 |
- |
|
| 161 | 155 |
@Override
|
| 162 | 156 |
public int getRowCount() {
|
| 163 | 157 |
return data == null ? 0 : data.getHeight();
|
| ... | ... | @@ -17,19 +17,17 @@ |
| 17 | 17 |
<http://www.gnu.org/licenses/gpl-3.0.html>.
|
| 18 | 18 |
#L%
|
| 19 | 19 |
-->
|
| 20 |
-<JPanel id="panel" genericType='E extends ReferentialDtoReference'>
|
|
| 20 |
+<JPanel id="panel" genericType='E extends ReferentialDtoReference' layout="{new BorderLayout()}">
|
|
| 21 | 21 |
|
| 22 | 22 |
<import>
|
| 23 | 23 |
fr.ird.observe.dto.reference.ReferentialDtoReference
|
| 24 |
- |
|
| 25 |
- org.nuiton.jaxx.widgets.select.BeanComboBox
|
|
| 26 |
- |
|
| 24 |
+ io.ultreia.java4all.jaxx.widgets.combobox.JaxxComboBox
|
|
| 27 | 25 |
</import>
|
| 28 | 26 |
|
| 29 | 27 |
<ReferentialDtoReference id='referenceToReplace' initializer="getContextValue(ReferentialDtoReference.class, ReferentialReplaceUIHandler.CONTEXT_NAME)"/>
|
| 30 | 28 |
<ReferentialDtoReference id='replaceReference' javaBean="null"/>
|
| 31 | 29 |
|
| 32 | 30 |
<JLabel id='message' constraints='BorderLayout.NORTH'/>
|
| 33 |
- <BeanComboBox id='list' constraints='BorderLayout.CENTER' constructorParams='this' genericType='E'/>
|
|
| 31 |
+ <JaxxComboBox id='list' constraints='BorderLayout.CENTER' constructorParams='this' genericType='E'/>
|
|
| 34 | 32 |
|
| 35 | 33 |
</JPanel>
|
| ... | ... | @@ -19,11 +19,6 @@ |
| 19 | 19 |
* <http://www.gnu.org/licenses/gpl-3.0.html>.
|
| 20 | 20 |
* #L%
|
| 21 | 21 |
*/
|
| 22 |
-#panel{
|
|
| 23 |
- layout:{new BorderLayout()};
|
|
| 24 |
- |
|
| 25 |
-}
|
|
| 26 |
- |
|
| 27 | 22 |
#list {
|
| 28 | 23 |
bean: {this};
|
| 29 | 24 |
property:replaceReference;
|
| ... | ... | @@ -24,8 +24,8 @@ package fr.ird.observe.client.datasource.actions.synchronize.referential.ng; |
| 24 | 24 |
|
| 25 | 25 |
import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator;
|
| 26 | 26 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| 27 |
+import io.ultreia.java4all.jaxx.widgets.combobox.JaxxComboBox;
|
|
| 27 | 28 |
import org.nuiton.jaxx.runtime.spi.UIHandler;
|
| 28 |
-import org.nuiton.jaxx.widgets.select.BeanComboBox;
|
|
| 29 | 29 |
|
| 30 | 30 |
import java.awt.Dimension;
|
| 31 | 31 |
import java.beans.PropertyChangeListener;
|
| ... | ... | @@ -53,7 +53,7 @@ public class ReferentialReplaceUIHandler<R extends ReferentialDtoReference> impl |
| 53 | 53 |
|
| 54 | 54 |
@Override
|
| 55 | 55 |
public void afterInit(ReferentialReplaceUI<R> ui) {
|
| 56 |
- BeanComboBox<R> beanComboBox = ui.getList();
|
|
| 56 |
+ JaxxComboBox<R> beanComboBox = ui.getList();
|
|
| 57 | 57 |
|
| 58 | 58 |
beanComboBox.setI18nPrefix("observe.common.");
|
| 59 | 59 |
beanComboBox.setMinimumSize(new Dimension(0, 24));
|
| ... | ... | @@ -48,13 +48,6 @@ public void destroy() { |
| 48 | 48 |
model = null;
|
| 49 | 49 |
validateModel = null;
|
| 50 | 50 |
}
|
| 51 |
- |
|
| 52 |
-@Override
|
|
| 53 |
-protected void finalize() throws Throwable {
|
|
| 54 |
- super.finalize();
|
|
| 55 |
- destroy();
|
|
| 56 |
-}
|
|
| 57 |
- |
|
| 58 | 51 |
]]>
|
| 59 | 52 |
</script>
|
| 60 | 53 |
|
| ... | ... | @@ -50,6 +50,7 @@ import io.ultreia.java4all.jaxx.widgets.combobox.JaxxComboBox; |
| 50 | 50 |
import org.apache.commons.lang3.StringUtils;
|
| 51 | 51 |
import org.nuiton.jaxx.runtime.init.UIInitializerSupport;
|
| 52 | 52 |
import org.nuiton.jaxx.runtime.swing.BlockingLayerUI;
|
| 53 |
+import org.nuiton.jaxx.runtime.swing.JTextComponents;
|
|
| 53 | 54 |
import org.nuiton.jaxx.runtime.swing.Table;
|
| 54 | 55 |
import org.nuiton.jaxx.validator.JAXXValidator;
|
| 55 | 56 |
import org.nuiton.jaxx.validator.swing.SwingValidatorUtil;
|
| ... | ... | @@ -243,6 +244,7 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup |
| 243 | 244 |
editor.setConfig(new TemperatureEditorConfig(TemperatureFormat.C, label.getText(), propertyName));
|
| 244 | 245 |
editor.init(label);
|
| 245 | 246 |
editor.getModel().addPropertyChangeListener("format", e -> ((EditableContentUI<?>) ui).getValidator().doValidate());
|
| 247 |
+ JTextComponents.addAutoSelect(editor.getEditor().getTextField());
|
|
| 246 | 248 |
}
|
| 247 | 249 |
|
| 248 | 250 |
protected void init(JToolBar editor) {
|
| ... | ... | @@ -263,12 +265,14 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup |
| 263 | 265 |
initializerContext.checkFirstPass();
|
| 264 | 266 |
editor.setResetTip(t("observe.ui.action.reset"));
|
| 265 | 267 |
editor.init();
|
| 268 |
+ JTextComponents.addAutoSelect(editor.getTextEditor());
|
|
| 266 | 269 |
}
|
| 267 | 270 |
|
| 268 | 271 |
protected void init(UrlEditor editor) {
|
| 269 | 272 |
initializerContext.checkFirstPass();
|
| 270 | 273 |
editor.setResetTip(t("observe.ui.action.reset"));
|
| 271 | 274 |
editor.init();
|
| 275 |
+ JTextComponents.addAutoSelect(editor.getTextEditor());
|
|
| 272 | 276 |
}
|
| 273 | 277 |
|
| 274 | 278 |
private void init(JLabel editor) {
|
| ... | ... | @@ -301,6 +305,7 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup |
| 301 | 305 |
editor.setShowPopupButton(getClientConfig().isShowNumberEditorButton());
|
| 302 | 306 |
editor.setShowReset(true);
|
| 303 | 307 |
editor.init();
|
| 308 |
+ JTextComponents.addAutoSelect(editor.getTextField());
|
|
| 304 | 309 |
}
|
| 305 | 310 |
|
| 306 | 311 |
@SuppressWarnings({"unchecked", "rawtypes"})
|
| ... | ... | @@ -425,6 +430,7 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup |
| 425 | 430 |
initializerContext.checkFirstPass();
|
| 426 | 431 |
editor.setLocale(getClientConfig().getLocale());
|
| 427 | 432 |
editor.init();
|
| 433 |
+ JTextComponents.addAutoSelect(editor.getDateEditor().getEditor());
|
|
| 428 | 434 |
}
|
| 429 | 435 |
|
| 430 | 436 |
protected void init(JComponent editor) {
|
| ... | ... | @@ -447,11 +447,14 @@ public class ContentOpen<U extends ContentUI> { |
| 447 | 447 |
String propertyQuadrant = coordinateEditor.getModel().getPropertyQuadrant();
|
| 448 | 448 |
JavaBean bean = (JavaBean) coordinateEditor.getModel().getBean();
|
| 449 | 449 |
// 1. Mise à jour latitude/longitude:
|
| 450 |
- coordinateEditor.setLatitudeAndLongitude(bean.get(propertyLatitude), bean.get(propertyLongitude));
|
|
| 450 |
+ Float latitude = bean.get(propertyLatitude);
|
|
| 451 |
+ Float longitude = bean.get(propertyLongitude);
|
|
| 452 |
+ Integer quadrant = bean.get(propertyQuadrant);
|
|
| 453 |
+ |
|
| 454 |
+ coordinateEditor.setLatitudeAndLongitude(latitude, longitude);
|
|
| 451 | 455 |
// 2. Mise à jour du quadrant :
|
| 452 | 456 |
// Si le bean de données contient un quadrant, on met simplement à jour le composant de coordonnées pour sélectionner le quadrant voulu
|
| 453 | 457 |
// sinon, on réinitialise les quadrants du composant afin qu'aucun d'eux ne soit sélectionné (par exemple dans le cas de la création de la première activité d'une route)
|
| 454 |
- Integer quadrant = bean.get(propertyQuadrant);
|
|
| 455 | 458 |
if (quadrant == null) {
|
| 456 | 459 |
coordinateEditor.resetQuadrant();
|
| 457 | 460 |
} else {
|
| ... | ... | @@ -22,7 +22,6 @@ |
| 22 | 22 |
<import>
|
| 23 | 23 |
fr.ird.observe.dto.presets.RemoteDataSourceConfiguration
|
| 24 | 24 |
fr.ird.observe.dto.presets.ServerDataSourceConfiguration
|
| 25 |
- org.nuiton.jaxx.widgets.select.BeanComboBox
|
|
| 26 | 25 |
java.awt.CardLayout
|
| 27 | 26 |
</import>
|
| 28 | 27 |
|
| ... | ... | @@ -46,6 +46,10 @@ |
| 46 | 46 |
_skipBindingToBean:true;
|
| 47 | 47 |
}
|
| 48 | 48 |
|
| 49 |
+#generateHomeId {
|
|
| 50 |
+ focusable:false;
|
|
| 51 |
+}
|
|
| 52 |
+ |
|
| 49 | 53 |
#speciesTab {
|
| 50 | 54 |
title:{t("observe.data.ll.common.Trip.species")};
|
| 51 | 55 |
}
|
| ... | ... | @@ -38,7 +38,7 @@ import static io.ultreia.java4all.i18n.I18n.n; |
| 38 | 38 |
public class TripUIGenerateHomeId extends ContentUIActionSupport<TripUI> {
|
| 39 | 39 |
|
| 40 | 40 |
public TripUIGenerateHomeId() {
|
| 41 |
- super(null, n("observe.data.ll.common.Trip.action.generateHomeId.tip"), "generate", ObserveLLKeyStrokes.KEY_STROKE_GENERATE_ID);
|
|
| 41 |
+ super("", n("observe.data.ll.common.Trip.action.generateHomeId.tip"), "generate", ObserveLLKeyStrokes.KEY_STROKE_GENERATE_ID);
|
|
| 42 | 42 |
}
|
| 43 | 43 |
|
| 44 | 44 |
@Override
|
| ... | ... | @@ -54,6 +54,10 @@ observe.config.category.ui.description=Graphical interface options |
| 54 | 54 |
observe.config.category.ui.navigation=Navigation
|
| 55 | 55 |
observe.config.category.ui.navigation.description=Navigation tree configuration
|
| 56 | 56 |
observe.config.checkServerVersion.description=Should we check client and server version exact match ?
|
| 57 |
+observe.config.client.backupFiles.timeout.description=Backup files delete (in hours)
|
|
| 58 |
+observe.config.client.feedbackFiles.timeout.description=Feedback files delete (in hours)
|
|
| 59 |
+observe.config.client.logFiles.timeout.description=Log files delete (in hours)
|
|
| 60 |
+observe.config.client.temporaryFiles.timeout.description=Temporary files delete (in hours)
|
|
| 57 | 61 |
observe.config.configFileName.description=Configuration filename
|
| 58 | 62 |
observe.config.coordinate.format=Position format (DMD, DD, DMS)
|
| 59 | 63 |
observe.config.db.locale=Language of data source
|
| ... | ... | @@ -129,7 +133,6 @@ observe.config.speciesList.seine.observation.targetCatch=Species for target catc |
| 129 | 133 |
observe.config.swingSessionFile.description=Swing session file.
|
| 130 | 134 |
observe.config.temperature.format=Default temperature format
|
| 131 | 135 |
observe.config.temporaryDirectory.description=Default temporary directory used by application and clean at each launch.
|
| 132 |
-observe.config.temporaryFilesTimeout.description=Temporary files delete (in hours)
|
|
| 133 | 136 |
observe.config.ui.autoPopupNumberEditor=Flag sets to true when number editor show automaticly popup
|
| 134 | 137 |
observe.config.ui.blockStateColor=Color of block state
|
| 135 | 138 |
observe.config.ui.busyStateColor=Color of busy state
|
| ... | ... | @@ -54,6 +54,10 @@ observe.config.category.ui.description=Configuración GUI |
| 54 | 54 |
observe.config.category.ui.navigation=Navigation \#TODO
|
| 55 | 55 |
observe.config.category.ui.navigation.description=Navigation tree configuration \#TODO
|
| 56 | 56 |
observe.config.checkServerVersion.description=Verificar la correspondencia exacta entre las versiones de cliente y servidor REST?
|
| 57 |
+observe.config.client.backupFiles.timeout.description=Backup files delete (in hours) \#TODO
|
|
| 58 |
+observe.config.client.feedbackFiles.timeout.description=Feedback files delete (in hours) \#TODO
|
|
| 59 |
+observe.config.client.logFiles.timeout.description=Log files delete (in hours) \#TODO
|
|
| 60 |
+observe.config.client.temporaryFiles.timeout.description=Temporary files delete (in hours) \#TODO
|
|
| 57 | 61 |
observe.config.configFileName.description=Nombre del archivo de configuración
|
| 58 | 62 |
observe.config.coordinate.format=Formato de posición (DMD, DD, DMS)
|
| 59 | 63 |
observe.config.db.locale=Idioma del referencial
|
| ... | ... | @@ -129,7 +133,6 @@ observe.config.speciesList.seine.observation.targetCatch=Especies par las captur |
| 129 | 133 |
observe.config.swingSessionFile.description=Copia de seguridad del estado del UI.
|
| 130 | 134 |
observe.config.temperature.format=Unidad de temperatura
|
| 131 | 135 |
observe.config.temporaryDirectory.description=Directorio temporal por defecto
|
| 132 |
-observe.config.temporaryFilesTimeout.description=Temporary files delete (in hours) \#TODO
|
|
| 133 | 136 |
observe.config.ui.autoPopupNumberEditor=Para mostrar automáticamente el editor numérico durante la edición de un número
|
| 134 | 137 |
observe.config.ui.blockStateColor=Color of block state \#TODO
|
| 135 | 138 |
observe.config.ui.busyStateColor=Color of busy state \#TODO
|
| ... | ... | @@ -54,6 +54,10 @@ observe.config.category.ui.description=Configuration des interfaces graphiques |
| 54 | 54 |
observe.config.category.ui.navigation=Navigation
|
| 55 | 55 |
observe.config.category.ui.navigation.description=configuration de l'arbre de navigation
|
| 56 | 56 |
observe.config.checkServerVersion.description=Vérifier la correspondance exacte entre les versions du client et serveur REST ?
|
| 57 |
+observe.config.client.backupFiles.timeout.description=Nettoyage des fichiers de sauvegarde (en heures)
|
|
| 58 |
+observe.config.client.feedbackFiles.timeout.description=Nettoyage des fichiers de retour d'expérience (en heures)
|
|
| 59 |
+observe.config.client.logFiles.timeout.description=Nettoyage des fichiers de log (en heures)
|
|
| 60 |
+observe.config.client.temporaryFiles.timeout.description=Nettoyage des fichiers temporaires (en heures)
|
|
| 57 | 61 |
observe.config.configFileName.description=Le nom du fichier de configuration
|
| 58 | 62 |
observe.config.coordinate.format=Format des positions (DMD, DD, DMS)
|
| 59 | 63 |
observe.config.db.locale=La langue du référentiel
|
| ... | ... | @@ -129,7 +133,6 @@ observe.config.speciesList.seine.observation.targetCatch=Espèces pour les captu |
| 129 | 133 |
observe.config.swingSessionFile.description=Fichier de sauvegarde des états des UI.
|
| 130 | 134 |
observe.config.temperature.format=Unité de température
|
| 131 | 135 |
observe.config.temporaryDirectory.description=Le répertoire temporaire par défaut
|
| 132 |
-observe.config.temporaryFilesTimeout.description=Nettoyage des fichiers temporaires (en heures)
|
|
| 133 | 136 |
observe.config.ui.autoPopupNumberEditor=Pour afficher automatiquement l'éditeur numérique lors de l'édition d'un nombre
|
| 134 | 137 |
observe.config.ui.blockStateColor=Couleur lorsque l'on bloque une partie de l'application
|
| 135 | 138 |
observe.config.ui.busyStateColor=Couleur lorsque l'application est occupée
|
| ... | ... | @@ -155,7 +155,7 @@ |
| 155 | 155 |
|
| 156 | 156 |
<!-- <lib.version.java4all.topia>1.35</lib.version.java4all.topia>-->
|
| 157 | 157 |
<!-- <lib.version.java4all.eugene>3.0-alpha-38</lib.version.java4all.eugene>-->
|
| 158 |
- <lib.version.java4all.jaxx>3.0-alpha-86</lib.version.java4all.jaxx>
|
|
| 158 |
+ <lib.version.java4all.jaxx>3.0-alpha-87</lib.version.java4all.jaxx>
|
|
| 159 | 159 |
<!--<lib.version.java4all.application-context>1.0.3-SNAPSHOT</lib.version.java4all.application-context>-->
|
| 160 | 160 |
<!--<lib.version.java4all.application-template>1.0.2-SNAPSHOT</lib.version.java4all.application-template>-->
|
| 161 | 161 |
<!--<lib.version.java4all.i18n>4.0-beta-3-SNAPSHOT</lib.version.java4all.i18n>-->
|
| ... | ... | @@ -104,7 +104,7 @@ type = int |
| 104 | 104 |
defaultValue = 30000
|
| 105 | 105 |
|
| 106 | 106 |
[option temporaryFilesTimeout]
|
| 107 |
-description = observe.config.temporaryFilesTimeout.description
|
|
| 107 |
+description = observe.config.client.temporaryFiles.timeout.description
|
|
| 108 | 108 |
key = observeweb.temporaryFilesTimeout
|
| 109 | 109 |
type = int
|
| 110 | 110 |
defaultValue = 120
|
| 1 | 1 |
ObserveWebApplicationConfig.description
|
| 2 |
-observe.config.temporaryFilesTimeout.description
|
|
| 2 |
+observe.config.client.temporaryFiles.timeout.description
|
|
| 3 | 3 |
observe.model.version
|
| 4 | 4 |
observeweb.adminApiKey.description
|
| 5 | 5 |
observeweb.baseDirectory.description
|
| ... | ... | @@ -37,6 +37,8 @@ import java.nio.charset.StandardCharsets; |
| 37 | 37 |
import java.nio.file.Files;
|
| 38 | 38 |
import java.nio.file.Path;
|
| 39 | 39 |
import java.nio.file.Paths;
|
| 40 |
+import java.util.Collections;
|
|
| 41 |
+import java.util.Map;
|
|
| 40 | 42 |
|
| 41 | 43 |
/**
|
| 42 | 44 |
* La configuration de l'application web.
|
| ... | ... | @@ -49,9 +51,8 @@ import java.nio.file.Paths; |
| 49 | 51 |
hints = {TemplateGeneratorConfig.class, CleanTemporaryFilesTaskConfiguration.class})
|
| 50 | 52 |
public class ServerConfig extends GeneratedServerConfig implements CleanTemporaryFilesTaskConfiguration {
|
| 51 | 53 |
|
| 52 |
- private static Logger log = LogManager.getLogger(ServerConfig.class);
|
|
| 53 |
- |
|
| 54 | 54 |
private static final String DEFAULT_OBSERVE_WEB_CONFIGURATION_FILENAME = "observe-server.conf";
|
| 55 |
+ private static Logger log = LogManager.getLogger(ServerConfig.class);
|
|
| 55 | 56 |
|
| 56 | 57 |
public static ServerConfig fromContextPath(String contextPath) {
|
| 57 | 58 |
ServerConfig config = new ServerConfig();
|
| ... | ... | @@ -70,6 +71,11 @@ public class ServerConfig extends GeneratedServerConfig implements CleanTemporar |
| 70 | 71 |
delegate.setConfigFileName(confFileName);
|
| 71 | 72 |
}
|
| 72 | 73 |
|
| 74 |
+ @Override
|
|
| 75 |
+ public Map<Path, Integer> getTemporaryDirectoriesAndTimeout() {
|
|
| 76 |
+ return Collections.singletonMap(getTemporaryDirectory().toPath(), getTemporaryFilesTimeout());
|
|
| 77 |
+ }
|
|
| 78 |
+ |
|
| 73 | 79 |
public void init(String... args) {
|
| 74 | 80 |
|
| 75 | 81 |
log.info("Starts to init ObServe server configuration...");
|
| 1 | 1 |
ObserveWebApplicationConfig.description=ObServe Web configuration
|
| 2 |
-observe.config.temporaryFilesTimeout.description=Temporary files delete (in hours)
|
|
| 2 |
+observe.config.client.temporaryFiles.timeout.description=Temporary files delete (in hours)
|
|
| 3 | 3 |
observe.model.version=Model version
|
| 4 | 4 |
observe.ui.datasource.storage.error.rest.adminApiKey.invalid=Admin key not valid
|
| 5 | 5 |
observe.ui.datasource.storage.error.rest.adminApiKey.required=Admin key not found
|
| 1 | 1 |
ObserveWebApplicationConfig.description=Configuración de Observe web
|
| 2 |
-observe.config.temporaryFilesTimeout.description=Temporary files delete (in hours) \#TODO
|
|
| 2 |
+observe.config.client.temporaryFiles.timeout.description=Temporary files delete (in hours) \#TODO
|
|
| 3 | 3 |
observe.model.version=Versión del modelo
|
| 4 | 4 |
observe.ui.datasource.storage.error.rest.adminApiKey.invalid=Admin key not valid \#TODO
|
| 5 | 5 |
observe.ui.datasource.storage.error.rest.adminApiKey.required=Admin key not found \#TODO
|
| 1 | 1 |
ObserveWebApplicationConfig.description=Observe web Configuration
|
| 2 |
-observe.config.temporaryFilesTimeout.description=Nettoyage des fichiers temporaires (en heures)
|
|
| 2 |
+observe.config.client.temporaryFiles.timeout.description=Nettoyage des fichiers temporaires (en heures)
|
|
| 3 | 3 |
observe.model.version=Version du modèle
|
| 4 | 4 |
observe.ui.datasource.storage.error.rest.adminApiKey.invalid=Pas de clef admin trouvée
|
| 5 | 5 |
observe.ui.datasource.storage.error.rest.adminApiKey.required=Clef admin non valide
|
| ... | ... | @@ -49,10 +49,6 @@ public class CleanTemporaryFilesTask extends TimerTask { |
| 49 | 49 |
|
| 50 | 50 |
private final CleanTemporaryFilesTaskConfiguration configuration;
|
| 51 | 51 |
|
| 52 |
- public CleanTemporaryFilesTask(CleanTemporaryFilesTaskConfiguration configuration) {
|
|
| 53 |
- this.configuration = configuration;
|
|
| 54 |
- }
|
|
| 55 |
- |
|
| 56 | 52 |
public static Timer create(CleanTemporaryFilesTaskConfiguration configuration) {
|
| 57 | 53 |
Timer result = new Timer("Delete temporary files daemon", true);
|
| 58 | 54 |
result.scheduleAtFixedRate(new CleanTemporaryFilesTask(configuration), new Date(), TimeUnit.HOURS.toMillis(1));
|
| ... | ... | @@ -65,16 +61,22 @@ public class CleanTemporaryFilesTask extends TimerTask { |
| 65 | 61 |
}
|
| 66 | 62 |
}
|
| 67 | 63 |
|
| 64 |
+ public CleanTemporaryFilesTask(CleanTemporaryFilesTaskConfiguration configuration) {
|
|
| 65 |
+ this.configuration = configuration;
|
|
| 66 |
+ }
|
|
| 67 |
+ |
|
| 68 | 68 |
@Override
|
| 69 | 69 |
public void run() {
|
| 70 |
+ configuration.getTemporaryDirectoriesAndTimeout().forEach(this::run);
|
|
| 71 |
+ }
|
|
| 70 | 72 |
|
| 71 |
- Path temporaryDirectory = configuration.getTemporaryDirectory().toPath();
|
|
| 73 |
+ private void run(Path temporaryDirectory, Integer timeout) {
|
|
| 72 | 74 |
if (Files.notExists(temporaryDirectory)) {
|
| 73 | 75 |
return;
|
| 74 | 76 |
}
|
| 75 | 77 |
Calendar calendar = Calendar.getInstance();
|
| 76 | 78 |
calendar.setTime(new Date());
|
| 77 |
- calendar.add(Calendar.HOUR_OF_DAY, -configuration.getTemporaryFilesTimeout());
|
|
| 79 |
+ calendar.add(Calendar.HOUR_OF_DAY, -timeout);
|
|
| 78 | 80 |
Date deleteBefore = calendar.getTime();
|
| 79 | 81 |
long deleteBeforeTime = deleteBefore.getTime();
|
| 80 | 82 |
|
| ... | ... | @@ -22,7 +22,8 @@ package fr.ird.observe.services.service; |
| 22 | 22 |
* #L%
|
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 |
-import java.io.File;
|
|
| 25 |
+import java.nio.file.Path;
|
|
| 26 |
+import java.util.Map;
|
|
| 26 | 27 |
|
| 27 | 28 |
/**
|
| 28 | 29 |
* @author Tony Chemit - dev@tchemit.fr
|
| ... | ... | @@ -30,11 +31,6 @@ import java.io.File; |
| 30 | 31 |
*/
|
| 31 | 32 |
public interface CleanTemporaryFilesTaskConfiguration {
|
| 32 | 33 |
|
| 33 |
- File getTemporaryDirectory();
|
|
| 34 |
+ Map<Path, Integer> getTemporaryDirectoriesAndTimeout();
|
|
| 34 | 35 |
|
| 35 |
- void setTemporaryDirectory(File temporaryDirectory);
|
|
| 36 |
- |
|
| 37 |
- int getTemporaryFilesTimeout();
|
|
| 38 |
- |
|
| 39 |
- void setTemporaryFilesTimeout(int temporaryFilesTimeout);
|
|
| 40 | 36 |
}
|