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

Commits:

28 changed files:

Changes:

  • application-swing-configuration/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>application-swing-configuration</artifactId>
    

  • application-swing-decoration/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>application-swing-decoration</artifactId>
    

  • application-swing-validation/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>application-swing-validation</artifactId>
    

  • application-swing-validators/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>application-swing-validators</artifactId>
    

  • application-swing/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>application-swing</artifactId>
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/shared/MoveMultipleDataUIActionSupport.java
    1 1
     package fr.ird.observe.application.swing.ui.actions.shared;
    
    2 2
     
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Application Swing
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2017 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
    +
    
    3 25
     import fr.ird.observe.application.swing.ObserveSwingApplicationContext;
    
    4 26
     import fr.ird.observe.application.swing.ui.ObserveMainUI;
    
    5 27
     import fr.ird.observe.application.swing.ui.content.ContentUI;
    

  • application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/shared/MoveSingleDataUIActionSupport.java
    1 1
     package fr.ird.observe.application.swing.ui.actions.shared;
    
    2 2
     
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Application Swing
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2017 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
    +
    
    3 25
     import fr.ird.observe.application.swing.ObserveOpenDataManager;
    
    4 26
     import fr.ird.observe.application.swing.ObserveSwingApplicationContext;
    
    5 27
     import fr.ird.observe.application.swing.ui.ObserveMainUI;
    

  • application-web-configuration/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>application-web-configuration</artifactId>
    

  • application-web/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>application-web</artifactId>
    

  • entities-migration/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>entities-migration</artifactId>
    

  • entities/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>entities</artifactId>
    

  • entities/src/test/java/fr/ird/observe/H2TimeZoneTest.java
    1
    +package fr.ird.observe;
    
    2
    +
    
    3
    +import java.io.IOException;
    
    4
    +import java.nio.file.Files;
    
    5
    +import java.nio.file.Path;
    
    6
    +import java.nio.file.Paths;
    
    7
    +import java.sql.Connection;
    
    8
    +import java.sql.Date;
    
    9
    +import java.sql.DriverManager;
    
    10
    +import java.sql.PreparedStatement;
    
    11
    +import java.sql.ResultSet;
    
    12
    +import java.sql.SQLException;
    
    13
    +import java.util.Calendar;
    
    14
    +import java.util.TimeZone;
    
    15
    +import org.junit.Assert;
    
    16
    +import org.junit.BeforeClass;
    
    17
    +import org.junit.Test;
    
    18
    +
    
    19
    +/**
    
    20
    + * Created by tchemit on 13/06/17.
    
    21
    + *
    
    22
    + * @author Tony Chemit - dev@tchemit.fr
    
    23
    + */
    
    24
    +public class H2TimeZoneTest {
    
    25
    +
    
    26
    +    public static final TimeZone TIME_ZONE = TimeZone.getTimeZone("Europe/Paris");
    
    27
    +    static String JDBC_URL;
    
    28
    +    static Path path;
    
    29
    +    static java.util.Date expectedDate;
    
    30
    +
    
    31
    +    @BeforeClass
    
    32
    +    public static void beforeClass() throws IOException, SQLException {
    
    33
    +
    
    34
    +        Path dir = Paths.get(System.getProperty("java.io.tmpdir"));
    
    35
    +        Files.createDirectories(dir);
    
    36
    +
    
    37
    +        path = dir.resolve("H2TimeZoneTest-" + System.nanoTime());
    
    38
    +        Files.createDirectories(path);
    
    39
    +        JDBC_URL = String.format("jdbc:h2:file:%s/test", path.toFile().getAbsolutePath());
    
    40
    +
    
    41
    +        Calendar calendar = Calendar.getInstance();
    
    42
    +        calendar.set(Calendar.YEAR, 2016);
    
    43
    +        calendar.set(Calendar.MONTH, 1);
    
    44
    +        calendar.set(Calendar.DAY_OF_MONTH, 1);
    
    45
    +        calendar.set(Calendar.HOUR_OF_DAY, 0);
    
    46
    +        calendar.set(Calendar.MINUTE, 0);
    
    47
    +        calendar.set(Calendar.SECOND, 0);
    
    48
    +        calendar.set(Calendar.MILLISECOND, 0);
    
    49
    +
    
    50
    +        expectedDate = calendar.getTime();
    
    51
    +
    
    52
    +
    
    53
    +        try (Connection connection = DriverManager.getConnection(JDBC_URL)) {
    
    54
    +            try (PreparedStatement preparedStatement = connection.prepareStatement("CREATE TABLE test (simpleDate DATE)")) {
    
    55
    +                preparedStatement.execute();
    
    56
    +            }
    
    57
    +
    
    58
    +            try (PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO test VALUES( ? );")) {
    
    59
    +
    
    60
    +                preparedStatement.setDate(1, new java.sql.Date(expectedDate.getTime()));
    
    61
    +                preparedStatement.execute();
    
    62
    +            }
    
    63
    +            connection.commit();
    
    64
    +        }
    
    65
    +    }
    
    66
    +
    
    67
    +    @Test
    
    68
    +    public void testWithDefaultTimeZone() {
    
    69
    +
    
    70
    +        TimeZone.setDefault(TIME_ZONE);
    
    71
    +        try (Connection connection = DriverManager.getConnection(JDBC_URL)) {
    
    72
    +            try (PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM test LIMIT 1;")) {
    
    73
    +                try (ResultSet resultSet = preparedStatement.executeQuery()) {
    
    74
    +                    boolean next = resultSet.next();
    
    75
    +                    Date actualDate = resultSet.getDate(1);
    
    76
    +                    Assert.assertEquals(expectedDate, actualDate);
    
    77
    +                }
    
    78
    +            }
    
    79
    +            connection.commit();
    
    80
    +        } catch (SQLException e) {
    
    81
    +            e.printStackTrace();
    
    82
    +        }
    
    83
    +    }
    
    84
    +
    
    85
    +    @Test
    
    86
    +    public void testWithUtcTimeZone() {
    
    87
    +
    
    88
    +        TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
    
    89
    +        try (Connection connection = DriverManager.getConnection(JDBC_URL)) {
    
    90
    +            try (PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM test LIMIT 1;")) {
    
    91
    +                try (ResultSet resultSet = preparedStatement.executeQuery()) {
    
    92
    +                    boolean next = resultSet.next();
    
    93
    +                    Date actualDate = resultSet.getDate(1);
    
    94
    +                    Assert.assertEquals(expectedDate, actualDate);
    
    95
    +                }
    
    96
    +            }
    
    97
    +            connection.commit();
    
    98
    +        } catch (SQLException e) {
    
    99
    +            e.printStackTrace();
    
    100
    +        }
    
    101
    +    }
    
    102
    +}

  • observe/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>observe</artifactId>
    

  • pom.xml
    ... ... @@ -32,7 +32,7 @@
    32 32
     
    
    33 33
       <groupId>fr.ird.observe</groupId>
    
    34 34
       <artifactId>pom</artifactId>
    
    35
    -  <version>5.5-SNAPSHOT</version>
    
    35
    +  <version>5.4-SNAPSHOT</version>
    
    36 36
       <packaging>pom</packaging>
    
    37 37
     
    
    38 38
       <name>ObServe :: Pom</name>
    
    ... ... @@ -546,9 +546,7 @@
    546 546
           <dependency>
    
    547 547
             <groupId>com.h2database</groupId>
    
    548 548
             <artifactId>h2</artifactId>
    
    549
    -        <!-- tc20150811 On ne pleut pas utiliser une version plus récente, le format n'est pas compatible -->
    
    550
    -        <!-- FIXME Hum je ne suis pas sur que la 176 soit ok. -->
    
    551
    -        <version>1.3.175</version>
    
    549
    +        <version>1.4.195</version>
    
    552 550
           </dependency>
    
    553 551
     
    
    554 552
           <dependency>
    

  • services-configuration-rest/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-configuration-rest</artifactId>
    

  • services-configuration-topia/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-configuration-topia</artifactId>
    

  • services-configuration/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-configuration</artifactId>
    

  • services-dto/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-dto</artifactId>
    

  • services-rest/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-rest</artifactId>
    

  • services-runner/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-runner</artifactId>
    

  • services-topia-validation/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-topia-validation</artifactId>
    

  • services-topia-validators/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>services-topia-validators</artifactId>
    

  • services-topia/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services-topia</artifactId>
    

  • services/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>services</artifactId>
    

  • test/pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>fr.ird.observe</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>5.5-SNAPSHOT</version>
    
    29
    +    <version>5.4-SNAPSHOT</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <artifactId>test</artifactId>
    

  • toolbox-maven-plugin/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>toolbox-maven-plugin</artifactId>
    

  • topia-extension/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>topia-extension</artifactId>
    

  • topia-templates-extension/pom.xml
    ... ... @@ -27,7 +27,7 @@
    27 27
       <parent>
    
    28 28
         <groupId>fr.ird.observe</groupId>
    
    29 29
         <artifactId>pom</artifactId>
    
    30
    -    <version>5.5-SNAPSHOT</version>
    
    30
    +    <version>5.4-SNAPSHOT</version>
    
    31 31
       </parent>
    
    32 32
     
    
    33 33
       <artifactId>topia-templates-extension</artifactId>