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

Commits:

6 changed files:

Changes:

  • client/core/src/main/java/fr/ird/observe/client/datasource/api/DataSourceReferenceProvider.java
    ... ... @@ -101,11 +101,11 @@ public class DataSourceReferenceProvider {
    101 101
         }
    
    102 102
     
    
    103 103
         public final <R extends DataDtoReference> DataDtoReferenceSet<R> getDataReferences(Class<R> referenceType) {
    
    104
    -        return dataSource.getReferenceService().loadData(referenceType);
    
    104
    +        return dataSource.getReferenceService().loadAllData(referenceType);
    
    105 105
         }
    
    106 106
     
    
    107 107
         public final <R extends ReferentialDtoReference> ReferentialDtoReferenceSet<R> getReferentialReferences(Class<R> referenceType) {
    
    108
    -        return dataSource.getReferenceService().loadReferential(referenceType);
    
    108
    +        return dataSource.getReferenceService().loadAllReferential(referenceType);
    
    109 109
         }
    
    110 110
     
    
    111 111
         public <R extends ReferentialDtoReference> R loadOrCreateReferentialReference(Class<R> referenceType, String id) {
    

  • pom.xml
    ... ... @@ -162,7 +162,7 @@
    162 162
         <!--<lib.version.java4all.config>1.0.8-SNAPSHOT</lib.version.java4all.config>-->
    
    163 163
         <!--<lib.version.nuiton.topia>3.4.2-SNAPSHOT</lib.version.nuiton.topia>-->
    
    164 164
         <!--    <lib.version.java4all.java-bean>0.1.2</lib.version.java4all.java-bean>-->
    
    165
    -<!--    <lib.version.java4all.http>1.0.24</lib.version.java4all.http>-->
    
    165
    +    <lib.version.java4all.http>1.0.25</lib.version.java4all.http>
    
    166 166
     
    
    167 167
         <!-- license header configuration -->
    
    168 168
         <license.licenseName>gpl_v3</license.licenseName>
    

  • server/core/src/main/filtered-resources/mapping
    ... ... @@ -69,12 +69,12 @@ POST /api/v1/LastUpdateDateService/updateDataLastUpdateDates
    69 69
     POST   /api/v1/LastUpdateDateService/updateReferentialLastUpdateDates                                                                v1.LastUpdateDateServiceRestApi.updateReferentialLastUpdateDates
    
    70 70
     GET    /api/v1/PingService/getModelVersion                                                                                           v1.PingServiceRestApi.getModelVersion
    
    71 71
     GET    /api/v1/PingService/getServerVersion                                                                                          v1.PingServiceRestApi.getServerVersion
    
    72
    -GET    /api/v1/ReferenceService/loadData                                                                                             v1.ReferenceServiceRestApi.loadData
    
    72
    +GET    /api/v1/ReferenceService/loadAllData                                                                                          v1.ReferenceServiceRestApi.loadAllData
    
    73
    +GET    /api/v1/ReferenceService/loadAllReferential                                                                                   v1.ReferenceServiceRestApi.loadAllReferential
    
    73 74
     GET    /api/v1/ReferenceService/loadData                                                                                             v1.ReferenceServiceRestApi.loadData
    
    74 75
     GET    /api/v1/ReferenceService/loadOrCreateData                                                                                     v1.ReferenceServiceRestApi.loadOrCreateData
    
    75 76
     GET    /api/v1/ReferenceService/loadOrCreateReferential                                                                              v1.ReferenceServiceRestApi.loadOrCreateReferential
    
    76 77
     GET    /api/v1/ReferenceService/loadReferential                                                                                      v1.ReferenceServiceRestApi.loadReferential
    
    77
    -GET    /api/v1/ReferenceService/loadReferential                                                                                      v1.ReferenceServiceRestApi.loadReferential
    
    78 78
     POST   /api/v1/actions/report/ReportService/executeReport                                                                            v1.actions.report.ReportServiceRestApi.executeReport
    
    79 79
     POST   /api/v1/actions/report/ReportService/populateVariables                                                                        v1.actions.report.ReportServiceRestApi.populateVariables
    
    80 80
     POST   /api/v1/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService/applySqlRequests                  v1.actions.synchro.referential.legacy.UnidirectionalReferentialSynchronizeLocalServiceRestApi.applySqlRequests
    

  • services/local-impl/src/main/java/fr/ird/observe/services/local/service/ReferenceServiceLocalSupport.java
    ... ... @@ -57,13 +57,12 @@ class ReferenceServiceLocalSupport extends ObserveServiceLocal implements Refere
    57 57
         }
    
    58 58
     
    
    59 59
         @Override
    
    60
    -    public <R extends DataDtoReference> DataDtoReferenceSet<R> loadData(Class<R> type) {
    
    61
    -
    
    60
    +    public <R extends DataDtoReference> DataDtoReferenceSet<R> loadAllData(Class<R> type) {
    
    62 61
             return loadData0(type);
    
    63 62
         }
    
    64 63
     
    
    65 64
         @Override
    
    66
    -    public <R extends ReferentialDtoReference> ReferentialDtoReferenceSet<R> loadReferential(Class<R> type) {
    
    65
    +    public <R extends ReferentialDtoReference> ReferentialDtoReferenceSet<R> loadAllReferential(Class<R> type) {
    
    67 66
             return loadReferential0(type);
    
    68 67
         }
    
    69 68
     
    

  • services/validation-spi/src/main/java/fr/ird/observe/validation/validators/TripVesselDtoValidator.java
    ... ... @@ -70,6 +70,10 @@ public class TripVesselDtoValidator extends FieldValidatorSupport {
    70 70
             Date startDate = (Date) getFieldValue("startDate", object);
    
    71 71
             Date endDate = (Date) getFieldValue("endDate", object);
    
    72 72
             String id = (String) getFieldValue("id", object);
    
    73
    +        if (id==null) {
    
    74
    +            // object not persisted, no ide, can't do the math
    
    75
    +            return;
    
    76
    +        }
    
    73 77
             validate(object, id, vessel, startDate, endDate);
    
    74 78
         }
    
    75 79
     
    
    ... ... @@ -80,7 +84,6 @@ public class TripVesselDtoValidator extends FieldValidatorSupport {
    80 84
                                                                                                        vessel.getId(),
    
    81 85
                                                                                                        startDate,
    
    82 86
                                                                                                        endDate);
    
    83
    -
    
    84 87
             if (matchingTrips.size() > 0) {
    
    85 88
                 addFieldError(getFieldName(), object);
    
    86 89
             }
    

  • toolkit/service/src/main/java/fr/ird/observe/services/service/ReferenceService.java
    ... ... @@ -49,7 +49,7 @@ public interface ReferenceService extends ObserveService {
    49 49
     
    
    50 50
         @Get
    
    51 51
         @MethodCredential(Permission.READ_DATA)
    
    52
    -    <R extends DataDtoReference> DataDtoReferenceSet<R> loadData(Class<R> type);
    
    52
    +    <R extends DataDtoReference> DataDtoReferenceSet<R> loadAllData(Class<R> type);
    
    53 53
     
    
    54 54
         @Get
    
    55 55
         @MethodCredential(Permission.READ_REFERENTIAL)
    
    ... ... @@ -61,6 +61,6 @@ public interface ReferenceService extends ObserveService {
    61 61
     
    
    62 62
         @Get
    
    63 63
         @MethodCredential(Permission.READ_REFERENTIAL)
    
    64
    -    <R extends ReferentialDtoReference> ReferentialDtoReferenceSet<R> loadReferential(Class<R> type);
    
    64
    +    <R extends ReferentialDtoReference> ReferentialDtoReferenceSet<R> loadAllReferential(Class<R> type);
    
    65 65
     
    
    66 66
     }