Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe

Commits:

20 changed files:

Changes:

  • client/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java
    ... ... @@ -99,8 +99,9 @@ import fr.ird.observe.services.service.referential.ReferentialService;
    99 99
     import fr.ird.observe.services.service.sql.SqlScriptProducerService;
    
    100 100
     import fr.ird.observe.spi.map.ImmutableDtoMap;
    
    101 101
     import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    102
    -import org.apache.logging.log4j.Logger;
    
    102
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    103 103
     import org.apache.logging.log4j.LogManager;
    
    104
    +import org.apache.logging.log4j.Logger;
    
    104 105
     import org.jdesktop.beans.AbstractSerializableBean;
    
    105 106
     import org.nuiton.version.Version;
    
    106 107
     
    
    ... ... @@ -561,7 +562,7 @@ public class ObserveSwingDataSource extends AbstractSerializableBean implements
    561 562
             return ObserveServiceMainFactory.get().newService(observeServiceInitializer, serviceType);
    
    562 563
         }
    
    563 564
     
    
    564
    -    public ImmutableSetDtoMap<ReferentialDtoReference> getReferentialMap(ImmutableSetDtoMap<String> referentialIds) {
    
    565
    +    public ImmutableSetDtoMap<ReferentialDtoReference> getReferentialMap(ImmutableSetStringMap referentialIds) {
    
    565 566
     
    
    566 567
             ImmutableSetDtoMap.Builder<ReferentialDtoReference> result = ImmutableSetDtoMap.builder();
    
    567 568
             for (Class<? extends ReferentialDtoReference> dtoType : referentialIds.referentialReferenceTypes()) {
    

  • client/src/main/java/fr/ird/observe/client/ui/admin/export/ExportUIHandler.java
    ... ... @@ -50,9 +50,10 @@ import fr.ird.observe.services.service.referential.MissingReferentialRequest;
    50 50
     import fr.ird.observe.services.service.referential.MissingReferentialResult;
    
    51 51
     import fr.ird.observe.services.service.referential.ReferentialService;
    
    52 52
     import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    53
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    53 54
     import org.apache.commons.collections4.CollectionUtils;
    
    54
    -import org.apache.logging.log4j.Logger;
    
    55 55
     import org.apache.logging.log4j.LogManager;
    
    56
    +import org.apache.logging.log4j.Logger;
    
    56 57
     import org.nuiton.decorator.Decorator;
    
    57 58
     import org.nuiton.jaxx.runtime.spi.UIHandler;
    
    58 59
     import org.nuiton.jaxx.runtime.swing.editor.MyDefaultCellEditor;
    
    ... ... @@ -266,7 +267,7 @@ public class ExportUIHandler extends AdminTabUIHandler<ExportUI> implements UIHa
    266 267
                     if (log.isInfoEnabled()) {
    
    267 268
                         log.info("Chargement du réferentiel de la base centrale.");
    
    268 269
                     }
    
    269
    -                ImmutableSetDtoMap<String> centralSourceReferential = centralReferentialService.getReferentialIds();
    
    270
    +                ImmutableSetStringMap centralSourceReferential = centralReferentialService.getReferentialIds();
    
    270 271
     
    
    271 272
                     List<String> tripIds = tripEntries.stream().map(TripEntry::getTripId).collect(Collectors.toList());
    
    272 273
     
    

  • client/src/main/java/fr/ird/observe/client/ui/admin/synchronize/data/DataSynchroModel.java
    ... ... @@ -30,8 +30,8 @@ import fr.ird.observe.client.ui.admin.config.ConfigUI;
    30 30
     import fr.ird.observe.client.ui.admin.synchronize.data.task.DataSynchronizeTaskSupport;
    
    31 31
     import fr.ird.observe.client.ui.tree.selection.SelectionTreeModel;
    
    32 32
     import fr.ird.observe.client.ui.util.ProgressModel;
    
    33
    -import org.apache.logging.log4j.Logger;
    
    34 33
     import org.apache.logging.log4j.LogManager;
    
    34
    +import org.apache.logging.log4j.Logger;
    
    35 35
     
    
    36 36
     import javax.swing.DefaultListModel;
    
    37 37
     import javax.swing.border.TitledBorder;
    
    ... ... @@ -64,7 +64,7 @@ public class DataSynchroModel extends AdminActionModel {
    64 64
     
    
    65 65
         /** les données sélectionnées sur le panneau de droite. */
    
    66 66
         protected SelectionTreeModel rightSelectionDataModel;
    
    67
    -
    
    67
    +    protected boolean insertMissingReferentials;
    
    68 68
         protected final DefaultListModel<DataSynchronizeTaskSupport> tasks;
    
    69 69
     
    
    70 70
         private final ProgressModel progressModel = new ProgressModel();
    
    ... ... @@ -131,6 +131,14 @@ public class DataSynchroModel extends AdminActionModel {
    131 131
             return rightSelectionDataModel;
    
    132 132
         }
    
    133 133
     
    
    134
    +    public boolean isInsertMissingReferentials() {
    
    135
    +        return insertMissingReferentials;
    
    136
    +    }
    
    137
    +
    
    138
    +    public void setInsertMissingReferentials(boolean insertMissingReferentials) {
    
    139
    +        this.insertMissingReferentials = insertMissingReferentials;
    
    140
    +    }
    
    141
    +
    
    134 142
         public void populateLeftSelectionModel() {
    
    135 143
             populateSelectionModel(leftSource, leftSelectionDataModel, LEFT_SELECTION_MODEL_CHANGED_PROPERTY_NAME);
    
    136 144
         }
    

  • client/src/main/java/fr/ird/observe/client/ui/admin/synchronize/data/DataSynchroUI.jaxx
    ... ... @@ -49,6 +49,9 @@
    49 49
         </Table>
    
    50 50
       </JPanel>
    
    51 51
       <JPanel id='NEED_FIX_content'>
    
    52
    +    <JCheckBox id="insertMissingReferentials" constraints='BorderLayout.NORTH'
    
    53
    +               onStateChanged='getStepModel().setInsertMissingReferentials(((JCheckBox)event.getSource()).isSelected())'/>
    
    54
    +
    
    52 55
         <JSplitPane id="contentSplitPane" constraints='BorderLayout.CENTER'>
    
    53 56
           <Table id='contentNorth' fill="both" weighty="1">
    
    54 57
             <row>
    

  • client/src/main/java/fr/ird/observe/client/ui/admin/synchronize/data/DataSynchroUI.jcss
    ... ... @@ -45,6 +45,11 @@
    45 45
       mnemonic:Q;
    
    46 46
     }
    
    47 47
     
    
    48
    +#insertMissingReferentials {
    
    49
    +  text:"observe.action.export.requiredInsertMissingReferentials";
    
    50
    +  selected:{stepModel.isInsertMissingReferentials()};
    
    51
    +}
    
    52
    +
    
    48 53
     #leftTree {
    
    49 54
       minimumSize:{UIHelper.newMinDimension()};
    
    50 55
       font-size:11;
    

  • client/src/main/java/fr/ird/observe/client/ui/admin/synchronize/data/DataSynchroUIHandler.java
    ... ... @@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.admin.synchronize.data;
    10 10
      * it under the terms of the GNU General Public License as
    
    11 11
      * published by the Free Software Foundation, either version 3 of the
    
    12 12
      * License, or (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU General Public
    
    20 20
      * License along with this program.  If not, see
    
    21 21
      * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    ... ... @@ -33,12 +33,17 @@ import fr.ird.observe.client.ui.admin.synchronize.data.task.CopyToRightDataSynch
    33 33
     import fr.ird.observe.client.ui.admin.synchronize.data.task.DataSynchronizeTaskSupport;
    
    34 34
     import fr.ird.observe.client.ui.admin.synchronize.data.task.DeleteFromLeftDataSynchronizeTask;
    
    35 35
     import fr.ird.observe.client.ui.admin.synchronize.data.task.DeleteFromRightDataSynchronizeTask;
    
    36
    +import fr.ird.observe.client.ui.content.ref.usage.UsageForDisplayUI;
    
    36 37
     import fr.ird.observe.client.ui.tree.selection.SelectionTree;
    
    37 38
     import fr.ird.observe.client.ui.tree.selection.SelectionTreeModel;
    
    38 39
     import fr.ird.observe.client.ui.util.ProgressModel;
    
    40
    +import fr.ird.observe.client.ui.util.UIHelper;
    
    39 41
     import fr.ird.observe.dto.decoration.DecoratorService;
    
    42
    +import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper;
    
    40 43
     import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator;
    
    41 44
     import fr.ird.observe.dto.reference.DataDtoReference;
    
    45
    +import fr.ird.observe.dto.reference.DtoReference;
    
    46
    +import fr.ird.observe.dto.reference.ReferentialDtoReference;
    
    42 47
     import fr.ird.observe.dto.referential.ProgramReference;
    
    43 48
     import fr.ird.observe.services.service.data.DeleteTripRequest;
    
    44 49
     import fr.ird.observe.services.service.data.DeleteTripResult;
    
    ... ... @@ -47,14 +52,25 @@ import fr.ird.observe.services.service.data.ExportTripResult;
    47 52
     import fr.ird.observe.services.service.data.ImportTripRequest;
    
    48 53
     import fr.ird.observe.services.service.data.ImportTripResult;
    
    49 54
     import fr.ird.observe.services.service.data.TripManagementService;
    
    55
    +import fr.ird.observe.services.service.referential.MissingReferentialRequest;
    
    56
    +import fr.ird.observe.services.service.referential.MissingReferentialResult;
    
    57
    +import fr.ird.observe.services.service.referential.ReferentialService;
    
    58
    +import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    59
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    60
    +import org.apache.logging.log4j.LogManager;
    
    61
    +import org.apache.logging.log4j.Logger;
    
    62
    +import org.nuiton.decorator.Decorator;
    
    50 63
     import org.nuiton.jaxx.runtime.spi.UIHandler;
    
    51 64
     import org.nuiton.jaxx.runtime.swing.wizard.ext.WizardState;
    
    52 65
     
    
    53 66
     import javax.swing.DefaultListModel;
    
    67
    +import javax.swing.JOptionPane;
    
    54 68
     import javax.swing.border.TitledBorder;
    
    55 69
     import java.awt.Color;
    
    70
    +import java.util.LinkedHashSet;
    
    56 71
     import java.util.List;
    
    57 72
     import java.util.Map;
    
    73
    +import java.util.Set;
    
    58 74
     
    
    59 75
     import static org.nuiton.i18n.I18n.n;
    
    60 76
     import static org.nuiton.i18n.I18n.t;
    
    ... ... @@ -67,6 +83,8 @@ import static org.nuiton.i18n.I18n.t;
    67 83
      */
    
    68 84
     public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> implements UIHandler<DataSynchroUI> {
    
    69 85
     
    
    86
    +    private static final Logger log = LogManager.getLogger(DataSynchroUIHandler.class);
    
    87
    +
    
    70 88
         @Override
    
    71 89
         public void afterInit(DataSynchroUI ui) {
    
    72 90
             super.afterInit(this.ui);
    
    ... ... @@ -122,13 +140,10 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    122 140
         }
    
    123 141
     
    
    124 142
         public void doStartAction() {
    
    125
    -
    
    126 143
             addAdminWorker(getUi().getStartAction().getToolTipText(), this::doStartAction0);
    
    127
    -
    
    128 144
         }
    
    129 145
     
    
    130 146
         public void addCopyToLeftTasks() {
    
    131
    -
    
    132 147
             SelectionTreeModel rightSelectionDataModel = getStepModel().getRightSelectionDataModel();
    
    133 148
             SelectionTreeModel leftSelectionDataModel = getStepModel().getLeftSelectionDataModel();
    
    134 149
             Map<ProgramReference, List<DataDtoReference<?, ?>>> selectedDataByProgram = rightSelectionDataModel.getSelectedDataByProgram();
    
    ... ... @@ -138,17 +153,14 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    138 153
                 for (DataDtoReference trip : entry.getValue()) {
    
    139 154
                     boolean tripExistOnLeft = leftSelectionDataModel.containsData(program, trip);
    
    140 155
                     getStepModel().addTask(new CopyToLeftDataSynchronizeTask(program, trip, tripExistOnLeft));
    
    141
    -
    
    142 156
                     if (tripExistOnLeft) {
    
    143 157
                         leftSelectionDataModel.removeTrip(program, trip);
    
    144 158
                     }
    
    145 159
                 }
    
    146 160
             }
    
    147
    -
    
    148 161
         }
    
    149 162
     
    
    150 163
         public void addCopyToRightTasks() {
    
    151
    -
    
    152 164
             SelectionTreeModel leftSelectionDataModel = getStepModel().getLeftSelectionDataModel();
    
    153 165
             SelectionTreeModel rightSelectionDataModel = getStepModel().getRightSelectionDataModel();
    
    154 166
             Map<ProgramReference, List<DataDtoReference<?, ?>>> selectedDataByProgram = leftSelectionDataModel.getSelectedDataByProgram();
    
    ... ... @@ -156,20 +168,16 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    156 168
             for (Map.Entry<ProgramReference, List<DataDtoReference<?, ?>>> entry : selectedDataByProgram.entrySet()) {
    
    157 169
                 ProgramReference program = entry.getKey();
    
    158 170
                 for (DataDtoReference trip : entry.getValue()) {
    
    159
    -
    
    160 171
                     boolean tripExistOnRight = rightSelectionDataModel.containsData(program, trip);
    
    161 172
                     getStepModel().addTask(new CopyToRightDataSynchronizeTask(program, trip, tripExistOnRight));
    
    162
    -
    
    163 173
                     if (tripExistOnRight) {
    
    164 174
                         rightSelectionDataModel.removeTrip(program, trip);
    
    165 175
                     }
    
    166 176
                 }
    
    167 177
             }
    
    168
    -
    
    169 178
         }
    
    170 179
     
    
    171 180
         public void addDeleteFromLeftTasks() {
    
    172
    -
    
    173 181
             SelectionTreeModel selectionDataModel = getStepModel().getLeftSelectionDataModel();
    
    174 182
             Map<ProgramReference, List<DataDtoReference<?, ?>>> selectedDataByProgram = selectionDataModel.getSelectedDataByProgram();
    
    175 183
             selectionDataModel.removeAllSelectedData();
    
    ... ... @@ -182,7 +190,6 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    182 190
         }
    
    183 191
     
    
    184 192
         public void addDeleteFromRightTasks() {
    
    185
    -
    
    186 193
             SelectionTreeModel selectionDataModel = getStepModel().getRightSelectionDataModel();
    
    187 194
             Map<ProgramReference, List<DataDtoReference<?, ?>>> selectedDataByProgram = selectionDataModel.getSelectedDataByProgram();
    
    188 195
             selectionDataModel.removeAllSelectedData();
    
    ... ... @@ -195,9 +202,7 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    195 202
         }
    
    196 203
     
    
    197 204
         public void doExecuteAction() {
    
    198
    -
    
    199 205
             addAdminWorker(getUi().getStartAction().getToolTipText(), this::doExecuteAction0);
    
    200
    -
    
    201 206
         }
    
    202 207
     
    
    203 208
         private WizardState doStartAction0() {
    
    ... ... @@ -214,11 +219,11 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    214 219
             ObserveSwingDataSource rightSource = configModel.getSafeCentralSource(true);
    
    215 220
             stepModel.setRightSource(rightSource);
    
    216 221
     
    
    217
    -//        tabUI.getLeftTreePane().setBorder(new TitledBorder(configModel.getLocalSourceModel().getLabel()));
    
    218 222
             stepModel.populateLeftSelectionModel();
    
    219
    -        sendMessage(t("observe.actions.synchro.referential.message.data.leftData.loaded"));
    
    223
    +        String leftLabelWithUrl = configModel.getLocalSourceModel().getLabelWithUrl();
    
    224
    +        sendMessage(t("observe.actions.synchro.data.message.data.loaded", leftLabelWithUrl));
    
    220 225
     
    
    221
    -        TitledBorder leftBorder = new TitledBorder(configModel.getLocalSourceModel().getLabelWithUrl());
    
    226
    +        TitledBorder leftBorder = new TitledBorder(leftLabelWithUrl);
    
    222 227
             boolean leftCanWriteData = configModel.getLocalSourceModel().getDataSourceInformation().canWriteData();
    
    223 228
             leftBorder.setTitleColor(leftCanWriteData ? Color.GREEN : Color.RED);
    
    224 229
             tabUI.getLeftTreePane().setBorder(leftBorder);
    
    ... ... @@ -228,11 +233,11 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    228 233
             }
    
    229 234
             configUI.getLocalSourceConfig().setBorder(leftBorder);
    
    230 235
     
    
    231
    -//        tabUI.getRightTreePane().setBorder(new TitledBorder(configModel.getCentralSourceModel().getLabel()));
    
    232 236
             stepModel.populateRightSelectionModel();
    
    233
    -        sendMessage(t("observe.actions.synchro.referential.message.data.rightData.loaded"));
    
    237
    +        String rightLabelWithUrl = configModel.getCentralSourceModel().getLabelWithUrl();
    
    238
    +        sendMessage(t("observe.actions.synchro.data.message.data.loaded", rightLabelWithUrl));
    
    234 239
     
    
    235
    -        TitledBorder rightBorder = new TitledBorder(configModel.getCentralSourceModel().getLabelWithUrl());
    
    240
    +        TitledBorder rightBorder = new TitledBorder(rightLabelWithUrl);
    
    236 241
             boolean rightCanWriteData = configModel.getCentralSourceModel().getDataSourceInformation().canWriteData();
    
    237 242
             rightBorder.setTitleColor(rightCanWriteData ? Color.GREEN : Color.RED);
    
    238 243
             tabUI.getRightTreePane().setBorder(rightBorder);
    
    ... ... @@ -256,17 +261,161 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    256 261
             int size = tasks.size();
    
    257 262
     
    
    258 263
             int stepsCount = 0;
    
    264
    +        Set<String> idsToCopyToLeft = new LinkedHashSet<>();
    
    265
    +        Set<String> idsToCopyToRight = new LinkedHashSet<>();
    
    259 266
             for (int i = 0; i < size; i++) {
    
    267
    +
    
    260 268
                 DataSynchronizeTaskSupport task = tasks.getElementAt(i);
    
    261 269
                 stepsCount++;
    
    262
    -            if (task instanceof CopyToLeftDataSynchronizeTask || task instanceof CopyToRightDataSynchronizeTask) {
    
    270
    +            if (task instanceof CopyToLeftDataSynchronizeTask) {
    
    271
    +                stepsCount++;
    
    272
    +                idsToCopyToLeft.add(task.getTrip().getId());
    
    273
    +            }
    
    274
    +            if (task instanceof CopyToRightDataSynchronizeTask) {
    
    263 275
                     stepsCount++;
    
    276
    +                idsToCopyToRight.add(task.getTrip().getId());
    
    264 277
                 }
    
    265 278
             }
    
    279
    +        boolean copyToLeft = !idsToCopyToLeft.isEmpty();
    
    280
    +        if (copyToLeft) {
    
    281
    +            stepsCount += 3;
    
    282
    +        }
    
    283
    +        boolean copyToRight = !idsToCopyToRight.isEmpty();
    
    284
    +        if (copyToRight) {
    
    285
    +            stepsCount += 3;
    
    286
    +        }
    
    287
    +
    
    266 288
             ProgressModel progressModel = getStepModel().getProgressModel();
    
    267 289
             progressModel.setStepsCount(stepsCount);
    
    268 290
     
    
    269 291
             DecoratorService decoratorService = getDecoratorService();
    
    292
    +        boolean insertMissingReferentials = getStepModel().isInsertMissingReferentials();
    
    293
    +        if (copyToLeft) {
    
    294
    +
    
    295
    +            // generate add missing referential to left
    
    296
    +
    
    297
    +            progressModel.incrementsCurrentStep();
    
    298
    +
    
    299
    +            ReferentialService leftReferentialService = leftSource.getReferentialService();
    
    300
    +            ImmutableSetStringMap leftSourceReferential = leftReferentialService.getReferentialIds();
    
    301
    +            MissingReferentialRequest leftMissingReferentialRequest = MissingReferentialRequest.of(leftSourceReferential, idsToCopyToLeft.toArray(new String[0]));
    
    302
    +            MissingReferentialResult leftMissingReferentialResult =
    
    303
    +                    rightSource.getReferentialService().computeMissingReferential(leftMissingReferentialRequest);
    
    304
    +
    
    305
    +            progressModel.incrementsCurrentStep();
    
    306
    +
    
    307
    +            if (!insertMissingReferentials && leftMissingReferentialResult != null) {
    
    308
    +
    
    309
    +                // l'export n'est pas possible
    
    310
    +                UIHelper.displayWarning(t("observe.title.can.not.export.data.left"), t("observe.actions.exportData.error.missingReferentialsId.left"));
    
    311
    +                sendMessage(t("observe.actions.exportData.error.missingReferentialsId.left"));
    
    312
    +                return WizardState.CANCELED;
    
    313
    +            }
    
    314
    +
    
    315
    +            if (leftMissingReferentialResult != null) {
    
    316
    +
    
    317
    +                // there is some referential to add to left source
    
    318
    +
    
    319
    +                String message = t("observe.message.show.usage.for.missingReferentials.left");
    
    320
    +
    
    321
    +                ImmutableSetDtoMap<ReferentialDtoReference> usages = rightSource.getReferentialMap(leftMissingReferentialResult.getMissingIds());
    
    322
    +                UsageForDisplayUI usagesUI = UsageForDisplayUI.build(message, usages);
    
    323
    +
    
    324
    +                int reponse = UIHelper.askUser(null,
    
    325
    +                                               t("observe.title.can.not.export.data.left"),
    
    326
    +                                               usagesUI,
    
    327
    +                                               JOptionPane.WARNING_MESSAGE,
    
    328
    +                                               new Object[]{
    
    329
    +                                                       t("observe.choice.confirm.insert"),
    
    330
    +                                                       t("observe.choice.cancel")},
    
    331
    +                                               0);
    
    332
    +
    
    333
    +                if (reponse != 0) {
    
    334
    +
    
    335
    +                    return WizardState.CANCELED;
    
    336
    +                }
    
    337
    +
    
    338
    +                // insertion des référentiels manquants dans la base centrale
    
    339
    +                log.info("Insertion dans la base de gauche des référentiels manquants.");
    
    340
    +
    
    341
    +                for (Class<? extends ReferentialDtoReference> key : usages.referentialReferenceTypes()) {
    
    342
    +                    Set<? extends ReferentialDtoReference> references = usages.get(key);
    
    343
    +                    String type = t(ObserveI18nDecoratorHelper.getTypePluralI18nKey(key));
    
    344
    +                    sendMessage(t("observe.actions.exportData.message.add.missing.referentials.left", references.size(), type));
    
    345
    +                    Decorator decorator = decoratorService.getReferenceDecorator(key);
    
    346
    +                    for (DtoReference reference : references) {
    
    347
    +                        sendMessage(t("observe.actions.exportData.message.add.missing.referential", decorator.toString(reference)));
    
    348
    +                    }
    
    349
    +                }
    
    350
    +
    
    351
    +                progressModel.incrementsCurrentStep();
    
    352
    +
    
    353
    +                leftReferentialService.insertMissingReferential(leftMissingReferentialResult.getSqlCode());
    
    354
    +
    
    355
    +            }
    
    356
    +        }
    
    357
    +
    
    358
    +        if (copyToRight) {
    
    359
    +
    
    360
    +            // generate add missing referential to right
    
    361
    +
    
    362
    +            progressModel.incrementsCurrentStep();
    
    363
    +
    
    364
    +            ReferentialService rightReferentialService = rightSource.getReferentialService();
    
    365
    +            ImmutableSetStringMap rightSourceReferential = rightReferentialService.getReferentialIds();
    
    366
    +            MissingReferentialRequest rightMissingReferentialRequest = MissingReferentialRequest.of(rightSourceReferential, idsToCopyToRight.toArray(new String[0]));
    
    367
    +            MissingReferentialResult rightMissingReferentialResult =
    
    368
    +                    leftSource.getReferentialService().computeMissingReferential(rightMissingReferentialRequest);
    
    369
    +
    
    370
    +            progressModel.incrementsCurrentStep();
    
    371
    +
    
    372
    +            if (!insertMissingReferentials && rightMissingReferentialResult != null) {
    
    373
    +
    
    374
    +                // l'export n'est pas possible
    
    375
    +                UIHelper.displayWarning(t("observe.title.can.not.export.data.right"), t("observe.actions.exportData.error.missingReferentialsId.right"));
    
    376
    +                sendMessage(t("observe.actions.exportData.error.missingReferentialsId.right"));
    
    377
    +                return WizardState.CANCELED;
    
    378
    +            }
    
    379
    +
    
    380
    +            if (rightMissingReferentialResult != null) {
    
    381
    +
    
    382
    +                // there is some referential to add to left source
    
    383
    +
    
    384
    +                String message = t("observe.message.show.usage.for.missingReferentials.right");
    
    385
    +
    
    386
    +                ImmutableSetDtoMap<ReferentialDtoReference> usages = leftSource.getReferentialMap(rightMissingReferentialResult.getMissingIds());
    
    387
    +                UsageForDisplayUI usagesUI = UsageForDisplayUI.build(message, usages);
    
    388
    +
    
    389
    +                int reponse = UIHelper.askUser(null,
    
    390
    +                                               t("observe.title.can.not.export.data.right"),
    
    391
    +                                               usagesUI,
    
    392
    +                                               JOptionPane.WARNING_MESSAGE,
    
    393
    +                                               new Object[]{
    
    394
    +                                                       t("observe.choice.confirm.insert"),
    
    395
    +                                                       t("observe.choice.cancel")},
    
    396
    +                                               0);
    
    397
    +
    
    398
    +                if (reponse != 0) {
    
    399
    +
    
    400
    +                    return WizardState.CANCELED;
    
    401
    +                }
    
    402
    +
    
    403
    +                log.info("Insertion dans la base de droite des référentiels manquants.");
    
    404
    +
    
    405
    +                for (Class<? extends ReferentialDtoReference> key : usages.referentialReferenceTypes()) {
    
    406
    +                    Set<? extends ReferentialDtoReference> references = usages.get(key);
    
    407
    +                    String type = t(ObserveI18nDecoratorHelper.getTypePluralI18nKey(key));
    
    408
    +                    sendMessage(t("observe.actions.exportData.message.add.missing.referentials.right", references.size(), type));
    
    409
    +                    Decorator decorator = decoratorService.getReferenceDecorator(key);
    
    410
    +                    for (DtoReference reference : references) {
    
    411
    +                        sendMessage(t("observe.actions.exportData.message.add.missing.referential", decorator.toString(reference)));
    
    412
    +                    }
    
    413
    +                }
    
    414
    +                progressModel.incrementsCurrentStep();
    
    415
    +                rightReferentialService.insertMissingReferential(rightMissingReferentialResult.getSqlCode());
    
    416
    +            }
    
    417
    +        }
    
    418
    +
    
    270 419
             ReferentialReferenceDecorator<ProgramReference> programDecorator = decoratorService.getReferentialReferenceDecorator(ProgramReference.class);
    
    271 420
     
    
    272 421
             TripManagementService leftTripManagementService = leftSource.getTripManagementService();
    
    ... ... @@ -383,4 +532,5 @@ public class DataSynchroUIHandler extends AdminTabUIHandler<DataSynchroUI> imple
    383 532
             return WizardState.SUCCESSED;
    
    384 533
     
    
    385 534
         }
    
    535
    +
    
    386 536
     }

  • client/src/main/java/fr/ird/observe/client/ui/content/ref/ContentReferenceUIHandler.java
    ... ... @@ -31,6 +31,7 @@ import fr.ird.observe.client.ui.content.ref.usage.UsageForDeleteUI;
    31 31
     import fr.ird.observe.client.ui.content.ref.usage.UsageForDesactivateUI;
    
    32 32
     import fr.ird.observe.client.ui.content.ref.usage.UsageForDisplayUI;
    
    33 33
     import fr.ird.observe.client.ui.tree.navigation.NavigationTree;
    
    34
    +import fr.ird.observe.client.ui.tree.navigation.nodes.NavigationTreeNodeSupport;
    
    34 35
     import fr.ird.observe.client.ui.util.UIHelper;
    
    35 36
     import fr.ird.observe.client.validation.ClientValidationContext;
    
    36 37
     import fr.ird.observe.dto.decoration.DecoratorService;
    
    ... ... @@ -125,47 +126,6 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
    125 126
             };
    
    126 127
         }
    
    127 128
     
    
    128
    -    @Override
    
    129
    -    protected ObserveLayoutFocusTraversalPolicy<U> creatFocusTraversalPolicy() {
    
    130
    -        return new ObserveLayoutFocusTraversalPolicy<U>() {
    
    131
    -
    
    132
    -            @Override
    
    133
    -            protected Component getFirstComponentForEdit(Container aContainer) {
    
    134
    -                return getUi().getUri();
    
    135
    -            }
    
    136
    -
    
    137
    -            @Override
    
    138
    -            protected Component getLastComponentForEdit(Container aContainer) {
    
    139
    -                return getUi().getBackToList();
    
    140
    -            }
    
    141
    -
    
    142
    -        };
    
    143
    -    }
    
    144
    -
    
    145
    -    @Override
    
    146
    -    public void beforeInit(U ui) {
    
    147
    -        super.beforeInit(ui);
    
    148
    -        uiInitializer = new ContentReferenceUIInitializer<>(ui);
    
    149
    -    }
    
    150
    -
    
    151
    -    @Override
    
    152
    -    public void afterInit(U ui) {
    
    153
    -
    
    154
    -        uiInitializer.initUI();
    
    155
    -
    
    156
    -        ui.getViewLayout().addPropertyChangeListener(CardLayout2Ext.SELECTED_PROPERTY_NAME,
    
    157
    -                                                     evt -> SwingUtilities.invokeLater(revalidate));
    
    158
    -
    
    159
    -        installFocusTraversalPolicy();
    
    160
    -
    
    161
    -        ui.getModel().addPropertyChangeListener(ContentReferenceUIModel.PROPERTY_EDITING, e -> updateView((Boolean) e.getNewValue()));
    
    162
    -    }
    
    163
    -
    
    164
    -    @Override
    
    165
    -    protected String updateTitle(String title) {
    
    166
    -        return ui.getTypeI18nKey();
    
    167
    -    }
    
    168
    -
    
    169 129
         private static <E extends ReferentialDto, R extends ReferentialDtoReference<E, R>> Pair<Boolean, R> showUsagesForDelete(E entity,
    
    170 130
                                                                                                                                 ImmutableSetDtoMap<DtoReference> usages,
    
    171 131
                                                                                                                                 List<R> referenceList) {
    
    ... ... @@ -248,6 +208,47 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
    248 208
             return Pair.of(false, null);
    
    249 209
         }
    
    250 210
     
    
    211
    +    @Override
    
    212
    +    protected ObserveLayoutFocusTraversalPolicy<U> creatFocusTraversalPolicy() {
    
    213
    +        return new ObserveLayoutFocusTraversalPolicy<U>() {
    
    214
    +
    
    215
    +            @Override
    
    216
    +            protected Component getFirstComponentForEdit(Container aContainer) {
    
    217
    +                return getUi().getUri();
    
    218
    +            }
    
    219
    +
    
    220
    +            @Override
    
    221
    +            protected Component getLastComponentForEdit(Container aContainer) {
    
    222
    +                return getUi().getBackToList();
    
    223
    +            }
    
    224
    +
    
    225
    +        };
    
    226
    +    }
    
    227
    +
    
    228
    +    @Override
    
    229
    +    public void beforeInit(U ui) {
    
    230
    +        super.beforeInit(ui);
    
    231
    +        uiInitializer = new ContentReferenceUIInitializer<>(ui);
    
    232
    +    }
    
    233
    +
    
    234
    +    @Override
    
    235
    +    public void afterInit(U ui) {
    
    236
    +
    
    237
    +        uiInitializer.initUI();
    
    238
    +
    
    239
    +        ui.getViewLayout().addPropertyChangeListener(CardLayout2Ext.SELECTED_PROPERTY_NAME,
    
    240
    +                                                     evt -> SwingUtilities.invokeLater(revalidate));
    
    241
    +
    
    242
    +        installFocusTraversalPolicy();
    
    243
    +
    
    244
    +        ui.getModel().addPropertyChangeListener(ContentReferenceUIModel.PROPERTY_EDITING, e -> updateView((Boolean) e.getNewValue()));
    
    245
    +    }
    
    246
    +
    
    247
    +    @Override
    
    248
    +    protected String updateTitle(String title) {
    
    249
    +        return ui.getTypeI18nKey();
    
    250
    +    }
    
    251
    +
    
    251 252
         public void selectBean(R selectedReference) {
    
    252 253
     
    
    253 254
             if (selectedReference == null) {
    
    ... ... @@ -832,7 +833,10 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
    832 833
     
    
    833 834
                 // remove the program in tree
    
    834 835
                 NavigationTree treeHelper = getNavigationTree();
    
    835
    -            treeHelper.removeProgram(bean.getId());
    
    836
    +            NavigationTreeNodeSupport programNode = treeHelper.getProgramNode(bean.getId());
    
    837
    +            if (programNode != null) {
    
    838
    +                treeHelper.removeProgram(bean.getId());
    
    839
    +            }
    
    836 840
             }
    
    837 841
     
    
    838 842
             // on met a jour le referentiel dans le cache et le model
    

  • client/src/main/resources/i18n/client_en_GB.properties
    ... ... @@ -151,8 +151,12 @@ observe.actions.consolidate.title.tip=Consolidate observed data
    151 151
     observe.actions.exportData=Export data
    
    152 152
     observe.actions.exportData.description=Export data
    
    153 153
     observe.actions.exportData.error.missingReferentialsId=Can't export data, there is some missing referentials in central source and you did not select insert option.
    
    154
    +observe.actions.exportData.error.missingReferentialsId.left=Can't export data, there is some missing referentials in left source and you did not select insert option.
    
    155
    +observe.actions.exportData.error.missingReferentialsId.right=Can't export data, there is some missing referentials in right source and you did not select insert option.
    
    154 156
     observe.actions.exportData.message.add.missing.referential=\t%s
    
    155 157
     observe.actions.exportData.message.add.missing.referentials=Insert %s missing referentials of type «%s»
    
    158
    +observe.actions.exportData.message.add.missing.referentials.left=Insert %s missing referentials of type «%s» in left source
    
    159
    +observe.actions.exportData.message.add.missing.referentials.right=Insert %s missing referentials of type «%s» in right source
    
    156 160
     observe.actions.exportData.message.not.possible=Export is not possible (see above messages)
    
    157 161
     observe.actions.exportData.message.operation.needFix=Select data to export.
    
    158 162
     observe.actions.exportData.message.prepare.data=Prepare data to export...
    
    ... ... @@ -202,6 +206,7 @@ observe.actions.synchro.data.deleteFromLeft.tip=Delete selected trip(s) from lef
    202 206
     observe.actions.synchro.data.deleteFromRight.tip=Delete selected trip(s) from right database
    
    203 207
     observe.actions.synchro.data.description=Advanced data management
    
    204 208
     observe.actions.synchro.data.launch.operation=Get data fro databases
    
    209
    +observe.actions.synchro.data.message.data.loaded=%s - Data loaded
    
    205 210
     observe.actions.synchro.data.prepare.copyToLeftTask=Register operation copy to left database\: %s - %s
    
    206 211
     observe.actions.synchro.data.prepare.copyToRightTask=Register operation copy to right database\: %s - %s
    
    207 212
     observe.actions.synchro.data.prepare.deleteFromLeftTask=Register operation delete from left database\: %s - %s
    
    ... ... @@ -242,8 +247,6 @@ observe.actions.synchro.referential.legacy.launch.operation=Synchronize referent
    242 247
     observe.actions.synchro.referential.legacy.tip=Synchronize objectOperation on local database
    
    243 248
     observe.actions.synchro.referential.message.apply.done=Referential updated at 1$td/%1$tm/%1$tY à %1$tH\:%1$tM\:%1$tS
    
    244 249
     observe.actions.synchro.referential.message.build.diff=Build differential of referential from %1$s
    
    245
    -observe.actions.synchro.referential.message.data.leftData.loaded=Left referential panel loaded
    
    246
    -observe.actions.synchro.referential.message.data.rightData.loaded=Right referential panel loaded
    
    247 250
     observe.actions.synchro.referential.message.need.save.for.synchro.operation=Referential update has modified some local data.
    
    248 251
     observe.actions.synchro.referential.message.need.save.for.validation.operation=Validation operation has modified some local data.
    
    249 252
     observe.actions.synchro.referential.message.no.local.modification=No data modified, save is not required.
    
    ... ... @@ -1313,6 +1316,8 @@ observe.message.show.usage.for.desactivated=Referential %1$s "%2$s" will be disa
    1313 1316
     observe.message.show.usage.for.desactivated2=Some data are using this referential, see following reference
    
    1314 1317
     observe.message.show.usage.for.desactivated3=Those data need to use another enabled referential to be saved.
    
    1315 1318
     observe.message.show.usage.for.missingReferentials=There is some referentials present in local source but not in centrale one.
    
    1319
    +observe.message.show.usage.for.missingReferentials.left=There is some referentials present in right source but not in left one.
    
    1320
    +observe.message.show.usage.for.missingReferentials.right=There is some referentials present in left source but not in right one.
    
    1316 1321
     observe.message.show.usages=List of usage of referential %1$s\: '%2$s'
    
    1317 1322
     observe.message.table.editBean.modified=Current entry is modifed and valid.
    
    1318 1323
     observe.message.table.editBean.modified.but.invalid=Current entry is modified but not valid.
    
    ... ... @@ -1468,6 +1473,8 @@ observe.storage.useServerStorage.description=Please configure connexion to remot
    1468 1473
     observe.title.about=About
    
    1469 1474
     observe.title.can.not.delete.referentiel=Impossible to delete a referentiel data...
    
    1470 1475
     observe.title.can.not.export.data=Could not export data
    
    1476
    +observe.title.can.not.export.data.left=Could not export data to left source
    
    1477
    +observe.title.can.not.export.data.right=Could not export data to right source
    
    1471 1478
     observe.title.can.not.export.obstuna=Could not export obstuna data...
    
    1472 1479
     observe.title.choose.db.dump=Choose a database backup
    
    1473 1480
     observe.title.choose.db.dump.directory=Chhose directory of backup
    

  • client/src/main/resources/i18n/client_es_ES.properties
    ... ... @@ -151,8 +151,12 @@ observe.actions.consolidate.title.tip=Consolidar los datos observados
    151 151
     observe.actions.exportData=Exportar los datos observados
    
    152 152
     observe.actions.exportData.description=Exportar los datos observados en la base central
    
    153 153
     observe.actions.exportData.error.missingReferentialsId=Il existe des référentiels dans la base locale non présente en base centrale, mais vous n'avez pas activé l'option d'insertion automatique. \#TODO
    
    154
    +observe.actions.exportData.error.missingReferentialsId.left=Il existe des référentiels dans la base de gauche non présente en base centrale, mais vous n'avez pas activé l'option d'insertion automatique. \#TODO
    
    155
    +observe.actions.exportData.error.missingReferentialsId.right=Il existe des référentiels dans la base de droite non présente en base centrale, mais vous n'avez pas activé l'option d'insertion automatique. \#TODO
    
    154 156
     observe.actions.exportData.message.add.missing.referential=\t%s
    
    155 157
     observe.actions.exportData.message.add.missing.referentials=Insertion de %s référentiels de type «%s» \#TODO
    
    158
    +observe.actions.exportData.message.add.missing.referentials.left=Insertion de %s référentiels de type «%s» dans la base de gauche\#TODO
    
    159
    +observe.actions.exportData.message.add.missing.referentials.right=Insertion de %s référentiels de type «%s» dans la base de droite\#TODO
    
    156 160
     observe.actions.exportData.message.not.possible=La exportación no es posible (vea el mensaje anterior).
    
    157 161
     observe.actions.exportData.message.operation.needFix=Seleccione las mareas a exportar.
    
    158 162
     observe.actions.exportData.message.prepare.data=Preparación de los datos a exportar...
    
    ... ... @@ -202,6 +206,7 @@ observe.actions.synchro.data.deleteFromLeft.tip=Eliminar la ou las mareas selecc
    202 206
     observe.actions.synchro.data.deleteFromRight.tip=Eliminar la ou las mareas seleccionada(s) de la base de la derecha
    
    203 207
     observe.actions.synchro.data.description=Gestión avanzada de los datos de los usuarios
    
    204 208
     observe.actions.synchro.data.launch.operation=Recuperar los datos de las fuentes de datos
    
    209
    +observe.actions.synchro.data.message.data.loaded=%s - Datos recuperadas.
    
    205 210
     observe.actions.synchro.data.prepare.copyToLeftTask=Preparación de la copia en la base de la izquierda \: %s - %s
    
    206 211
     observe.actions.synchro.data.prepare.copyToRightTask=Preparación de la copia en la base de la derecha \: %s - %s
    
    207 212
     observe.actions.synchro.data.prepare.deleteFromLeftTask=Preparación de la eliminación de la base de la izquierda \: %s - %s
    
    ... ... @@ -242,8 +247,6 @@ observe.actions.synchro.referential.legacy.launch.operation=Calcular el diferenc
    242 247
     observe.actions.synchro.referential.legacy.tip=Operación de actualización del referencial de la base local
    
    243 248
     observe.actions.synchro.referential.message.apply.done=Referencial actualizado el %1$td/%1$tm/%1$tY a %1$tH\:%1$tM\:%1$tS
    
    244 249
     observe.actions.synchro.referential.message.build.diff=Construcción del diferencial de referenciales desde\: %1$s
    
    245
    -observe.actions.synchro.referential.message.data.leftData.loaded=Datos del pannel de la izquierda recuperadas.
    
    246
    -observe.actions.synchro.referential.message.data.rightData.loaded=Datos del pannel de la derecha recuperadas.
    
    247 250
     observe.actions.synchro.referential.message.need.save.for.synchro.operation=La operación de sincronización de referenciales ha generado cambios
    
    248 251
     observe.actions.synchro.referential.message.need.save.for.validation.operation=la operación de validación de datos ha generado modificaciones.
    
    249 252
     observe.actions.synchro.referential.message.no.local.modification=No se han modificado datos en la base local, no es necesario guardar.
    
    ... ... @@ -1313,6 +1316,8 @@ observe.message.show.usage.for.desactivated=El referencial %1$s "%2$s" se desact
    1313 1316
     observe.message.show.usage.for.desactivated2=Los objetos están usando actualmente las referencias que se enumeran a continuación..
    
    1314 1317
     observe.message.show.usage.for.desactivated3=Estos objetos deben usar otro referencial (no desactivado) para poder actualizarse.
    
    1315 1318
     observe.message.show.usage.for.missingReferentials=Il existe des référentiels présents dans la base locale mais non présents dans la base centrale. \#TODO
    
    1319
    +observe.message.show.usage.for.missingReferentials.left=Il existe des référentiels présents dans la base de droite mais non présents dans la base de gauche.
    
    1320
    +observe.message.show.usage.for.missingReferentials.right=Il existe des référentiels présents dans la base de gauche mais non présents dans la base droite.
    
    1316 1321
     observe.message.show.usages=Listas de usos de referenciales %1$s \: '%2$s'
    
    1317 1322
     observe.message.table.editBean.modified=El registro actual se ha modificado y es válido.
    
    1318 1323
     observe.message.table.editBean.modified.but.invalid=El registro actual se ha modificado pero no es válido.
    
    ... ... @@ -1468,6 +1473,8 @@ observe.storage.useServerStorage.description=Configure su conexión al servidor
    1468 1473
     observe.title.about=A proposito de ObServe...
    
    1469 1474
     observe.title.can.not.delete.referentiel=Impossible eliminar un referencial en proceso de utilización...
    
    1470 1475
     observe.title.can.not.export.data=Impossible d'exporter les données vers la base centrale... \#TODO
    
    1476
    +observe.title.can.not.export.data.left=Impossible d'exporter les données vers la base de gauche... \#TODO
    
    1477
    +observe.title.can.not.export.data.right=Impossible d'exporter les données vers la base de droite... \#TODO
    
    1471 1478
     observe.title.can.not.export.obstuna=Impossible exportar los datos de obstuna...
    
    1472 1479
     observe.title.choose.db.dump=Seleccionar una copia de seguridad de base local
    
    1473 1480
     observe.title.choose.db.dump.directory=Seleccionar e directorio de destinación de la copia de seguridad
    

  • client/src/main/resources/i18n/client_fr_FR.properties
    ... ... @@ -151,8 +151,12 @@ observe.actions.consolidate.title.tip=Consolider les données observateur
    151 151
     observe.actions.exportData=Exporter les données observateurs
    
    152 152
     observe.actions.exportData.description=Exporter les données observateurs vers la base centrale
    
    153 153
     observe.actions.exportData.error.missingReferentialsId=Il existe des référentiels dans la base locale non présente en base centrale, mais vous n'avez pas activé l'option d'insertion automatique.
    
    154
    +observe.actions.exportData.error.missingReferentialsId.left=Il existe des référentiels dans la base de gauche non présente en base centrale, mais vous n'avez pas activé l'option d'insertion automatique.
    
    155
    +observe.actions.exportData.error.missingReferentialsId.right=Il existe des référentiels dans la base de droite non présente en base centrale, mais vous n'avez pas activé l'option d'insertion automatique.
    
    154 156
     observe.actions.exportData.message.add.missing.referential=\t%s
    
    155 157
     observe.actions.exportData.message.add.missing.referentials=Insertion de %s référentiels de type «%s»
    
    158
    +observe.actions.exportData.message.add.missing.referentials.left=Insertion de %s référentiels de type «%s» dans la base de gauche
    
    159
    +observe.actions.exportData.message.add.missing.referentials.right=Insertion de %s référentiels de type «%s» dans la base de droite
    
    156 160
     observe.actions.exportData.message.not.possible=L'opération d'export n'est pas possible (voir les messages précédents).
    
    157 161
     observe.actions.exportData.message.operation.needFix=Veuillez sélectionner les marées à exporter.
    
    158 162
     observe.actions.exportData.message.prepare.data=Préparation des données à exporter...
    
    ... ... @@ -202,6 +206,7 @@ observe.actions.synchro.data.deleteFromLeft.tip=Supprimer la ou les marées sél
    202 206
     observe.actions.synchro.data.deleteFromRight.tip=Supprimer la ou les marées sélectionnée(s) de la base de droite
    
    203 207
     observe.actions.synchro.data.description=Gestion avancée des données utilisateurs
    
    204 208
     observe.actions.synchro.data.launch.operation=Récupérer les données des sources de données
    
    209
    +observe.actions.synchro.data.message.data.loaded=%s - Données du panneau gauche récupérées.
    
    205 210
     observe.actions.synchro.data.prepare.copyToLeftTask=Préparation de la recopie vers la base de gauche \: %s - %s
    
    206 211
     observe.actions.synchro.data.prepare.copyToRightTask=Préparation de la recopie vers la base de droite \: %s - %s
    
    207 212
     observe.actions.synchro.data.prepare.deleteFromLeftTask=Préparation de la suppression de la base de gauche \: %s - %s
    
    ... ... @@ -242,8 +247,6 @@ observe.actions.synchro.referential.legacy.launch.operation=Calculer le différe
    242 247
     observe.actions.synchro.referential.legacy.tip=Opération de mise à jour du référentiel de la base locale
    
    243 248
     observe.actions.synchro.referential.message.apply.done=Référentiel mis à jour le %1$td/%1$tm/%1$tY à %1$tH\:%1$tM\:%1$tS
    
    244 249
     observe.actions.synchro.referential.message.build.diff=Construction du différentiel de référentiel depuis %1$s
    
    245
    -observe.actions.synchro.referential.message.data.leftData.loaded=Données du panneau gauche récupérées.
    
    246
    -observe.actions.synchro.referential.message.data.rightData.loaded=Données du panneau droit récupérées.
    
    247 250
     observe.actions.synchro.referential.message.need.save.for.synchro.operation=L'opération de synchronisation du référentiel a engendrée des modifications.
    
    248 251
     observe.actions.synchro.referential.message.need.save.for.validation.operation=L'opération de validation des données a engendrée des modifications.
    
    249 252
     observe.actions.synchro.referential.message.no.local.modification=Aucune donnée de la base locale n'a été modifiée
    
    ... ... @@ -1313,6 +1316,8 @@ observe.message.show.usage.for.desactivated=Le référentiel %1$s "%2$s" va êtr
    1313 1316
     observe.message.show.usage.for.desactivated2=Des objets utilisent actuellement cet entité dont les références sont citées plus bas.
    
    1314 1317
     observe.message.show.usage.for.desactivated3=Ces objets devront utiliser un autre référentiel (non désactivé) pour pouvoir être mis à jour.
    
    1315 1318
     observe.message.show.usage.for.missingReferentials=Il existe des référentiels présents dans la base locale mais non présents dans la base centrale.
    
    1319
    +observe.message.show.usage.for.missingReferentials.left=Il existe des référentiels présents dans la base de droite mais non présents dans la base de gauche.
    
    1320
    +observe.message.show.usage.for.missingReferentials.right=Il existe des référentiels présents dans la base de gauche mais non présents dans la base droite.
    
    1316 1321
     observe.message.show.usages=Listes des utilisations du référentiel %1$s \: '%2$s'
    
    1317 1322
     observe.message.table.editBean.modified=L'entrée en cours d'édition a été modifiée et est valide.
    
    1318 1323
     observe.message.table.editBean.modified.but.invalid=L'entrée en cours d'édition a été modifiée, mais n'est pas valide.
    
    ... ... @@ -1468,6 +1473,8 @@ observe.storage.useServerStorage.description=Veuillez configurer votre connexion
    1468 1473
     observe.title.about=A propos d'ObServe...
    
    1469 1474
     observe.title.can.not.delete.referentiel=Impossible de supprimer un référentiel en cours d'utilisation...
    
    1470 1475
     observe.title.can.not.export.data=Impossible d'exporter les données vers la base centrale...
    
    1476
    +observe.title.can.not.export.data.left=Impossible d'exporter les données vers la base de gauche...
    
    1477
    +observe.title.can.not.export.data.right=Impossible d'exporter les données vers la base de droite...
    
    1471 1478
     observe.title.can.not.export.obstuna=Impossible d'exporter des données d'obstuna...
    
    1472 1479
     observe.title.choose.db.dump=Choisir une sauvegarder de base locale
    
    1473 1480
     observe.title.choose.db.dump.directory=Choisir le répertoire de destination de la sauvegarde
    

  • pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>io.ultreia.maven</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>2018.56</version>
    
    29
    +    <version>2018.57</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <groupId>fr.ird.observe</groupId>
    
    ... ... @@ -162,7 +162,7 @@
    162 162
         <lib.version.h2>1.4.196</lib.version.h2>
    
    163 163
         <!--<lib.version.nuiton.topia>3.6-SNAPSHOT</lib.version.nuiton.topia>-->
    
    164 164
         <!--<lib.version.java4all.eugene>3.0-alpha-21</lib.version.java4all.eugene>-->
    
    165
    -    <lib.version.java4all.topia>1.1.7-SNAPSHOT</lib.version.java4all.topia>
    
    165
    +    <!--<lib.version.java4all.topia>1.1.8-SNAPSHOT</lib.version.java4all.topia>-->
    
    166 166
         <!-- license header configuration -->
    
    167 167
         <license.licenseName>gpl_v3</license.licenseName>
    
    168 168
         <license.organizationName>IRD, Code Lutin, Ultreia.io</license.organizationName>
    

  • server/src/main/java/fr/ird/observe/server/ObserveWebApplicationListener.java
    ... ... @@ -32,11 +32,11 @@ import fr.ird.observe.server.injector.ObserveDataSourceConfigurationInjector;
    32 32
     import fr.ird.observe.server.injector.ObserveDtoInjector;
    
    33 33
     import fr.ird.observe.server.injector.ObserveReferenceSetRequestInjector;
    
    34 34
     import fr.ird.observe.server.injector.SqlScriptProducerRequestInjector;
    
    35
    +import fr.ird.observe.server.injector.TopiaSqlScriptInjector;
    
    35 36
     import io.ultreia.java4all.http.HRequestBuilder;
    
    36
    -import org.apache.commons.io.IOUtils;
    
    37 37
     import org.apache.commons.lang3.StringUtils;
    
    38
    -import org.apache.logging.log4j.Logger;
    
    39 38
     import org.apache.logging.log4j.LogManager;
    
    39
    +import org.apache.logging.log4j.Logger;
    
    40 40
     import org.debux.webmotion.server.WebMotionServerListener;
    
    41 41
     import org.debux.webmotion.server.call.ServerContext;
    
    42 42
     import org.debux.webmotion.server.mapping.Mapping;
    
    ... ... @@ -80,6 +80,7 @@ public class ObserveWebApplicationListener implements WebMotionServerListener {
    80 80
             context.addInjector(new DateInjector(HRequestBuilder.DATE_PATTERN));
    
    81 81
             context.addInjector(new SqlScriptProducerRequestInjector(gson));
    
    82 82
             context.addInjector(new ImmutableSetInjector(gson));
    
    83
    +        context.addInjector(new TopiaSqlScriptInjector(gson));
    
    83 84
             context.addConverter(new ObserveDtoConverter(gson), ObserveDbUserDto.class);
    
    84 85
     
    
    85 86
             context.getServletContext().setAttribute(ObserveWebApplicationContext.APPLICATION_CONTEXT_PARAMETER, applicationContext);
    

  • server/src/main/java/fr/ird/observe/server/injector/TopiaSqlScriptInjector.java
    1
    +package fr.ird.observe.server.injector;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Server
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (at your option) any later version.
    
    13
    + *
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + *
    
    19
    + * You should have received a copy of the GNU General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    25
    +import com.google.gson.Gson;
    
    26
    +import org.apache.logging.log4j.LogManager;
    
    27
    +import org.apache.logging.log4j.Logger;
    
    28
    +import org.debux.webmotion.server.call.Call;
    
    29
    +import org.debux.webmotion.server.handler.ExecutorParametersInjectorHandler;
    
    30
    +import org.debux.webmotion.server.mapping.Mapping;
    
    31
    +import org.nuiton.topia.persistence.script.TopiaSqlScript;
    
    32
    +
    
    33
    +import java.lang.reflect.Type;
    
    34
    +import java.util.Objects;
    
    35
    +
    
    36
    +/**
    
    37
    + * @author Tony Chemit - dev@tchemit.fr
    
    38
    + */
    
    39
    +public class TopiaSqlScriptInjector implements ExecutorParametersInjectorHandler.Injector {
    
    40
    +
    
    41
    +    /** Logger. */
    
    42
    +    private static final Logger log = LogManager.getLogger(TopiaSqlScriptInjector.class);
    
    43
    +
    
    44
    +    protected final Gson gson;
    
    45
    +
    
    46
    +    public TopiaSqlScriptInjector(Gson gson) {
    
    47
    +        this.gson = gson;
    
    48
    +    }
    
    49
    +
    
    50
    +    @Override
    
    51
    +    public Object getValue(Mapping mapping, Call call, String name, Class<?> type, Type generic) {
    
    52
    +        TopiaSqlScript topiaSqlScript = null;
    
    53
    +        if (type.equals(TopiaSqlScript.class)) {
    
    54
    +            Call.ParameterTree parameterTree = call.getParameterTree().getObject().get(name);
    
    55
    +            Objects.requireNonNull(parameterTree, "Le paramètre " + name + " n'as pas été trouvé, recompiler (parameter)!");
    
    56
    +            String gsonContent = ((String[]) parameterTree.getValue())[0];
    
    57
    +            topiaSqlScript = gson.fromJson(gsonContent, TopiaSqlScript.class);
    
    58
    +            log.info("Inject topiaSqlScript: " + topiaSqlScript);
    
    59
    +        }
    
    60
    +        return topiaSqlScript;
    
    61
    +    }
    
    62
    +
    
    63
    +}

  • services-client/src/main/java/fr/ird/observe/services/client/ObserveRequestBuilder.java
    ... ... @@ -24,6 +24,7 @@ package fr.ird.observe.services.client;
    24 24
     
    
    25 25
     import fr.ird.observe.services.configuration.rest.ObserveDataSourceConfigurationRestConstants;
    
    26 26
     import io.ultreia.java4all.http.HRequestBuilder;
    
    27
    +import org.nuiton.topia.persistence.script.TopiaSqlScript;
    
    27 28
     
    
    28 29
     import java.util.Objects;
    
    29 30
     import java.util.concurrent.TimeUnit;
    
    ... ... @@ -72,4 +73,9 @@ public class ObserveRequestBuilder extends HRequestBuilder {
    72 73
                 addAuthTokenSupplier(serviceContext.getAuthTokenSupplier());
    
    73 74
             }
    
    74 75
         }
    
    76
    +
    
    77
    +    public ObserveRequestBuilder addParameter(String parameterName, TopiaSqlScript value) {
    
    78
    +        super.addParameter(parameterName, serviceContext.getResponseBuilder().getGson().get().toJson(value));
    
    79
    +        return this;
    
    80
    +    }
    
    75 81
     }

  • services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequestBuilder.java
    ... ... @@ -157,7 +157,8 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
    157 157
     
    
    158 158
                     @Override
    
    159 159
                     protected <DD extends ReferentialDto> ImmutableList<String> insertMissingReferential(Class<DD> referentialType, String id) {
    
    160
    -                    return addExtraInsertStatement(id, binder);
    
    160
    +                    ReferentialDtoEntityContext<DD, ?, ?> modelContext = DbModelHelper.fromReferentialDto(referentialType);
    
    161
    +                    return addExtraInsertStatement(id, modelContext.toEntityBinder());
    
    161 162
                     }
    
    162 163
                 };
    
    163 164
     
    

  • services-local/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocal.java
    ... ... @@ -70,6 +70,7 @@ import fr.ird.observe.spi.context.ReferentialEntityContext;
    70 70
     import fr.ird.observe.spi.context.ReferentialReferenceEntityContext;
    
    71 71
     import fr.ird.observe.spi.map.ImmutableDtoMap;
    
    72 72
     import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    73
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    73 74
     import org.apache.logging.log4j.LogManager;
    
    74 75
     import org.apache.logging.log4j.Logger;
    
    75 76
     import org.nuiton.topia.persistence.TopiaDao;
    
    ... ... @@ -276,9 +277,9 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe
    276 277
         }
    
    277 278
     
    
    278 279
         @Override
    
    279
    -    public ImmutableSetDtoMap<String> getReferentialIds() {
    
    280
    +    public ImmutableSetStringMap getReferentialIds() {
    
    280 281
     
    
    281
    -        ImmutableSetDtoMap.Builder<String> result = ImmutableSetDtoMap.builder();
    
    282
    +        ImmutableSetStringMap.Builder result = ImmutableSetStringMap.builder();
    
    282 283
     
    
    283 284
             for (Class<? extends ReferentialDto> dtoType : DtoModelClasses.REFERENTIAL_TYPES) {
    
    284 285
                 getReferentialIds0(dtoType, result);
    
    ... ... @@ -286,7 +287,7 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe
    286 287
             return result.build();
    
    287 288
         }
    
    288 289
     
    
    289
    -    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void getReferentialIds0(Class<D> dtoType, ImmutableSetDtoMap.Builder<String> result) {
    
    290
    +    private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void getReferentialIds0(Class<D> dtoType, ImmutableSetStringMap.Builder result) {
    
    290 291
             ReferentialDtoEntityContext<D, R, E> typeContext = DbModelHelper.fromReferentialDto(dtoType);
    
    291 292
             ReferentialEntityReferenceBinderSupport<D, R, E> binder = typeContext.toEntityReferenceBinder();
    
    292 293
             TopiaDao<E> dao = getTopiaPersistenceContext().getDao(binder.getEntityType());
    
    ... ... @@ -312,7 +313,7 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe
    312 313
                 }
    
    313 314
             }
    
    314 315
     
    
    315
    -        ImmutableSetDtoMap<String> missingReferentialIds = referentialShellBuilder.build();
    
    316
    +        ImmutableSetStringMap missingReferentialIds = referentialShellBuilder.build();
    
    316 317
     
    
    317 318
             if (missingReferentialIds.isEmpty()) {
    
    318 319
                 return null;
    

  • services-local/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialShellBuilder.java
    ... ... @@ -10,12 +10,12 @@ package fr.ird.observe.services.local.service.referential;
    10 10
      * it under the terms of the GNU General Public License as
    
    11 11
      * published by the Free Software Foundation, either version 3 of the
    
    12 12
      * License, or (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU General Public
    
    20 20
      * License along with this program.  If not, see
    
    21 21
      * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    ... ... @@ -24,7 +24,7 @@ package fr.ird.observe.services.local.service.referential;
    24 24
     
    
    25 25
     import fr.ird.observe.entities.referentiel.ObserveReferentialEntity;
    
    26 26
     import fr.ird.observe.spi.DbModelHelper;
    
    27
    -import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    27
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    28 28
     import org.nuiton.topia.persistence.TopiaEntity;
    
    29 29
     import org.nuiton.topia.persistence.TopiaEntityVisitor;
    
    30 30
     
    
    ... ... @@ -39,35 +39,35 @@ import java.util.TreeSet;
    39 39
      */
    
    40 40
     public class ReferentialShellBuilder {
    
    41 41
     
    
    42
    -    public static ReferentialShellBuilder builder(ImmutableSetDtoMap<String> incomingReferentialIds) {
    
    43
    -        return new ReferentialShellBuilder(incomingReferentialIds);
    
    42
    +    private final GetEntityReferentialShellVisitor visitor;
    
    43
    +
    
    44
    +    private ReferentialShellBuilder(ImmutableSetStringMap incomingReferentialIds) {
    
    45
    +        visitor = new GetEntityReferentialShellVisitor(incomingReferentialIds);
    
    44 46
         }
    
    45 47
     
    
    46
    -    private final GetEntityReferentialShellVisitor visitor;
    
    48
    +    public static ReferentialShellBuilder builder(ImmutableSetStringMap incomingReferentialIds) {
    
    49
    +        return new ReferentialShellBuilder(incomingReferentialIds);
    
    50
    +    }
    
    47 51
     
    
    48 52
         void scan(TopiaEntity entity) {
    
    49 53
             entity.accept(visitor);
    
    50 54
         }
    
    51 55
     
    
    52
    -    public ImmutableSetDtoMap<String> build() {
    
    56
    +    public ImmutableSetStringMap build() {
    
    53 57
             return visitor.missingReferentialIds.build();
    
    54 58
         }
    
    55 59
     
    
    56
    -    private ReferentialShellBuilder(ImmutableSetDtoMap<String> incomingReferentialIds) {
    
    57
    -        visitor = new GetEntityReferentialShellVisitor(incomingReferentialIds);
    
    58
    -    }
    
    59
    -
    
    60 60
         private static class GetEntityReferentialShellVisitor implements TopiaEntityVisitor {
    
    61 61
     
    
    62 62
             private final Set<String> hitIds;
    
    63
    -        private final ImmutableSetDtoMap<String> incomingReferentialIds;
    
    64
    -        private final ImmutableSetDtoMap.Builder<String> missingReferentialIds;
    
    63
    +        private final ImmutableSetStringMap incomingReferentialIds;
    
    64
    +        private final ImmutableSetStringMap.Builder missingReferentialIds;
    
    65 65
     
    
    66
    -        GetEntityReferentialShellVisitor(ImmutableSetDtoMap<String> incomingReferentialIds) {
    
    66
    +        GetEntityReferentialShellVisitor(ImmutableSetStringMap incomingReferentialIds) {
    
    67 67
                 this.incomingReferentialIds = incomingReferentialIds;
    
    68 68
     
    
    69 69
                 this.hitIds = new TreeSet<>();
    
    70
    -            this.missingReferentialIds = ImmutableSetDtoMap.builder();
    
    70
    +            this.missingReferentialIds = ImmutableSetStringMap.builder();
    
    71 71
             }
    
    72 72
     
    
    73 73
             @Override
    

  • services/src/main/java/fr/ird/observe/services/service/referential/MissingReferentialRequest.java
    ... ... @@ -23,7 +23,7 @@ package fr.ird.observe.services.service.referential;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.dto.ObserveDto;
    
    26
    -import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    26
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    27 27
     
    
    28 28
     /**
    
    29 29
      * Created on 07/11/16.
    
    ... ... @@ -33,19 +33,19 @@ import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    33 33
      */
    
    34 34
     public class MissingReferentialRequest implements ObserveDto {
    
    35 35
     
    
    36
    -    private final ImmutableSetDtoMap<String> centralSourceReferential;
    
    36
    +    private final ImmutableSetStringMap centralSourceReferential;
    
    37 37
         private final String[] tripIds;
    
    38 38
     
    
    39
    -    public static MissingReferentialRequest of(ImmutableSetDtoMap<String> centralSourceReferential, String... tripIds) {
    
    39
    +    public static MissingReferentialRequest of(ImmutableSetStringMap centralSourceReferential, String... tripIds) {
    
    40 40
             return new MissingReferentialRequest(centralSourceReferential, tripIds);
    
    41 41
         }
    
    42 42
     
    
    43
    -    private MissingReferentialRequest(ImmutableSetDtoMap<String> centralSourceReferential, String... tripIds) {
    
    43
    +    private MissingReferentialRequest(ImmutableSetStringMap centralSourceReferential, String... tripIds) {
    
    44 44
             this.centralSourceReferential = centralSourceReferential;
    
    45 45
             this.tripIds = tripIds;
    
    46 46
         }
    
    47 47
     
    
    48
    -    public ImmutableSetDtoMap<String> getCentralSourceReferential() {
    
    48
    +    public ImmutableSetStringMap getCentralSourceReferential() {
    
    49 49
             return centralSourceReferential;
    
    50 50
         }
    
    51 51
     
    

  • services/src/main/java/fr/ird/observe/services/service/referential/MissingReferentialResult.java
    ... ... @@ -23,8 +23,8 @@ package fr.ird.observe.services.service.referential;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.dto.ObserveDto;
    
    26
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    26 27
     import org.nuiton.topia.persistence.script.TopiaSqlScript;
    
    27
    -import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    28 28
     
    
    29 29
     /**
    
    30 30
      * Created on 07/11/16.
    
    ... ... @@ -34,19 +34,19 @@ import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    34 34
      */
    
    35 35
     public class MissingReferentialResult implements ObserveDto {
    
    36 36
     
    
    37
    -    private final ImmutableSetDtoMap<String> missingIds;
    
    37
    +    private final ImmutableSetStringMap missingIds;
    
    38 38
         private final TopiaSqlScript sqlCode;
    
    39 39
     
    
    40
    -    private MissingReferentialResult(ImmutableSetDtoMap<String> missingIds, TopiaSqlScript sqlCode) {
    
    40
    +    private MissingReferentialResult(ImmutableSetStringMap missingIds, TopiaSqlScript sqlCode) {
    
    41 41
             this.missingIds = missingIds;
    
    42 42
             this.sqlCode = sqlCode;
    
    43 43
         }
    
    44 44
     
    
    45
    -    public static MissingReferentialResult of(ImmutableSetDtoMap<String> missingReferentialIds, TopiaSqlScript sqlCode) {
    
    45
    +    public static MissingReferentialResult of(ImmutableSetStringMap missingReferentialIds, TopiaSqlScript sqlCode) {
    
    46 46
             return new MissingReferentialResult(missingReferentialIds, sqlCode);
    
    47 47
         }
    
    48 48
     
    
    49
    -    public ImmutableSetDtoMap<String> getMissingIds() {
    
    49
    +    public ImmutableSetStringMap getMissingIds() {
    
    50 50
             return missingIds;
    
    51 51
         }
    
    52 52
     
    

  • services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
    ... ... @@ -40,6 +40,7 @@ import fr.ird.observe.services.spi.Write;
    40 40
     import fr.ird.observe.services.spi.WriteDataPermission;
    
    41 41
     import fr.ird.observe.services.spi.WriteReferentialPermission;
    
    42 42
     import fr.ird.observe.spi.map.ImmutableSetDtoMap;
    
    43
    +import fr.ird.observe.spi.map.ImmutableSetStringMap;
    
    43 44
     import io.ultreia.java4all.http.spi.Delete;
    
    44 45
     import io.ultreia.java4all.http.spi.Get;
    
    45 46
     import io.ultreia.java4all.http.spi.Nullable;
    
    ... ... @@ -119,7 +120,7 @@ public interface ReferentialService extends ObserveService {
    119 120
     
    
    120 121
         @ReadReferentialPermission
    
    121 122
         @Post
    
    122
    -    ImmutableSetDtoMap<String> getReferentialIds();
    
    123
    +    ImmutableSetStringMap getReferentialIds();
    
    123 124
     
    
    124 125
     
    
    125 126
         @ReadReferentialPermission