Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
-
e298675a
by Tony CHEMIT at 2018-09-18T21:40:06Z
-
ad130f51
by Tony CHEMIT at 2018-09-18T21:40:08Z
-
2b539ff5
by Tony CHEMIT at 2018-09-18T21:40:08Z
13 changed files:
- client/pom.xml
- dto/src/main/java/fr/ird/observe/dto/data/seine/RouteDto.java
- persistence/pom.xml
- pom.xml
- server/pom.xml
- services-client/pom.xml
- services-local/pom.xml
- services-local/src/main/java/fr/ird/observe/services/local/service/DataSourceServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/sql/ReplaceSqlStatementGenerator.java
- services-local/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocal.java
- services/pom.xml
- services/src/main/java/fr/ird/observe/services/service/sql/AddSqlScriptProducerRequest.java
- services/src/main/java/fr/ird/observe/services/service/sql/DeleteSqlScriptProducerRequest.java
Changes:
| ... | ... | @@ -376,12 +376,12 @@ |
| 376 | 376 |
<artifactId>common-service</artifactId>
|
| 377 | 377 |
</dependency>
|
| 378 | 378 |
<dependency>
|
| 379 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 380 |
- <artifactId>topia-extension</artifactId>
|
|
| 379 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 380 |
+ <artifactId>persistence</artifactId>
|
|
| 381 | 381 |
</dependency>
|
| 382 | 382 |
<dependency>
|
| 383 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 384 |
- <artifactId>topia-extension-migration</artifactId>
|
|
| 383 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 384 |
+ <artifactId>service-migration</artifactId>
|
|
| 385 | 385 |
</dependency>
|
| 386 | 386 |
|
| 387 | 387 |
<dependency>
|
| ... | ... | @@ -24,8 +24,8 @@ package fr.ird.observe.dto.data.seine; |
| 24 | 24 |
|
| 25 | 25 |
import com.google.common.collect.Iterables;
|
| 26 | 26 |
import fr.ird.observe.dto.IdHelper;
|
| 27 |
-import org.apache.logging.log4j.Logger;
|
|
| 28 | 27 |
import org.apache.logging.log4j.LogManager;
|
| 28 |
+import org.apache.logging.log4j.Logger;
|
|
| 29 | 29 |
import org.nuiton.util.DateUtil;
|
| 30 | 30 |
|
| 31 | 31 |
import java.util.Date;
|
| ... | ... | @@ -47,9 +47,9 @@ public class RouteDto extends GeneratedRouteDto { |
| 47 | 47 |
public boolean isTimeAvailable(String activitySeineId, Date time) {
|
| 48 | 48 |
Date currentTime = DateUtil.getTime(time, false, false);
|
| 49 | 49 |
|
| 50 |
- return !getActivitySeine()
|
|
| 50 |
+ return getActivitySeine()
|
|
| 51 | 51 |
.stream()
|
| 52 |
- .anyMatch(activity ->
|
|
| 52 |
+ .noneMatch(activity ->
|
|
| 53 | 53 |
Objects.equals(currentTime, activity.getTimeSecond())
|
| 54 | 54 |
&& !Objects.equals(activitySeineId, activity.getId()));
|
| 55 | 55 |
}
|
| ... | ... | @@ -50,16 +50,16 @@ |
| 50 | 50 |
</dependency>
|
| 51 | 51 |
|
| 52 | 52 |
<dependency>
|
| 53 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 54 |
- <artifactId>topia-extension</artifactId>
|
|
| 53 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 54 |
+ <artifactId>persistence</artifactId>
|
|
| 55 | 55 |
</dependency>
|
| 56 | 56 |
<dependency>
|
| 57 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 58 |
- <artifactId>topia-extension-migration</artifactId>
|
|
| 57 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 58 |
+ <artifactId>service-migration</artifactId>
|
|
| 59 | 59 |
</dependency>
|
| 60 | 60 |
<dependency>
|
| 61 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 62 |
- <artifactId>topia-extension-script</artifactId>
|
|
| 61 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 62 |
+ <artifactId>service-script</artifactId>
|
|
| 63 | 63 |
</dependency>
|
| 64 | 64 |
|
| 65 | 65 |
<dependency>
|
| ... | ... | @@ -206,9 +206,15 @@ |
| 206 | 206 |
<version>${project.version}</version>
|
| 207 | 207 |
</dependency>
|
| 208 | 208 |
<dependency>
|
| 209 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 210 |
- <artifactId>topia-templates-extension</artifactId>
|
|
| 211 |
- <version>${observeToolkitVersion}</version>
|
|
| 209 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 210 |
+ <artifactId>persistence</artifactId>
|
|
| 211 |
+ <version>${lib.version.java4all.topia}</version>
|
|
| 212 |
+ <scope>compile</scope>
|
|
| 213 |
+ </dependency>
|
|
| 214 |
+ <dependency>
|
|
| 215 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 216 |
+ <artifactId>templates</artifactId>
|
|
| 217 |
+ <version>${lib.version.java4all.topia}</version>
|
|
| 212 | 218 |
<scope>compile</scope>
|
| 213 | 219 |
</dependency>
|
| 214 | 220 |
<dependency>
|
| ... | ... | @@ -152,7 +152,7 @@ |
| 152 | 152 |
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
|
| 153 | 153 |
<buildDate>${maven.build.timestamp}</buildDate>
|
| 154 | 154 |
|
| 155 |
- <observeToolkitVersion>3.7.7</observeToolkitVersion>
|
|
| 155 |
+ <observeToolkitVersion>3.7.8-SNAPSHOT</observeToolkitVersion>
|
|
| 156 | 156 |
<!--<lib.version.java4all.http>1.0.13</lib.version.java4all.http>-->
|
| 157 | 157 |
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
|
| 158 | 158 |
<!--<lib.version.java4all.config>1.0.3</lib.version.java4all.config>-->
|
| ... | ... | @@ -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.2-SNAPSHOT</lib.version.java4all.topia>-->
|
|
| 165 |
+ <lib.version.java4all.topia>1.1.7-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>
|
| ... | ... | @@ -200,30 +200,6 @@ |
| 200 | 200 |
<dependencyManagement>
|
| 201 | 201 |
<dependencies>
|
| 202 | 202 |
|
| 203 |
- <dependency>
|
|
| 204 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 205 |
- <artifactId>topia-extension</artifactId>
|
|
| 206 |
- <version>${observeToolkitVersion}</version>
|
|
| 207 |
- </dependency>
|
|
| 208 |
- |
|
| 209 |
- <dependency>
|
|
| 210 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 211 |
- <artifactId>topia-extension-migration</artifactId>
|
|
| 212 |
- <version>${observeToolkitVersion}</version>
|
|
| 213 |
- </dependency>
|
|
| 214 |
- |
|
| 215 |
- <dependency>
|
|
| 216 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 217 |
- <artifactId>topia-extension-script</artifactId>
|
|
| 218 |
- <version>${observeToolkitVersion}</version>
|
|
| 219 |
- </dependency>
|
|
| 220 |
- |
|
| 221 |
- <dependency>
|
|
| 222 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 223 |
- <artifactId>topia-templates-extension</artifactId>
|
|
| 224 |
- <version>${observeToolkitVersion}</version>
|
|
| 225 |
- </dependency>
|
|
| 226 |
- |
|
| 227 | 203 |
<dependency>
|
| 228 | 204 |
<groupId>fr.ird.observe.toolkit</groupId>
|
| 229 | 205 |
<artifactId>common-dto</artifactId>
|
| ... | ... | @@ -76,8 +76,8 @@ |
| 76 | 76 |
<artifactId>common-service</artifactId>
|
| 77 | 77 |
</dependency>
|
| 78 | 78 |
<dependency>
|
| 79 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 80 |
- <artifactId>topia-extension</artifactId>
|
|
| 79 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 80 |
+ <artifactId>persistence</artifactId>
|
|
| 81 | 81 |
</dependency>
|
| 82 | 82 |
|
| 83 | 83 |
<dependency>
|
| ... | ... | @@ -65,8 +65,8 @@ |
| 65 | 65 |
<artifactId>common-service</artifactId>
|
| 66 | 66 |
</dependency>
|
| 67 | 67 |
<dependency>
|
| 68 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 69 |
- <artifactId>topia-extension</artifactId>
|
|
| 68 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 69 |
+ <artifactId>persistence</artifactId>
|
|
| 70 | 70 |
</dependency>
|
| 71 | 71 |
<dependency>
|
| 72 | 72 |
<groupId>io.ultreia.java4all</groupId>
|
| ... | ... | @@ -79,12 +79,12 @@ |
| 79 | 79 |
<artifactId>common-service</artifactId>
|
| 80 | 80 |
</dependency>
|
| 81 | 81 |
<dependency>
|
| 82 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 83 |
- <artifactId>topia-extension-migration</artifactId>
|
|
| 82 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 83 |
+ <artifactId>service-migration</artifactId>
|
|
| 84 | 84 |
</dependency>
|
| 85 | 85 |
<dependency>
|
| 86 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 87 |
- <artifactId>topia-extension-script</artifactId>
|
|
| 86 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 87 |
+ <artifactId>service-script</artifactId>
|
|
| 88 | 88 |
</dependency>
|
| 89 | 89 |
|
| 90 | 90 |
<dependency>
|
| ... | ... | @@ -150,9 +150,8 @@ |
| 150 | 150 |
<artifactId>topia-service-migration</artifactId>
|
| 151 | 151 |
</dependency>
|
| 152 | 152 |
<dependency>
|
| 153 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 154 |
- <artifactId>topia-extension</artifactId>
|
|
| 155 |
- <version>${observeToolkitVersion}</version>
|
|
| 153 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 154 |
+ <artifactId>persistence</artifactId>
|
|
| 156 | 155 |
</dependency>
|
| 157 | 156 |
|
| 158 | 157 |
<dependency>
|
| ... | ... | @@ -27,7 +27,6 @@ import com.google.common.collect.ImmutableSet; |
| 27 | 27 |
import fr.ird.observe.dto.ObserveDbRole;
|
| 28 | 28 |
import fr.ird.observe.dto.db.ObserveDbUserDto;
|
| 29 | 29 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| 30 |
-import org.nuiton.topia.persistence.script.TopiaSqlScript;
|
|
| 31 | 30 |
import fr.ird.observe.entities.referentiel.ObserveReferentialEntity;
|
| 32 | 31 |
import fr.ird.observe.persistence.ObserveEntityEnum;
|
| 33 | 32 |
import fr.ird.observe.persistence.ObserveTopiaApplicationContext;
|
| ... | ... | @@ -54,13 +53,14 @@ import fr.ird.observe.services.service.DatabaseNotFoundException; |
| 54 | 53 |
import fr.ird.observe.services.service.sql.AddSqlScriptProducerRequest;
|
| 55 | 54 |
import fr.ird.observe.services.service.sql.SqlScriptProducerService;
|
| 56 | 55 |
import fr.ird.observe.spi.DbModelHelper;
|
| 57 |
-import org.apache.logging.log4j.Logger;
|
|
| 58 | 56 |
import org.apache.logging.log4j.LogManager;
|
| 57 |
+import org.apache.logging.log4j.Logger;
|
|
| 59 | 58 |
import org.nuiton.topia.persistence.jdbc.JdbcHelper;
|
| 59 |
+import org.nuiton.topia.persistence.jdbc.JdbcPostgresHelper;
|
|
| 60 | 60 |
import org.nuiton.topia.persistence.metadata.TopiaMetadataEntity;
|
| 61 | 61 |
import org.nuiton.topia.persistence.metadata.TopiaMetadataModel;
|
| 62 | 62 |
import org.nuiton.topia.persistence.metadata.TopiaMetadataModelVisitor;
|
| 63 |
-import org.nuiton.topia.persistence.jdbc.JdbcPostgresHelper;
|
|
| 63 |
+import org.nuiton.topia.persistence.script.TopiaSqlScript;
|
|
| 64 | 64 |
import org.nuiton.topia.service.migration.resources.MigrationVersionResourceProvider;
|
| 65 | 65 |
import org.nuiton.topia.service.migration.version.TMSVersion;
|
| 66 | 66 |
import org.nuiton.topia.service.migration.version.TMSVersionHibernateDao;
|
| ... | ... | @@ -618,12 +618,12 @@ public class DataSourceServiceLocal extends ObserveServiceLocal implements DataS |
| 618 | 618 |
}
|
| 619 | 619 |
|
| 620 | 620 |
@Override
|
| 621 |
- public void visitEntiyStart(TopiaMetadataModel metadataModel, TopiaMetadataEntity metadataEntity) {
|
|
| 621 |
+ public void visitEntityStart(TopiaMetadataModel metadataModel, TopiaMetadataEntity metadataEntity) {
|
|
| 622 | 622 |
|
| 623 | 623 |
}
|
| 624 | 624 |
|
| 625 | 625 |
@Override
|
| 626 |
- public void visitEntiyEnd(TopiaMetadataModel metadataModel, TopiaMetadataEntity metadataEntity) {
|
|
| 626 |
+ public void visitEntityEnd(TopiaMetadataModel metadataModel, TopiaMetadataEntity metadataEntity) {
|
|
| 627 | 627 |
|
| 628 | 628 |
}
|
| 629 | 629 |
|
| ... | ... | @@ -23,14 +23,15 @@ package fr.ird.observe.services.local.service.actions.synchro.referential.sql; |
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 | 25 |
import com.google.common.collect.ImmutableList;
|
| 26 |
-import java.util.LinkedHashSet;
|
|
| 27 |
-import java.util.Set;
|
|
| 28 |
-import java.util.stream.Collectors;
|
|
| 29 |
-import org.apache.logging.log4j.Logger;
|
|
| 30 | 26 |
import org.apache.logging.log4j.LogManager;
|
| 27 |
+import org.apache.logging.log4j.Logger;
|
|
| 31 | 28 |
import org.nuiton.topia.persistence.metadata.TopiaMetadataEntity;
|
| 32 | 29 |
import org.nuiton.topia.persistence.metadata.TopiaMetadataModel;
|
| 33 | 30 |
|
| 31 |
+import java.util.LinkedHashSet;
|
|
| 32 |
+import java.util.Set;
|
|
| 33 |
+import java.util.stream.Collectors;
|
|
| 34 |
+ |
|
| 34 | 35 |
/**
|
| 35 | 36 |
* Pour générer une requète sql de remplacement à partir d'un référentiel donné.
|
| 36 | 37 |
* Created on 04/07/16.
|
| ... | ... | @@ -147,6 +148,14 @@ public class ReplaceSqlStatementGenerator { |
| 147 | 148 |
this.columnName = columnName;
|
| 148 | 149 |
}
|
| 149 | 150 |
|
| 151 |
+ @Override
|
|
| 152 |
+ public String toString() {
|
|
| 153 |
+ return "ReplacementStruct{" +
|
|
| 154 |
+ "schemaName='" + schemaName + '\'' +
|
|
| 155 |
+ ", tableName='" + tableName + '\'' +
|
|
| 156 |
+ ", columnName='" + columnName + '\'' +
|
|
| 157 |
+ '}';
|
|
| 158 |
+ }
|
|
| 150 | 159 |
}
|
| 151 | 160 |
|
| 152 | 161 |
}
|
| ... | ... | @@ -22,7 +22,6 @@ package fr.ird.observe.services.local.service.referential; |
| 22 | 22 |
* #L%
|
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 |
-import com.google.common.base.Joiner;
|
|
| 26 | 25 |
import com.google.common.collect.ImmutableList;
|
| 27 | 26 |
import com.google.common.collect.ImmutableSet;
|
| 28 | 27 |
import fr.ird.observe.binder.data.DataEntityReferenceBinderSupport;
|
| ... | ... | @@ -211,7 +210,7 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe |
| 211 | 210 |
ImmutableList<String> sql = generator.generateSqls(idToReplace, replaceId);
|
| 212 | 211 |
|
| 213 | 212 |
log.info("Replace sql code:\n" + sql);
|
| 214 |
- getTopiaPersistenceContext().executeSqlScripts(Joiner.on("\n").join(sql).getBytes());
|
|
| 213 |
+ getTopiaPersistenceContext().executeSqlScripts(String.join("\n", sql).getBytes());
|
|
| 215 | 214 |
}
|
| 216 | 215 |
|
| 217 | 216 |
@Override
|
| ... | ... | @@ -232,6 +231,7 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe |
| 232 | 231 |
//noinspection unchecked
|
| 233 | 232 |
addAllReferentialUsage(DbModelHelper.fromReferentialEntity((Class) type), (List) entities, result);
|
| 234 | 233 |
} else {
|
| 234 |
+ //noinspection unchecked
|
|
| 235 | 235 |
adddAllDataUsage(DbModelHelper.fromDataEntity((Class) type), (List) entities, result);
|
| 236 | 236 |
}
|
| 237 | 237 |
}
|
| ... | ... | @@ -59,8 +59,8 @@ |
| 59 | 59 |
<artifactId>common-service</artifactId>
|
| 60 | 60 |
</dependency>
|
| 61 | 61 |
<dependency>
|
| 62 |
- <groupId>fr.ird.observe.toolkit</groupId>
|
|
| 63 |
- <artifactId>topia-extension</artifactId>
|
|
| 62 |
+ <groupId>io.ultreia.java4all.topia</groupId>
|
|
| 63 |
+ <artifactId>persistence</artifactId>
|
|
| 64 | 64 |
</dependency>
|
| 65 | 65 |
|
| 66 | 66 |
<!-- nuiton dependencies -->
|
| ... | ... | @@ -32,7 +32,6 @@ import fr.ird.observe.dto.reference.ReferentialDtoReference; |
| 32 | 32 |
import org.nuiton.version.Version;
|
| 33 | 33 |
|
| 34 | 34 |
import java.util.Set;
|
| 35 |
-import java.util.stream.Collectors;
|
|
| 36 | 35 |
|
| 37 | 36 |
/**
|
| 38 | 37 |
* Created on 31/12/15.
|
| ... | ... | @@ -135,8 +134,8 @@ public class AddSqlScriptProducerRequest implements ObserveDto { |
| 135 | 134 |
.add("addReferential", addReferential)
|
| 136 | 135 |
.add("addSomeReferential", addSomeReferential)
|
| 137 | 136 |
.add("addData", addData)
|
| 138 |
- .add("dataIds", dataIds == null ? "" : "[" + dataIds.stream().collect(Collectors.joining(", ")) + "]")
|
|
| 139 |
- .add("referentialIds", referentialIds.isEmpty() ? "" : "[" + referentialIds.values().stream().collect(Collectors.joining(", ")) + "]")
|
|
| 137 |
+ .add("dataIds", dataIds == null ? "" : "[" + String.join(", ", dataIds) + "]")
|
|
| 138 |
+ .add("referentialIds", referentialIds.isEmpty() ? "" : "[" + String.join(", ", referentialIds.values()) + "]")
|
|
| 140 | 139 |
.toString();
|
| 141 | 140 |
}
|
| 142 | 141 |
}
|
| ... | ... | @@ -27,7 +27,6 @@ import com.google.common.collect.ImmutableSet; |
| 27 | 27 |
import fr.ird.observe.dto.ObserveDto;
|
| 28 | 28 |
|
| 29 | 29 |
import java.util.Objects;
|
| 30 |
-import java.util.stream.Collectors;
|
|
| 31 | 30 |
|
| 32 | 31 |
/**
|
| 33 | 32 |
* Created on 31/12/15.
|
| ... | ... | @@ -65,7 +64,7 @@ public class DeleteSqlScriptProducerRequest implements ObserveDto { |
| 65 | 64 |
public String toString() {
|
| 66 | 65 |
return MoreObjects.toStringHelper(this)
|
| 67 | 66 |
.add("deleteData", deleteData)
|
| 68 |
- .add("dataIds", dataIds == null ? "" : "[" + dataIds.stream().collect(Collectors.joining(", ")) + "]")
|
|
| 67 |
+ .add("dataIds", dataIds == null ? "" : "[" + String.join(", ", dataIds) + "]")
|
|
| 69 | 68 |
.toString();
|
| 70 | 69 |
}
|
| 71 | 70 |
}
|