| ... |
... |
@@ -8,12 +8,12 @@ |
|
8
|
8
|
* it under the terms of the GNU General Public License as
|
|
9
|
9
|
* published by the Free Software Foundation, either version 3 of the
|
|
10
|
10
|
* License, or (at your option) any later version.
|
|
11
|
|
- *
|
|
|
11
|
+ *
|
|
12
|
12
|
* This program is distributed in the hope that it will be useful,
|
|
13
|
13
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
14
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
15
|
* GNU General Public License for more details.
|
|
16
|
|
- *
|
|
|
16
|
+ *
|
|
17
|
17
|
* You should have received a copy of the GNU General Public
|
|
18
|
18
|
* License along with this program. If not, see
|
|
19
|
19
|
* <http://www.gnu.org/licenses/gpl-3.0.html>.
|
| ... |
... |
@@ -30,6 +30,8 @@ import fr.ird.observe.client.constants.DbMode; |
|
30
|
30
|
import fr.ird.observe.dto.FloatingObjectPreset;
|
|
31
|
31
|
import fr.ird.observe.dto.presets.RemoteDataSourceConfiguration;
|
|
32
|
32
|
import fr.ird.observe.dto.presets.ServerDataSourceConfiguration;
|
|
|
33
|
+import fr.ird.observe.navigation.model.edit.ObserveEditModel;
|
|
|
34
|
+import fr.ird.observe.navigation.model.select.ObserveSelectModel;
|
|
33
|
35
|
import fr.ird.observe.services.gson.ObserveDtoGsonSupplier;
|
|
34
|
36
|
import io.ultreia.java4all.config.ApplicationConfig;
|
|
35
|
37
|
import io.ultreia.java4all.config.ApplicationConfigInit;
|
| ... |
... |
@@ -104,14 +106,14 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre |
|
104
|
106
|
//FIXME
|
|
105
|
107
|
private final ImmutableSet<String> longlineVesselTypeIds = ImmutableSet.copyOf(
|
|
106
|
108
|
Sets.newHashSet("fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.044156847891821505",
|
|
107
|
|
- "fr.ird.observe.entities.referentiel.VesselType#1239832675736#0.8708229847859869",
|
|
108
|
|
- "fr.ird.observe.entities.referentiel.VesselType#1239832686137#0.1"));
|
|
|
109
|
+ "fr.ird.observe.entities.referentiel.VesselType#1239832675736#0.8708229847859869",
|
|
|
110
|
+ "fr.ird.observe.entities.referentiel.VesselType#1239832686137#0.1"));
|
|
109
|
111
|
private final ImmutableSet<String> seineVesselTypeIds = ImmutableSet.copyOf(
|
|
110
|
112
|
Sets.newHashSet("fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.044156847891821505",
|
|
111
|
|
- "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.307197212385357",
|
|
112
|
|
- "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.7380146830307519",
|
|
113
|
|
- "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.9086075071905084",
|
|
114
|
|
- "fr.ird.observe.entities.referentiel.VesselType#1239832675737#0.43324169605639407"));
|
|
|
113
|
+ "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.307197212385357",
|
|
|
114
|
+ "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.7380146830307519",
|
|
|
115
|
+ "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.9086075071905084",
|
|
|
116
|
+ "fr.ird.observe.entities.referentiel.VesselType#1239832675737#0.43324169605639407"));
|
|
115
|
117
|
private final SimpleDateFormat dateFormat = new SimpleDateFormat();
|
|
116
|
118
|
/**
|
|
117
|
119
|
* un drapeau pour savoir s'il faut lancer l'interface graphique. Cette
|
| ... |
... |
@@ -148,10 +150,6 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre |
|
148
|
150
|
private ImmutableList<RemoteDataSourceConfiguration> remoteDataSourceConfigurationList;
|
|
149
|
151
|
private ObserveDtoGsonSupplier gsonSupplier;
|
|
150
|
152
|
|
|
151
|
|
- static ClientConfig forTest() {
|
|
152
|
|
- return new ClientConfig(ApplicationConfigInit.forAllScopesWithout(ApplicationConfigScope.HOME, ApplicationConfigScope.ENV, ApplicationConfigScope.SYSTEM),DEFAULT_OBSERVE_SWING_CONFIGURATION_FILENAME);
|
|
153
|
|
- }
|
|
154
|
|
-
|
|
155
|
153
|
public ClientConfig() {
|
|
156
|
154
|
this(DEFAULT_OBSERVE_SWING_CONFIGURATION_FILENAME);
|
|
157
|
155
|
}
|
| ... |
... |
@@ -162,13 +160,17 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre |
|
162
|
160
|
delegate.setConfigFileName(configFileName);
|
|
163
|
161
|
}
|
|
164
|
162
|
|
|
165
|
|
- private ClientConfig(ApplicationConfigInit init,String configFileName) {
|
|
|
163
|
+ private ClientConfig(ApplicationConfigInit init, String configFileName) {
|
|
166
|
164
|
super(init);
|
|
167
|
165
|
ApplicationConfig delegate = get();
|
|
168
|
166
|
delegate.setEncoding(StandardCharsets.UTF_8.name());
|
|
169
|
167
|
delegate.setConfigFileName(configFileName);
|
|
170
|
168
|
}
|
|
171
|
169
|
|
|
|
170
|
+ static ClientConfig forTest() {
|
|
|
171
|
+ return new ClientConfig(ApplicationConfigInit.forAllScopesWithout(ApplicationConfigScope.HOME, ApplicationConfigScope.ENV, ApplicationConfigScope.SYSTEM), DEFAULT_OBSERVE_SWING_CONFIGURATION_FILENAME);
|
|
|
172
|
+ }
|
|
|
173
|
+
|
|
172
|
174
|
@Override
|
|
173
|
175
|
protected Supplier<Gson> getGsonSupplier() {
|
|
174
|
176
|
return gsonSupplier == null ? gsonSupplier = new ObserveDtoGsonSupplier() : gsonSupplier;
|
| ... |
... |
@@ -217,7 +219,7 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre |
|
217
|
219
|
applicationConfig.setDefaultOption(APPLICATION_VERSION, version.getVersion());
|
|
218
|
220
|
}
|
|
219
|
221
|
applicationConfig.parse(args);
|
|
220
|
|
- if (version ==null) {
|
|
|
222
|
+ if (version == null) {
|
|
221
|
223
|
removeSnapshotFromVersion();
|
|
222
|
224
|
}
|
|
223
|
225
|
}
|
| ... |
... |
@@ -364,6 +366,16 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre |
|
364
|
366
|
get().saveForUser(unsavables);
|
|
365
|
367
|
}
|
|
366
|
368
|
|
|
|
369
|
+ public int getNavigationEditModelCount() {
|
|
|
370
|
+ ObserveEditModel model = getNavigationEditModel();
|
|
|
371
|
+ return model == null ? 0 : model.count();
|
|
|
372
|
+ }
|
|
|
373
|
+
|
|
|
374
|
+ public int getNavigationSelectModelCount() {
|
|
|
375
|
+ ObserveSelectModel model = getNavigationSelectModel();
|
|
|
376
|
+ return model == null ? 0 : model.count();
|
|
|
377
|
+ }
|
|
|
378
|
+
|
|
367
|
379
|
public void removeJaxxPropertyChangeListener() {
|
|
368
|
380
|
// pcs.getPropertyChangeListeners();
|
|
369
|
381
|
// List<String> tmp = new ArrayList<>();
|