...
 
Commits (8)
......@@ -12,7 +12,7 @@
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
<packaging>pom</packaging>
<name>Quadrige3 :: Core</name>
......@@ -134,7 +134,7 @@
<dbunit.version>2.6.0</dbunit.version>
<ehcache.version>2.5.7</ehcache.version>
<fluidoSkinVersion>1.8</fluidoSkinVersion>
<gitflowPluginVersion>1.12.0-EIS</gitflowPluginVersion>
<gitflowPluginVersion>1.14.0</gitflowPluginVersion>
<gson.version>2.8.1</gson.version>
<guava.version>22.0</guava.version>
<jarPluginVersion>2.5</jarPluginVersion>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -44,7 +44,7 @@
# Please fill the missing licenses for dependencies :
#
#
#Mon May 04 10:02:07 CEST 2020
#Fri Jul 10 16:52:18 CEST 2020
com.oracle--ojdbc7--12.1.0.2.0=OTN license
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
dom4j--dom4j--1.6.1=BSD License
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-core-client</artifactId>
......
......@@ -264,10 +264,18 @@ public abstract class QuadrigeCoreConfiguration extends ApplicationConfiguration
return applicationConfig.getOptionAsFile(QuadrigeCoreConfigurationOption.CONFIG_DIRECTORY.getKey());
}
public File getExtractionDirectory() {
return applicationConfig.getOptionAsFile(QuadrigeCoreConfigurationOption.EXTRACTION_DIRECTORY.getKey());
}
public File getExtractionConfigDirectory() {
return applicationConfig.getOptionAsFile(QuadrigeCoreConfigurationOption.EXTRACTION_CONFIG_DIRECTORY.getKey());
}
public File getContextDirectory() {
return applicationConfig.getOptionAsFile(QuadrigeCoreConfigurationOption.CONTEXT_DIRECTORY.getKey());
}
public File getMeasurementGridPresetsDirectory() {
return applicationConfig.getOptionAsFile(QuadrigeCoreConfigurationOption.MEASUREMENT_GRID_PRESETS_DIRECTORY.getKey());
}
......
......@@ -59,16 +59,28 @@ public enum QuadrigeCoreConfigurationOption implements ConfigOptionDef {
"${quadrige3.data.directory}/measurementGridPresets",
File.class),
EXTRACTION_DIRECTORY(
"quadrige3.extraction.directory",
n("quadrige3.config.option.extraction.directory.description"),
"${quadrige3.data.directory}/extraction",
File.class),
EXTRACTION_CONFIG_DIRECTORY(
"quadrige3.extractionConfig.directory",
n("quadrige3.config.option.extractionConfig.directory.description"),
"${quadrige3.data.directory}/extractionConfig",
File.class),
CONTEXT_DIRECTORY(
"quadrige3.context.directory",
n("quadrige3.config.option.context.directory.description"),
"${quadrige3.data.directory}/context",
File.class),
DB_OTHER_DIRECTORIES(
"quadrige3.persistence.db.other.directories",
n("quadrige3.config.option.persistence.db.other.directories.description"),
"${quadrige3.measurementGridPresets.directory};${quadrige3.extractionConfig.directory}",
"${quadrige3.measurementGridPresets.directory};${quadrige3.extraction.directory};${quadrige3.extractionConfig.directory};${quadrige3.context.directory}",
String.class),
/*
......
......@@ -21,8 +21,10 @@ quadrige3.config.option.authentication.mock.username.description='mock' user log
quadrige3.config.option.authentication.password.description=Default password
quadrige3.config.option.authentication.username.description=Default login
quadrige3.config.option.config.directory.description=Configuration directory
quadrige3.config.option.context.directory.description=Directory for context files
quadrige3.config.option.debug.mode.description=Activate debug mode
quadrige3.config.option.extractionConfig.directory.description=
quadrige3.config.option.extraction.directory.description=Directory for extraction filters
quadrige3.config.option.extractionConfig.directory.description=Directory where extraction filter configuration files are stored
quadrige3.config.option.i18n.locale.description=Locale
quadrige3.config.option.install.db.url.description=
quadrige3.config.option.launch.mode.description=Application execution mode
......
......@@ -21,7 +21,9 @@ quadrige3.config.option.authentication.mock.username.description=Login del usuar
quadrige3.config.option.authentication.password.description=Contraseña por defecto
quadrige3.config.option.authentication.username.description=Login por defecto
quadrige3.config.option.config.directory.description=Directorio para el archivo de configuración
quadrige3.config.option.context.directory.description=Directorio para archivos de contexto
quadrige3.config.option.debug.mode.description=Activar modo de depuración
quadrige3.config.option.extraction.directory.description=Directorio de filtros de extracción
quadrige3.config.option.extractionConfig.directory.description=Directorio donde se almacenan los ficheros de configuración de los filtros de extracciones
quadrige3.config.option.i18n.locale.description=Idioma utilizado por la aplicación
quadrige3.config.option.install.db.url.description=URL del fichero de descripción de la instalación de la base de datos local
......
......@@ -21,7 +21,9 @@ quadrige3.config.option.authentication.mock.username.description=Login de l'util
quadrige3.config.option.authentication.password.description=Mot de passe par défaut
quadrige3.config.option.authentication.username.description=Login par défaut
quadrige3.config.option.config.directory.description=Répertoire pour le fichier de configuration
quadrige3.config.option.context.directory.description=Répertoire pour les fichiers de contexte
quadrige3.config.option.debug.mode.description=Active le mode debug
quadrige3.config.option.extraction.directory.description=Répertoire pour les filtres d'extraction
quadrige3.config.option.extractionConfig.directory.description=Répertoire où sont stockés les fichiers de configuration des filtres d'extractions
quadrige3.config.option.i18n.locale.description=Langue utilisée dans l'application
quadrige3.config.option.install.db.url.description=URL du fichier de description d'installation de base de données locale
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-core-server</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-core-shared</artifactId>
......
......@@ -10,18 +10,20 @@ package fr.ifremer.quadrige3.core.dao.technical.factorization.pmfm;
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections4.MapUtils;
import javax.annotation.Nonnull;
import java.math.BigDecimal;
import java.util.*;
......@@ -37,18 +39,42 @@ import java.util.*;
*/
public class AllowedQualitativeValuesMap {
private HashMap<Integer, Map<Integer, Map<AllowedQualitativeValuesMap.SourceEntry, AllowedQualitativeValuesMap.AllowedValues>>> map = new HashMap<>();
private final HashMap<Integer, Map<Integer, Map<AllowedQualitativeValuesMap.SourceEntry, AllowedQualitativeValuesMap.AllowedValues>>> map = new HashMap<>();
/**
* Add allowed values for the specific qualitative value
*
* @param targetPmfmId the target pmfm id
* @param sourcePmfmId the source pmfm id
* @param sourceQualitativeValueId the source qualitative value
* @param targetValueIds the target qualitative value ids
*/
public void addTargetValues(int targetPmfmId, int sourcePmfmId, Integer sourceQualitativeValueId, Set<Integer> targetValueIds) {
addTargetValues(targetPmfmId, sourcePmfmId, new SourceEntry(sourceQualitativeValueId), targetValueIds);
}
/**
* Add allowed values for the specific qualitative value
*
* @param targetPmfmId the target pmfm id
* @param sourcePmfmId the source pmfm id
* @param sourceNumericalValue the source numerical value
* @param targetValueIds the target qualitative value ids
*/
public void addTargetValues(int targetPmfmId, int sourcePmfmId, BigDecimal sourceNumericalValue, Set<Integer> targetValueIds) {
addTargetValues(targetPmfmId, sourcePmfmId, new SourceEntry(sourceNumericalValue), targetValueIds);
}
/**
* Add allowed values
*
* @param targetPmfmId the target pmfm id
* @param sourcePmfmId the source pmfm id
* @param sourceEntry the source entry (qualitative or numerical)
* @param targetValueIds the target qualitative value ids
*/
private void addTargetValues(int targetPmfmId, int sourcePmfmId, SourceEntry sourceEntry, Set<Integer> targetValueIds) {
// get the source map of this target pmfm id (or create it if absent)
......@@ -147,7 +173,9 @@ public class AllowedQualitativeValuesMap {
return isAllAllowed() || contains(value);
}
public void addOrRetain(AllowedValues list) {
public void addOrRetain(@Nonnull AllowedValues list) {
if (list.isAllAllowed())
return; // Don't process if the list is empty (=isAllAllowed) (Mantis Dali #52459)
if (isEmpty()) {
addAll(list);
} else {
......@@ -162,13 +190,13 @@ public class AllowedQualitativeValuesMap {
}
@Override
public boolean addAll(Collection<? extends Integer> c) {
public boolean addAll(@Nonnull Collection<? extends Integer> c) {
allAllowed = false;
return super.addAll(c);
}
@Override
public boolean retainAll(Collection<?> c) {
public boolean retainAll(@Nonnull Collection<?> c) {
allAllowed = false;
return super.retainAll(c);
}
......@@ -176,8 +204,8 @@ public class AllowedQualitativeValuesMap {
public static class SourceEntry {
private Integer qualitativeValueId;
private BigDecimal numericalValue;
private final Integer qualitativeValueId;
private final BigDecimal numericalValue;
public SourceEntry(Integer qualitativeValueId) {
this.qualitativeValueId = qualitativeValueId;
......@@ -196,7 +224,15 @@ public class AllowedQualitativeValuesMap {
@Override
public boolean equals(Object obj) {
return hashCode() == obj.hashCode();
return getClass().equals(obj.getClass()) && hashCode() == obj.hashCode();
}
@Override
public String toString() {
return "SourceEntry{" +
"qualitativeValueId=" + qualitativeValueId +
", numericalValue=" + numericalValue +
'}';
}
}
}
......@@ -36,10 +36,9 @@ import java.util.stream.Collectors;
*/
public class QualitativeValuesCombinationValidator extends CombinationValidator {
private long maxCount;
private long count;
private final long maxCount;
private final AllowedQualitativeValuesMap allowedQualitativeValuesMap;
private long count;
public QualitativeValuesCombinationValidator(long maxCount, AllowedQualitativeValuesMap allowedQualitativeValuesMap) {
this.maxCount = maxCount;
......@@ -58,8 +57,9 @@ public class QualitativeValuesCombinationValidator extends CombinationValidator
if (invalidCombination == null) {
for (IntegerPair source : sources) {
// Test this target is allowed for this source
if (!allowedQualitativeValuesMap.getAllowedValues(target.getKey(), source.getKey(), source.getValue()).isAllowed(target.getValue())) {
// Test this target is allowed for this source, and vice versa (Mantis Dali #52459)
if (!allowedQualitativeValuesMap.getAllowedValues(target.getKey(), source.getKey(), source.getValue()).isAllowed(target.getValue())
&& !allowedQualitativeValuesMap.getAllowedValues(source.getKey(), target.getKey(), target.getValue()).isAllowed(source.getValue())) {
// Create an invalid combination and stop loop
invalidCombination = new Combination(ImmutableList.of(target, source));
break;
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-mda</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-magicdraw-plugin</artifactId>
......@@ -14,6 +14,8 @@
<properties>
<magicdrawVersion>17.0.2</magicdrawVersion>
<javaVersion>1.7</javaVersion>
<signatureArtifactId>java17</signatureArtifactId>
<magicdrawPluginId>fr.ifremer.quadrige3.magicdraw</magicdrawPluginId>
......
......@@ -14,7 +14,7 @@
# Please fill the missing licenses for dependencies :
#
#
#Mon May 04 10:01:25 CEST 2020
#Fri Jul 10 16:51:36 CEST 2020
com.nomagic--javax_jmi-1_0-fr--17.0.2=
com.nomagic--md--17.0.2=
com.nomagic--md_api--17.0.2=
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-mda-client-hsqldb</artifactId>
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-mda-server-oracle</artifactId>
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-mda-server-pgsql</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-synchro-server</artifactId>
......
......@@ -46,6 +46,7 @@
<prop key="url">${quadrige3.synchro.server.jdbc.url}</prop>
<prop key="user">${quadrige3.synchro.server.jdbc.username}</prop>
<prop key="password">${quadrige3.synchro.server.jdbc.password}</prop>
<prop key="currentSchema">${quadrige3.synchro.server.jdbc.schema}</prop>
</props>
</property>
</bean>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-synchro</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-test-shared</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>quadrige3-core</artifactId>
<groupId>fr.ifremer.quadrige3</groupId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-ui-swing-common</artifactId>
......
......@@ -463,7 +463,12 @@ public abstract class AbstractTableUIHandler<R extends AbstractRowUIModel<?, ?>,
lastMinIndex = minIndex;
lastMaxIndex = maxIndex;
// before all, desactivate rowMonitor to avoid PROPERTY_SELECTED event to fire useless
// Stop editing if multiple row selected
if (minIndex != maxIndex) {
getTable().editingStopped(null);
}
// Deactivate rowMonitor to avoid PROPERTY_SELECTED event to fire useless
// also prevent recalculateRowSelection to execute too often
rowMonitor.setBean(null);
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.15</version>
<version>3.6.16</version>
</parent>
<artifactId>quadrige3-ui-updater</artifactId>
......
......@@ -29,6 +29,18 @@
</properties>
<body>
<release version="3.6.16" date="2020-07-10" description="Stable Release">
<action dev="ludovic.pecquot@e-is.pro" type="fix" issue="52459">
QualitativeValuesCombinationValidator: allow bidirectional combination validation to avoid missing allowed values
</action>
<action dev="ludovic.pecquot@e-is.pro" type="add" issue="52386">
Add context and extraction directories in configuration options
</action>
<action dev="ludovic.pecquot@e-is.pro" type="fix">
Pgsql: jdbc schema is now correctly used by DataSource
</action>
</release>
<release version="3.6.15" date="2020-05-04" description="Stable Release">
<action dev="ludovic.pecquot@e-is.pro" type="fix">
db-changelog-3.2.0 for postgres : rename misspelling primary key
......
......@@ -5,6 +5,7 @@ Les versions des outils actuellement en production sont <span style="background:
|Quadrige3-Core|Oracle Schema|PostgreSQL Schema|HSQLDB Schema|ReefDb |DALI |Quadrige²|
|--------------|-------------|-----------------|-------------|------------|-----|---------|
|3.6.16 |3.2.0 |3.2.0 |3.2.0 | |5.2.0| |
|3.6.15 |3.2.0 |3.2.0 |3.2.0 | |5.1.4| |
|3.6.14 |3.2.0 |3.2.0 |3.2.0 |3.9.9 | | |
|3.6.13 |3.2.0 |3.2.0 |3.2.0 |3.9.7, 3.9.8|5.1.3| |
......
......@@ -5,6 +5,7 @@ Tools versions currently in operation are <span style="background:yellow">**high
|Quadrige3-Core|Oracle Schema|PostgreSQL Schema|HSQLDB Schema|ReefDb |DALI |Quadrige²|
|--------------|-------------|-----------------|-------------|------------|-----|---------|
|3.6.16 |3.2.0 |3.2.0 |3.2.0 | |5.2.0| |
|3.6.15 |3.2.0 |3.2.0 |3.2.0 | |5.1.4| |
|3.6.14 |3.2.0 |3.2.0 |3.2.0 |3.9.9 | | |
|3.6.13 |3.2.0 |3.2.0 |3.2.0 |3.9.7, 3.9.8|5.1.3| |
......