This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 86101acc454bb602a772796038c2e8910f50d336 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Aug 31 14:00:56 2016 +0200 clean validation code + use new mojos --- application-swing/pom.xml | 8 - .../swing/validation/ValidationService.java | 153 ---- .../swing/validation/ValidatorsMap.java | 120 --- pom.xml | 4 +- .../actions/validate/ValidateServiceUtils.java | 2 +- .../service/actions/validate/ValidatorDto.java | 27 +- .../service/actions/validate/ValidatorDtos.java | 4 +- ...es.service.actions.report.model.ReportOperation | 6 - .../service/actions/validate/validators.json | 843 --------------------- services-topia/pom.xml | 58 +- .../GenerateValidatorDescriptorsFileTool.java | 161 ---- services-topia/src/test/resources/validators.xml | 18 +- 12 files changed, 32 insertions(+), 1372 deletions(-) diff --git a/application-swing/pom.xml b/application-swing/pom.xml index fc96185..795de81 100644 --- a/application-swing/pom.xml +++ b/application-swing/pom.xml @@ -424,7 +424,6 @@ <id>scan-sources</id> <goals> <goal>parserJava</goal> - <goal>parserValidation</goal> <goal>gen</goal> </goals> <configuration> @@ -433,13 +432,6 @@ <specificGoal>parserJava</specificGoal> <basedir>${project.build.directory}/generated-sources/java/</basedir> </entry> - <entry> - <specificGoal>parserValidation</specificGoal> - <basedir>${project.basedir}/src/main/resources/</basedir> - <includes> - <param>**/**-validation.xml</param> - </includes> - </entry> </entries> </configuration> </execution> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ValidationService.java b/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ValidationService.java deleted file mode 100644 index ef99999..0000000 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ValidationService.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * #%L - * ObServe :: Application Swing - * %% - * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU 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 General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ -package fr.ird.observe.application.swing.validation; - -import fr.ird.observe.services.dto.AbstractObserveDto; -import fr.ird.observe.services.dto.IdDto; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.nuiton.validator.NuitonValidatorScope; -import org.nuiton.validator.bean.simple.SimpleBeanValidator; - -import java.util.Set; - -/** - * Contrat du service de validation des données. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 1.3 - */ -public class ValidationService { - - /** Logger */ - private static final Log log = - LogFactory.getLog(ValidationService.class); - - /** - * Obtenir le validateur d'un type objet - * - * @param context le lastName du context de validation - * @param scopes les scopes autorisés - * @param klass type de l'objet à valider - * @param <B> type de l'objet à valider - * @return le validateur trouvé ou {@code null} - */ - public <B> SimpleBeanValidator<B> getValidator(String context, - NuitonValidatorScope[] scopes, - Class<B> klass) { - - SimpleBeanValidator<B> valitator = SimpleBeanValidator.newValidator( - klass, - context, - scopes - ); - - Set<NuitonValidatorScope> resultScopes = valitator.getEffectiveScopes(); - if (resultScopes.isEmpty()) { - valitator = null; - if (log.isDebugEnabled()) { - log.debug(klass + " : validator skip (no scopes detected)"); - } - } else { - if (log.isDebugEnabled()) { - log.debug(klass + " : keep validator " + valitator); - } - } - return valitator; - } - - /** - * Obtenir le dictionnaire des validateurs pour les types d'entités donnés. - * - * @param contextName le lastName du context de validation - * @param scopes les scopes autorisés - * @param beanclass types des entités - * @return le dictionnaire des validateurs par type d'entité. - */ - public ValidatorsMap getValidators( - String contextName, - NuitonValidatorScope[] scopes, - Class<?>... beanclass) { - return detectValidators( - contextName, - scopes, - beanclass - ); - } - - /** - * Obtenir le dictionnaire des validateurs pour les entités donnés. - * - * <b>Note:</b> On effectue un parcours des entités pour connaitre les types - * d'objets à valider, il faut donc des les collections des entités soient - * toutes chargées (ou l'objet attaché à une transaction...). - * - * @param contextName le lastName du context de validation - * @param scopes les scopes autorisés - * @param dtos les entités - * @return le dictionnaire des validateurs par type d'entité. - */ - public ValidatorsMap getValidators( - String contextName, - NuitonValidatorScope[] scopes, - IdDto... dtos) { - - //FIXME - Set<Class<? extends AbstractObserveDto>> types = null; -// try { -// types = TopiaEntityHelper.detectTypes( -// ObserveEntityEnum.values(), -// entities -// ); -// } catch (TopiaException e) { -// throw new IllegalArgumentException( -// "could not obtains types for reason " + e.getMessage(), e); -// } - - return detectValidators( - contextName, - scopes, - types.toArray(new Class<?>[types.size()]) - ); - } - - @SuppressWarnings("unchecked") - public <T> ValidatorsMap detectValidators( - String context, - NuitonValidatorScope[] scopes, - Class<?>... types) { - - ValidatorsMap result = new ValidatorsMap(); - - for (Class<?> c : types) { - // on cherche le validateur - SimpleBeanValidator<T> validator = (SimpleBeanValidator<T>) - getValidator(context, scopes, c); - if (validator != null) { - // on enregistre le validateur - result.put(c, validator); - } - } - return result; - } -} diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ValidatorsMap.java b/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ValidatorsMap.java deleted file mode 100644 index 5131642..0000000 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/validation/ValidatorsMap.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * #%L - * ObServe :: Application Swing - * %% - * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU 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 General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ -package fr.ird.observe.application.swing.validation; - -import org.nuiton.validator.NuitonValidatorScope; -import org.nuiton.validator.bean.simple.SimpleBeanValidator; - -import java.util.Collection; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -/** - * Un dictionnaire de validateurs ordonnees par le type de leur bean. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 2.1 - */ -public class ValidatorsMap implements Map<Class<?>, SimpleBeanValidator<?>> { - - protected final Map<Class<?>, SimpleBeanValidator<?>> delegate; - - public ValidatorsMap() { - delegate = new HashMap<>(); - } - - public NuitonValidatorScope[] getScopes() { - EnumSet<NuitonValidatorScope> result = - EnumSet.noneOf(NuitonValidatorScope.class); - for (SimpleBeanValidator<?> b : values()) { - result.addAll(b.getScopes()); - } - return result.toArray(new NuitonValidatorScope[result.size()]); - } - - public <X> SimpleBeanValidator<X> getValidator(Class<X> klass) { - return (SimpleBeanValidator<X>) get(klass); - } - - @Override - public int size() { - return delegate.size(); - } - - @Override - public boolean isEmpty() { - return delegate.isEmpty(); - } - - @Override - public boolean containsKey(Object key) { - return delegate.containsKey(key); - } - - @Override - public boolean containsValue(Object value) { - return delegate.containsValue(value); - } - - @Override - public SimpleBeanValidator<?> get(Object key) { - return delegate.get(key); - } - - @Override - public SimpleBeanValidator<?> put(Class<?> key, SimpleBeanValidator<?> value) { - return delegate.put(key, value); - } - - @Override - public SimpleBeanValidator<?> remove(Object key) { - return delegate.remove(key); - } - - @Override - public void putAll(Map<? extends Class<?>, ? extends SimpleBeanValidator<?>> m) { - delegate.putAll(m); - } - - @Override - public void clear() { - delegate.clear(); - } - - @Override - public Set<Class<?>> keySet() { - return delegate.keySet(); - } - - @Override - public Collection<SimpleBeanValidator<?>> values() { - return delegate.values(); - } - - @Override - public Set<Entry<Class<?>, SimpleBeanValidator<?>>> entrySet() { - return delegate.entrySet(); - } - -} diff --git a/pom.xml b/pom.xml index 08e5aaa..b93b1ef 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ </developers> <modules> - <module>check-api-maven-plugin</module> + <module>maven-plugin</module> <module>topia-extension</module> <module>topia-templates-extension</module> <module>services-configuration-api</module> @@ -92,12 +92,14 @@ <module>test</module> <module>entities</module> <module>entities-migration</module> + <module>services-topia-validators</module> <module>services-topia-validation</module> <module>services-topia</module> <module>services-rest</module> <module>services-runner</module> <module>application-web</module> <module>application-swing-decoration</module> + <module>application-swing-validators</module> <module>application-swing-validation</module> <module>application-swing</module> </modules> diff --git a/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidateServiceUtils.java b/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidateServiceUtils.java index 534a48c..fd531c1 100644 --- a/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidateServiceUtils.java +++ b/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidateServiceUtils.java @@ -34,7 +34,7 @@ import java.io.Reader; */ public class ValidateServiceUtils { - protected static final String RESOURCE_VALIDATORS = "validators.json"; + private static final String RESOURCE_VALIDATORS = "/META-INF/validators/services-topia-validation.json"; public static ImmutableSet<ValidatorDto> getValidators() { diff --git a/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDto.java b/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDto.java index 565635d..d231190 100644 --- a/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDto.java +++ b/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDto.java @@ -26,26 +26,27 @@ import fr.ird.observe.services.dto.IdDto; import org.nuiton.validator.NuitonValidatorScope; import java.util.Objects; +import java.util.Set; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com */ public class ValidatorDto { - protected final Class<? extends IdDto> dtoType; + private final Class<? extends IdDto> type; + private final NuitonValidatorScope scope; + private final String context; + private final Set<String> fields; - protected final NuitonValidatorScope scope; - - protected final String context; - - public ValidatorDto(Class<? extends IdDto> dtoType, NuitonValidatorScope scope, String context) { - this.dtoType = dtoType; + public ValidatorDto(Class<? extends IdDto> type, NuitonValidatorScope scope, String context, Set<String> fields) { + this.type = type; this.scope = scope; this.context = context; + this.fields = fields; } - public Class<? extends IdDto> getDtoType() { - return dtoType; + public Class<? extends IdDto> getType() { + return type; } public NuitonValidatorScope getScope() { @@ -56,18 +57,22 @@ public class ValidatorDto { return context; } + public Set<String> getFields() { + return fields; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ValidatorDto that = (ValidatorDto) o; - return Objects.equals(dtoType, that.dtoType) && + return Objects.equals(type, that.type) && Objects.equals(scope, that.scope) && Objects.equals(context, that.context); } @Override public int hashCode() { - return Objects.hash(dtoType, scope, context); + return Objects.hash(type, scope, context); } } diff --git a/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDtos.java b/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDtos.java index b9135b5..3444dbc 100644 --- a/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDtos.java +++ b/services-api/src/main/java/fr/ird/observe/services/service/actions/validate/ValidatorDtos.java @@ -41,8 +41,8 @@ public class ValidatorDtos { String context) { return validators.stream().filter(input -> - (validateData && !ReferentialDto.class.isAssignableFrom(input.getDtoType()) - || validateReferential && ReferentialDto.class.isAssignableFrom(input.getDtoType())) + (validateData && !ReferentialDto.class.isAssignableFrom(input.getType()) + || validateReferential && ReferentialDto.class.isAssignableFrom(input.getType())) && scopes.contains(input.getScope()) && context.equals(input.getContext())). collect(Collectors.toSet()); diff --git a/services-api/src/main/resources/META-INF/services/fr.ird.observe.services.service.actions.report.model.ReportOperation b/services-api/src/main/resources/META-INF/services/fr.ird.observe.services.service.actions.report.model.ReportOperation deleted file mode 100644 index 10334f3..0000000 --- a/services-api/src/main/resources/META-INF/services/fr.ird.observe.services.service.actions.report.model.ReportOperation +++ /dev/null @@ -1,6 +0,0 @@ -fr.ird.observe.services.service.actions.report.model.operations.SumIntColumn -fr.ird.observe.services.service.actions.report.model.operations.SumColumn -fr.ird.observe.services.service.actions.report.model.operations.SumIntRow -fr.ird.observe.services.service.actions.report.model.operations.SumRow -fr.ird.observe.services.service.actions.report.model.operations.ExecuteRequests -fr.ird.observe.services.service.actions.report.model.operations.GroupByLength \ No newline at end of file diff --git a/services-api/src/main/resources/fr/ird/observe/services/service/actions/validate/validators.json b/services-api/src/main/resources/fr/ird/observe/services/service/actions/validate/validators.json deleted file mode 100644 index 6ac9da1..0000000 --- a/services-api/src/main/resources/fr/ird/observe/services/service/actions/validate/validators.json +++ /dev/null @@ -1,843 +0,0 @@ -/*- - * #%L - * ObServe :: Services API - * %% - * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU 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 General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ -[ - { - "dtoType": "fr.ird.observe.services.dto.referential.CountryDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.CountryDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.FpaZoneDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.FpaZoneDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.GearDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.GearDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.GearCaracteristicDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.GearCaracteristicDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.GearCaracteristicTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.GearCaracteristicTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.HarbourDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.HarbourDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.LengthWeightParameterDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.LengthWeightParameterDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.OceanDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.OceanDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.OrganismDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.OrganismDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.PersonDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.PersonDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.ProgramDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.ProgramDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SexDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SexDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SpeciesDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SpeciesDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SpeciesGroupDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SpeciesGroupDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SpeciesListDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.SpeciesListDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.VesselDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.VesselDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.VesselSizeCategoryDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.VesselSizeCategoryDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.VesselTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.VesselTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.BaitHaulingStatusDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.BaitHaulingStatusDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.BaitSettingStatusDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.BaitSettingStatusDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.BaitTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.BaitTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.CatchFateLonglineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.CatchFateLonglineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.EncounterTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.EncounterTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HealthnessDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HealthnessDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HookPositionDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HookPositionDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HookSizeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HookSizeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HookTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.HookTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.ItemHorizontalPositionDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.ItemHorizontalPositionDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.ItemVerticalPositionDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.ItemVerticalPositionDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.LightsticksColorDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.LightsticksColorDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.LightsticksTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.LightsticksTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.LineTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.LineTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.MaturityStatusDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.MaturityStatusDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.MitigationTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.MitigationTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SensorBrandDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SensorBrandDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SensorDataFormatDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SensorDataFormatDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SensorTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SensorTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SettingShapeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SettingShapeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SizeMeasureTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.SizeMeasureTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.StomacFullnessDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.StomacFullnessDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.TripTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.TripTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.VesselActivityLonglineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.VesselActivityLonglineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.WeightMeasureTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.longline.WeightMeasureTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.DetectionModeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.DetectionModeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObjectFateDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObjectFateDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObjectOperationDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObjectOperationDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObjectTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObjectTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObservedSystemDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ObservedSystemDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ReasonForDiscardDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ReasonForDiscardDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ReasonForNoFishingDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ReasonForNoFishingDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ReasonForNullSetDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.ReasonForNullSetDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.SpeciesFateDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.SpeciesFateDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.SpeciesStatusDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.SpeciesStatusDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.SurroundingActivityDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.SurroundingActivityDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.TransmittingBuoyOperationDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.TransmittingBuoyOperationDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.TransmittingBuoyTypeDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.TransmittingBuoyTypeDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.VesselActivitySeineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.VesselActivitySeineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.WeightCategoryDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.WeightCategoryDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.WindDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.referential.seine.WindDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.ActivityLonglineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.ActivityLonglineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.BaitsCompositionDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.BranchlineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.BranchlineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.BranchlinesCompositionDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.CatchLonglineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.CatchLonglineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.EncounterDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.EncounterDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.FloatlinesCompositionDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.GearUseFeaturesLonglineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.HooksCompositionDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.SensorUsedDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.SensorUsedDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.SetLonglineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.SetLonglineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.TdrDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.TdrDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.TripLonglineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.longline.TripLonglineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.ActivitySeineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.ActivitySeineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.FloatingObjectDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.FloatingObjectDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.GearUseFeaturesSeineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.NonTargetCatchDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.NonTargetCatchDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.NonTargetLengthDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.NonTargetLengthDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.NonTargetSampleDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.ObjectObservedSpeciesDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.ObjectSchoolEstimateDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.ObjectSchoolEstimateDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.RouteDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.RouteDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.SchoolEstimateDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.SetSeineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.SetSeineDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.TargetLengthDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.TargetLengthDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.TargetSampleDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.TransmittingBuoyDto", - "scope": "WARNING", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.TransmittingBuoyDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.TripSeineDto", - "scope": "ERROR", - "context": "service" - }, - { - "dtoType": "fr.ird.observe.services.dto.seine.TripSeineDto", - "scope": "WARNING", - "context": "service" - } -] diff --git a/services-topia/pom.xml b/services-topia/pom.xml index 1325205..917c9a5 100644 --- a/services-topia/pom.xml +++ b/services-topia/pom.xml @@ -84,10 +84,6 @@ <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - </dependency> <!-- Nuiton --> <dependency> @@ -170,6 +166,7 @@ <artifactId>gmavenplus-plugin</artifactId> <executions> <execution> + <id>generate-reflections.xml</id> <phase>process-classes</phase> <goals> <goal>execute</goal> @@ -201,59 +198,6 @@ </plugins> - <pluginManagement> - <plugins> - <!--FIXME Comprendre pourquoi on doit avoir cette dependence en scope compile (sinon ça ne compile pas) --> - <plugin> - <artifactId>maven-dependency-plugin</artifactId> - <!--configuration> - <ignoredUnusedDeclaredDependencies> - <ignoredUnusedDeclaredDependency>org.nuiton.topia:topia-service-migration - </ignoredUnusedDeclaredDependency> - </ignoredUnusedDeclaredDependencies> - </configuration--> - </plugin> - </plugins> - </pluginManagement> </build> - <profiles> - - <!-- Pour générer le fichier validators.json et le placer dans la class-path --> - <profile> - <id>regenerate-validators-decriptor</id> - <build> - <defaultGoal>process-classes</defaultGoal> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <executions> - <execution> - <phase>process-classes</phase> - <goals> - <goal>java</goal> - </goals> - </execution> - </executions> - <configuration> - <mainClass>fr.ird.observe.services.topia.service.actions.validate.GenerateValidatorDescriptorsFileTool - </mainClass> - <arguments> - <argument> - ${project.basedir}/src/main/resources/fr/ird/observe/services/service/actions/validate/validators.json - </argument> - </arguments> - <additionalClasspathElements> - <additionalClasspathElement>${project.basedir}/src/test/resources</additionalClasspathElement> - </additionalClasspathElements> - </configuration> - </plugin> - </plugins> - </build> - - </profile> - </profiles> - - </project> \ No newline at end of file diff --git a/services-topia/src/main/java/fr/ird/observe/services/topia/service/actions/validate/GenerateValidatorDescriptorsFileTool.java b/services-topia/src/main/java/fr/ird/observe/services/topia/service/actions/validate/GenerateValidatorDescriptorsFileTool.java deleted file mode 100644 index 2867ab4..0000000 --- a/services-topia/src/main/java/fr/ird/observe/services/topia/service/actions/validate/GenerateValidatorDescriptorsFileTool.java +++ /dev/null @@ -1,161 +0,0 @@ -package fr.ird.observe.services.topia.service.actions.validate; - -/*- - * #%L - * ObServe :: Services ToPIA Implementation - * %% - * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU 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 General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import com.google.common.base.Charsets; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; -import com.google.common.io.Files; -import com.google.gson.Gson; -import fr.ird.observe.entities.ObserveDataEntity; -import fr.ird.observe.entities.ObserveEntity; -import fr.ird.observe.entities.referentiel.ObserveReferentialEntity; -import fr.ird.observe.services.service.actions.validate.ValidatorDto; -import fr.ird.observe.services.topia.binder.BinderEngine; -import fr.ird.observe.services.dto.DataDto; -import fr.ird.observe.services.dto.IdDto; -import fr.ird.observe.services.dto.gson.ObserveDtoGsonSupplier; -import fr.ird.observe.services.dto.referential.ReferentialDto; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.validator.NuitonValidatorScope; -import org.nuiton.validator.bean.simple.SimpleBeanValidator; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Paths; -import java.util.Map; -import java.util.Set; - -/** - * Un outil pour générer le fichier de description des validateurs trouvés dans le class-path. - * Created on 05/11/15. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 5.0 - */ -public class GenerateValidatorDescriptorsFileTool { - - /** Logger. */ - private static final Log log = LogFactory.getLog(GenerateValidatorDescriptorsFileTool.class); - - public static void main(String... args) throws IOException { - - ImmutableSet<ValidatorDto> validators = getValidators(); - - ObserveDtoGsonSupplier gsonSupplier = new ObserveDtoGsonSupplier(true); - - Gson gson = gsonSupplier.get(); - - String validatorsJson = gson.toJson(validators); - - File targetFile; - if (args.length == 0) { - - targetFile = Paths.get("src", "main", "resources", "fr", "ird", "observe", "services", "service", "actions", "validate", "validators.json").toAbsolutePath().toFile(); - - } else { - - targetFile = Paths.get(args[0]).toAbsolutePath().toFile(); - - } - - Files.createParentDirs(targetFile); - - if (log.isDebugEnabled()) { - log.debug(String.format("Generated validators:\n%s", validatorsJson)); - } - - if (log.isInfoEnabled()) { - log.info(String.format("Write validators descriptors to %s%n", targetFile)); - } - - Files.write(validatorsJson, targetFile, Charsets.UTF_8); - - } - - protected static ImmutableSet<ValidatorDto> getValidators() { - - ImmutableSet.Builder<ValidatorDto> setBuilder = ImmutableSet.builder(); - - NuitonValidatorScope[] scopes = NuitonValidatorScope.values(); - - for (Map.Entry<Class<? extends ObserveReferentialEntity>, Class<? extends ReferentialDto>> entry : BinderEngine.get().getReferentialEntityToDtoTypes().entrySet()) { - - Class<? extends ObserveReferentialEntity> entityType = entry.getKey(); - Class<? extends ReferentialDto> dtoType = entry.getValue(); - - for (String context : ValidateServiceTopia.AVAILABLE_CONTEXT_NAMES) { - Set<ValidatorDto> validatorDtos = getValidatorDtos(context, scopes, entityType, dtoType); - setBuilder.addAll(validatorDtos); - } - - } - - for (Map.Entry<Class<? extends ObserveDataEntity>, Class<? extends DataDto>> entry : BinderEngine.get().getDataEntityToDtoTypes().entrySet()) { - - Class<? extends ObserveDataEntity> entityType = entry.getKey(); - Class<? extends DataDto> dtoType = entry.getValue(); - - for (String context : ValidateServiceTopia.AVAILABLE_CONTEXT_NAMES) { - Set<ValidatorDto> validatorDtos = getValidatorDtos(context, scopes, entityType, dtoType); - setBuilder.addAll(validatorDtos); - } - - } - - return setBuilder.build(); - } - - /** - * Obtenir le validateur d'un type objet - * - * @param context le nom du context de validation - * @param scopes les scopes autorisés - * @param entityType type de l'entité à valider - * @param dtoType type de Dto associé au type d'entité à valider - * @return l'esemble de validateur trouvé - */ - protected static Set<ValidatorDto> getValidatorDtos(String context, - NuitonValidatorScope[] scopes, - Class<? extends ObserveEntity> entityType, - Class<? extends IdDto> dtoType) { - - SimpleBeanValidator valitator = SimpleBeanValidator.newValidator( - entityType, - context, - scopes - ); - - Set<NuitonValidatorScope> resultScopes = valitator.getEffectiveScopes(); - - Set<ValidatorDto> validators = Sets.newHashSet(); - - for (NuitonValidatorScope scope : resultScopes) { - validators.add(new ValidatorDto(dtoType, scope, context)); - } - - - return validators; - } -} diff --git a/services-topia/src/test/resources/validators.xml b/services-topia/src/test/resources/validators.xml index 9fb7c13..cfe24c7 100644 --- a/services-topia/src/test/resources/validators.xml +++ b/services-topia/src/test/resources/validators.xml @@ -52,14 +52,14 @@ <validator name="fieldexpressionwithparams" class="org.nuiton.validator.xwork2.field.FieldExpressionWithParamsValidator"/> <!-- Les validateurs spécifique aux entitées dans observe --> - <validator name="observeCollectionUniqueKey" class="fr.ird.observe.services.topia.validation.validators.ObserveCollectionUniqueKeyValidator"/> - <validator name="collectionUniqueKey" class="fr.ird.observe.services.topia.validation.validators.CollectionUniqueKeyValidator2"/> - <validator name="species_length" class="fr.ird.observe.services.topia.validation.validators.SpeciesLengthFieldValidator"/> - <validator name="species_weight" class="fr.ird.observe.services.topia.validation.validators.SpeciesWeightFieldValidator"/> - <validator name="activitySpeed" class="fr.ird.observe.services.topia.validation.validators.ActivitySpeedValidator"/> - <validator name="activitySimpleSpeed" class="fr.ird.observe.services.topia.validation.validators.ActivitySimpleSpeedValidator"/> - <validator name="activityFinDeVeilleExists" class="fr.ird.observe.services.topia.validation.validators.ActivityFinDeVeilleExistsValidator"/> - <validator name="setLonglineUniqueHomeId" class="fr.ird.observe.services.topia.validation.validators.SetLonglineUniqueHomeIdValidator"/> - <validator name="setLonglineUniqueNumber" class="fr.ird.observe.services.topia.validation.validators.SetLonglineUniqueNumberValidator"/> + <validator name="observeCollectionUniqueKey" class="fr.ird.observe.services.topia.validators.ObserveCollectionUniqueKeyValidator"/> + <validator name="collectionUniqueKey" class="fr.ird.observe.services.topia.validators.CollectionUniqueKeyValidator2"/> + <validator name="species_length" class="fr.ird.observe.services.topia.validators.SpeciesLengthFieldValidator"/> + <validator name="species_weight" class="fr.ird.observe.services.topia.validators.SpeciesWeightFieldValidator"/> + <validator name="activitySpeed" class="fr.ird.observe.services.topia.validators.ActivitySpeedValidator"/> + <validator name="activitySimpleSpeed" class="fr.ird.observe.services.topia.validators.ActivitySimpleSpeedValidator"/> + <validator name="activityFinDeVeilleExists" class="fr.ird.observe.services.topia.validators.ActivityFinDeVeilleExistsValidator"/> + <validator name="setLonglineUniqueHomeId" class="fr.ird.observe.services.topia.validators.SetLonglineUniqueHomeIdValidator"/> + <validator name="setLonglineUniqueNumber" class="fr.ird.observe.services.topia.validators.SetLonglineUniqueNumberValidator"/> </validators> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.