Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
eadefbc7
by tchemit at 2020-04-01T14:43:33+02:00
-
1dbea9ea
by tchemit at 2020-04-01T14:52:15+02:00
-
57abb56f
by tchemit at 2020-04-01T14:59:28+02:00
-
3a370fe2
by tchemit at 2020-04-01T15:24:30+02:00
-
f57dfbf7
by tchemit at 2020-04-01T15:24:33+02:00
-
adc1bf76
by tchemit at 2020-04-04T14:28:17+02:00
15 changed files:
- client-configuration/src/main/resources/observe-log4j2.xml
- client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/DataSourceEditorLayerUI.java
- client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/ContentUIHandler.java
- client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/data/table/ContentTableEditorLayerUI.java
- + client-datasource-editor-ll/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ll/landing/actions/LandingUIDelete.java
- dto/src/main/models/Observe-30-data-ll-observation.model
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
- observe-i18n/src/main/i18n/translations/observe_es_ES.properties
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- services-local/src/main/java/fr/ird/observe/services/local/service/data/ll/logbook/SetServiceLocal.java
- services-validation/src/main/java/fr/ird/observe/validation/validators/AbstractSpeciesFieldDtoValidator.java
- validation/src/main/i18n/getters/validation-fields.getter
- validation/src/main/i18n/getters/validation-messages.getter
- validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/ActivityDto-create-error-validation.xml
- validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/ActivityDto-update-error-validation.xml
Changes:
| ... | ... | @@ -63,10 +63,10 @@ |
| 63 | 63 |
<AppenderRef ref="console"/>
|
| 64 | 64 |
<AppenderRef ref="File"/>
|
| 65 | 65 |
</Logger>
|
| 66 |
- <Logger name="org.nuiton.jaxx.runtime.swing.action.JAXXObjectActionSupport" level="info" additivity="false">
|
|
| 67 |
- <AppenderRef ref="console"/>
|
|
| 68 |
- <AppenderRef ref="File"/>
|
|
| 69 |
- </Logger>
|
|
| 66 |
+<!-- <Logger name="org.nuiton.jaxx.runtime.swing.action.JAXXObjectActionSupport" level="info" additivity="false">-->
|
|
| 67 |
+<!-- <AppenderRef ref="console"/>-->
|
|
| 68 |
+<!-- <AppenderRef ref="File"/>-->
|
|
| 69 |
+<!-- </Logger>-->
|
|
| 70 | 70 |
<Logger name="org.hibernate" level="warn" additivity="false">
|
| 71 | 71 |
<AppenderRef ref="console"/>
|
| 72 | 72 |
<AppenderRef ref="File"/>
|
| ... | ... | @@ -139,9 +139,9 @@ public class DataSourceEditorLayerUI extends AbstractLayerUI<JComponent> impleme |
| 139 | 139 |
// compute focus owner
|
| 140 | 140 |
FocusTraversalPolicy focusTraversalPolicy = contentUI.getFocusTraversalPolicy();
|
| 141 | 141 |
focusComponent = Objects.requireNonNull(focusTraversalPolicy).getFirstComponent(contentUI);
|
| 142 |
- log.info(String.format("compute new form focus owner: %s", focusComponent));
|
|
| 142 |
+ log.debug(String.format("compute new form focus owner: %s", focusComponent));
|
|
| 143 | 143 |
}
|
| 144 |
- log.info(String.format("Set focus on content: %s", focusComponent));
|
|
| 144 |
+ log.debug(String.format("Set focus on content: %s", focusComponent));
|
|
| 145 | 145 |
// this will change the focus
|
| 146 | 146 |
contentUI.getHandler().setFormFocusOwner(focusComponent);
|
| 147 | 147 |
} finally {
|
| ... | ... | @@ -770,15 +770,15 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe |
| 770 | 770 |
boolean force = Objects.equals(true, button.getClientProperty("forceNavigation"));
|
| 771 | 771 |
if (!force) {
|
| 772 | 772 |
if (!button.isEnabled()) {
|
| 773 |
- log.info(String.format("%sReject (disabled) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 773 |
+ log.debug(String.format("%sReject (disabled) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 774 | 774 |
continue;
|
| 775 | 775 |
}
|
| 776 | 776 |
if (!button.isShowing()) {
|
| 777 |
- log.info(String.format("%sReject (hidden) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 777 |
+ log.debug(String.format("%sReject (hidden) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 778 | 778 |
continue;
|
| 779 | 779 |
}
|
| 780 | 780 |
if (Objects.equals(true, button.getClientProperty("skipNavigation"))) {
|
| 781 |
- log.info(String.format("%sReject (skip) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 781 |
+ log.debug(String.format("%sReject (skip) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 782 | 782 |
continue;
|
| 783 | 783 |
}
|
| 784 | 784 |
|
| ... | ... | @@ -790,11 +790,11 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe |
| 790 | 790 |
}
|
| 791 | 791 |
}
|
| 792 | 792 |
if (!found) {
|
| 793 |
- log.info(String.format("%sReject (out of zone) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 793 |
+ log.debug(String.format("%sReject (out of zone) action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 794 | 794 |
continue;
|
| 795 | 795 |
}
|
| 796 | 796 |
}
|
| 797 |
- log.info(String.format("%sKeep action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 797 |
+ log.debug(String.format("%sKeep action: %s - %s", prefix, button.getName(), button.getText()));
|
|
| 798 | 798 |
result.add(button);
|
| 799 | 799 |
}
|
| 800 | 800 |
}
|
| ... | ... | @@ -858,7 +858,7 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe |
| 858 | 858 |
if (SwingUtilities.getAncestorOfClass(ContentUI.class, newValue) != null) {
|
| 859 | 859 |
// if (SwingUtilities.getAncestorNamed("body", newValue) != null) {
|
| 860 | 860 |
// focus on content ui, let's keep it as the new form focus owner
|
| 861 |
- log.info(String.format("%sSet content form focus owner: %s", prefix, newValue.getName()));
|
|
| 861 |
+ log.debug(String.format("%sSet content form focus owner: %s", prefix, newValue.getName()));
|
|
| 862 | 862 |
focusAdjusting = true;
|
| 863 | 863 |
try {
|
| 864 | 864 |
getModel().setFormFocusOwner(newValue);
|
| ... | ... | @@ -872,7 +872,7 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe |
| 872 | 872 |
if (focusAdjusting) {
|
| 873 | 873 |
return;
|
| 874 | 874 |
}
|
| 875 |
- log.info(String.format("%sFocus changed on form %s", prefix, focusComponent));
|
|
| 875 |
+ log.debug(String.format("%sFocus changed on form %s", prefix, focusComponent));
|
|
| 876 | 876 |
if (getClientUIContext().getMainUIModel().isBlockFocus()) {
|
| 877 | 877 |
return;
|
| 878 | 878 |
}
|
| ... | ... | @@ -883,7 +883,7 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe |
| 883 | 883 |
// SwingUtilities.invokeLater(focusComponent::requestFocusInWindow);
|
| 884 | 884 |
}
|
| 885 | 885 |
|
| 886 |
- log.info(String.format("%sSet form focus on %s", prefix, focusComponent));
|
|
| 886 |
+ log.debug(String.format("%sSet form focus on %s", prefix, focusComponent));
|
|
| 887 | 887 |
if (focusComponent != null) {
|
| 888 | 888 |
focusAdjusting = true;
|
| 889 | 889 |
SwingUtilities.invokeLater(() -> {
|
| ... | ... | @@ -63,7 +63,7 @@ public class ContentTableEditorLayerUI extends ObserveBlockingLayerUI implements |
| 63 | 63 |
|
| 64 | 64 |
boolean focusOnTable = model.isFocusOnTable();
|
| 65 | 65 |
if (focusOnTable) {
|
| 66 |
- log.info(String.format("Enter in table editor zone: %s", e));
|
|
| 66 |
+ log.debug(String.format("Enter in table editor zone: %s", e));
|
|
| 67 | 67 |
model.setFocusOnTable(false);
|
| 68 | 68 |
}
|
| 69 | 69 |
}
|
| ... | ... | @@ -97,16 +97,16 @@ public class ContentTableEditorLayerUI extends ObserveBlockingLayerUI implements |
| 97 | 97 |
if (newValue) {
|
| 98 | 98 |
return;
|
| 99 | 99 |
}
|
| 100 |
- log.info("Set focus on table editor");
|
|
| 100 |
+ log.debug("Set focus on table editor");
|
|
| 101 | 101 |
Component focusComponent = editor.getModel().getFormFocusOwner();
|
| 102 |
- log.info(String.format("Set focus on table editor - initial form focus owner: %s", focusComponent));
|
|
| 102 |
+ log.debug(String.format("Set focus on table editor - initial form focus owner: %s", focusComponent));
|
|
| 103 | 103 |
if (focusComponent == null) {
|
| 104 | 104 |
// compute focus owner
|
| 105 | 105 |
FocusTraversalPolicy focusTraversalPolicy = editor.getFocusTraversalPolicy();
|
| 106 | 106 |
focusComponent = Objects.requireNonNull(focusTraversalPolicy).getFirstComponent(editor);
|
| 107 |
- log.info(String.format("compute new form focus owner: %s", focusComponent));
|
|
| 107 |
+ log.debug(String.format("compute new form focus owner: %s", focusComponent));
|
|
| 108 | 108 |
}
|
| 109 |
- log.info(String.format("Set focus on table editor: %s", focusComponent));
|
|
| 109 |
+ log.debug(String.format("Set focus on table editor: %s", focusComponent));
|
|
| 110 | 110 |
// this will change the focus
|
| 111 | 111 |
editor.getHandler().setFormFocusOwner(focusComponent);
|
| 112 | 112 |
} finally {
|
| 1 |
+package fr.ird.observe.client.datasource.editor.content.data.ll.landing.actions;
|
|
| 2 |
+ |
|
| 3 |
+/*-
|
|
| 4 |
+ * #%L
|
|
| 5 |
+ * ObServe :: Client DataSource Editor LL
|
|
| 6 |
+ * %%
|
|
| 7 |
+ * Copyright (C) 2008 - 2020 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 |
+ |
|
| 25 |
+import fr.ird.observe.client.datasource.editor.content.data.ll.landing.LandingUI;
|
|
| 26 |
+import fr.ird.observe.client.datasource.editor.content.data.open.actions.DeleteActionSupport;
|
|
| 27 |
+import fr.ird.observe.dto.data.ll.landing.LandingDto;
|
|
| 28 |
+import fr.ird.observe.dto.data.ll.landing.LandingReference;
|
|
| 29 |
+import fr.ird.observe.navigation.model.edit.ObserveEditNode;
|
|
| 30 |
+import org.apache.logging.log4j.LogManager;
|
|
| 31 |
+import org.apache.logging.log4j.Logger;
|
|
| 32 |
+ |
|
| 33 |
+/**
|
|
| 34 |
+ * @author Tony Chemit - dev@tchemit.fr
|
|
| 35 |
+ * @since 8
|
|
| 36 |
+ */
|
|
| 37 |
+public class LandingUIDelete extends DeleteActionSupport<LandingDto, LandingReference, LandingUI> {
|
|
| 38 |
+ |
|
| 39 |
+ private static final Logger log = LogManager.getLogger(LandingUIDelete.class);
|
|
| 40 |
+ |
|
| 41 |
+ public LandingUIDelete() {
|
|
| 42 |
+ super(LandingDto.class);
|
|
| 43 |
+ }
|
|
| 44 |
+ |
|
| 45 |
+ @Override
|
|
| 46 |
+ protected void doDelete(LandingUI ui, LandingDto bean, ObserveEditNode<LandingDto> editNode) {
|
|
| 47 |
+ log.info("Will delete Landing " + bean.getId());
|
|
| 48 |
+ getServicesProvider().getLlLandingLandingService().delete(bean.getId());
|
|
| 49 |
+ log.info("Delete done for Landing " + bean.getId());
|
|
| 50 |
+ }
|
|
| 51 |
+ |
|
| 52 |
+}
|
| ... | ... | @@ -164,7 +164,7 @@ haulingStartLongitude + {*:1} Float | notNull |
| 164 | 164 |
haulingEndTimeStamp + {*:1} Date | notNull
|
| 165 | 165 |
haulingEndLatitude + {*:1} Float | notNull
|
| 166 | 166 |
haulingEndLongitude + {*:1} Float | notNull
|
| 167 |
-haulingBreaks + {*:1} Integer | mayNotNull strictlyPositiveNumber
|
|
| 167 |
+haulingBreaks + {*:1} Integer | mayNotNull positiveNumber
|
|
| 168 | 168 |
monitored + {*:1} Boolean
|
| 169 | 169 |
haulingStartQuadrant + {*:1} Integer | notNull
|
| 170 | 170 |
haulingEndQuadrant + {*:1} Integer | notNull
|
| ... | ... | @@ -970,6 +970,7 @@ observe.data.ll.logbook.Activity.currentDirection=Current direction (°) |
| 970 | 970 |
observe.data.ll.logbook.Activity.currentSpeed=Current Speed (kt)
|
| 971 | 971 |
observe.data.ll.logbook.Activity.dataQuality=Data quality
|
| 972 | 972 |
observe.data.ll.logbook.Activity.date=Date
|
| 973 |
+observe.data.ll.logbook.Activity.endTime=End time
|
|
| 973 | 974 |
observe.data.ll.logbook.Activity.endTimeStamp=End timestamp
|
| 974 | 975 |
observe.data.ll.logbook.Activity.fpaZone=FPA Zone
|
| 975 | 976 |
observe.data.ll.logbook.Activity.latitude=Latitude
|
| ... | ... | @@ -3012,7 +3013,9 @@ observe.validation.activity.speed.bound=Activity speed is %s nd, which is more t |
| 3012 | 3013 |
observe.validation.activity.speed.bound.inter=Speed between two activities can't exceed %1$s nd, (activity %2$s speed is %3$s).
|
| 3013 | 3014 |
observe.validation.activityLongline.desactivated.fpaZone=Fpa zone is disabled.
|
| 3014 | 3015 |
observe.validation.activityLongline.endDate.after.currentTrip.startDate=End date must be after current trip start date
|
| 3016 |
+observe.validation.activityLongline.endDate.after.startDate=End date must be after start date
|
|
| 3015 | 3017 |
observe.validation.activityLongline.endDate.before.currentTrip.endDate=End date must be before current trip end date
|
| 3018 |
+observe.validation.activityLongline.endTime.after.startTime=End time must be after start time
|
|
| 3016 | 3019 |
observe.validation.activityLongline.startDate.after.currentTrip.startDate=Start date must be after current trip start date
|
| 3017 | 3020 |
observe.validation.activityLongline.startDate.before.currentTrip.endDate=Start date must be before current trip end date
|
| 3018 | 3021 |
observe.validation.baitsComposition.bound.individualSize=Size must be bound between %s and %s.
|
| ... | ... | @@ -970,6 +970,7 @@ observe.data.ll.logbook.Activity.currentDirection=Current direction (°) \#TODO |
| 970 | 970 |
observe.data.ll.logbook.Activity.currentSpeed=Current speed (kt) \#TODO
|
| 971 | 971 |
observe.data.ll.logbook.Activity.dataQuality=Qualité de donnée \#TODO
|
| 972 | 972 |
observe.data.ll.logbook.Activity.date=Día de observación
|
| 973 |
+observe.data.ll.logbook.Activity.endTime=End time \#TODO
|
|
| 973 | 974 |
observe.data.ll.logbook.Activity.endTimeStamp=End timstamp \#TODO
|
| 974 | 975 |
observe.data.ll.logbook.Activity.fpaZone=ZEE
|
| 975 | 976 |
observe.data.ll.logbook.Activity.latitude=Latitud
|
| ... | ... | @@ -3012,7 +3013,9 @@ observe.validation.activity.speed.bound=La velocidad de la actividad actual es % |
| 3012 | 3013 |
observe.validation.activity.speed.bound.inter=la velocidad entre dos actividades no debe sobrepasar %1$s nd, (actividad %2$s incorrecta, velocidad \: %3$s nd).
|
| 3013 | 3014 |
observe.validation.activityLongline.desactivated.fpaZone=La zona FPA seleccionada está desactivada.
|
| 3014 | 3015 |
observe.validation.activityLongline.endDate.after.currentTrip.startDate=End date must be after current trip start date \#TODO
|
| 3016 |
+observe.validation.activityLongline.endDate.after.startDate=End date must be after start date \#TODO
|
|
| 3015 | 3017 |
observe.validation.activityLongline.endDate.before.currentTrip.endDate=End date must be before current trip end date \#TODO
|
| 3018 |
+observe.validation.activityLongline.endTime.after.startTime=End time must be after start time \#TODO
|
|
| 3016 | 3019 |
observe.validation.activityLongline.startDate.after.currentTrip.startDate=Start date must be after current trip start date \#TODO
|
| 3017 | 3020 |
observe.validation.activityLongline.startDate.before.currentTrip.endDate=Start date must be before current trip end date \#TODO
|
| 3018 | 3021 |
observe.validation.baitsComposition.bound.individualSize=El tamaño debe ser entre %s y %s.
|
| ... | ... | @@ -3023,7 +3026,7 @@ observe.validation.baitsComposition.desactivated.baitType=El tipo de cebo selecc |
| 3023 | 3026 |
observe.validation.baitsComposition.required.baitType=La selección de un tipo es mandatorio.
|
| 3024 | 3027 |
observe.validation.baitsComposition.required.proportion=La proporción está vacía.
|
| 3025 | 3028 |
observe.validation.basket.bound.floatline1Length=La longitud del orinque 1 debe ser entre %1$s y %2$s.
|
| 3026 |
-observe.validation.basket.bound.floatline2Length=La longitud d'orinque 1 debe ser entre %1$s y %2$s.&
|
|
| 3029 |
+observe.validation.basket.bound.floatline2Length=La longitud d'orinque 1 debe ser entre %1$s y %2$s.
|
|
| 3027 | 3030 |
observe.validation.basket.required.settingIdentifier=El identificador de la calada es mandatorio.
|
| 3028 | 3031 |
observe.validation.bound.currentDirection=La dirección actual debe ser un número comprendido entre %1$s y %2$s.
|
| 3029 | 3032 |
observe.validation.bound.currentSpeed=La velocidad actual debe ser un número comprendido entre %1$s y %2$s
|
| ... | ... | @@ -970,6 +970,7 @@ observe.data.ll.logbook.Activity.currentDirection=Direction du courant (°) |
| 970 | 970 |
observe.data.ll.logbook.Activity.currentSpeed=vitesse du courant (nd)
|
| 971 | 971 |
observe.data.ll.logbook.Activity.dataQuality=Qualité de donnée
|
| 972 | 972 |
observe.data.ll.logbook.Activity.date=Jour d'observation
|
| 973 |
+observe.data.ll.logbook.Activity.endTime=Heure de fin
|
|
| 973 | 974 |
observe.data.ll.logbook.Activity.endTimeStamp=Horodatage de fin
|
| 974 | 975 |
observe.data.ll.logbook.Activity.fpaZone=Zone FPA
|
| 975 | 976 |
observe.data.ll.logbook.Activity.latitude=Latitude
|
| ... | ... | @@ -3012,7 +3013,9 @@ observe.validation.activity.speed.bound=La vitesse de l'activité courante est d |
| 3012 | 3013 |
observe.validation.activity.speed.bound.inter=La vitesse entre deux activités ne doit pas dépasser %1$s nd, (l'activité %2$s a une vitesse de %3$s nd).
|
| 3013 | 3014 |
observe.validation.activityLongline.desactivated.fpaZone=La zone FPA sélectionnée est désactivée.
|
| 3014 | 3015 |
observe.validation.activityLongline.endDate.after.currentTrip.startDate=La date de fin doit être supérieure ou égale à la date de début de marée
|
| 3016 |
+observe.validation.activityLongline.endDate.after.startDate=La date de fin doit être supérieure ou égale à la date de début de l'activité
|
|
| 3015 | 3017 |
observe.validation.activityLongline.endDate.before.currentTrip.endDate=La date de fin doit être inférieur ou égale à la date de fin de marée
|
| 3018 |
+observe.validation.activityLongline.endTime.after.startTime=L'heure de fin doit être supérieure ou égale à l'heure de début de l'activité
|
|
| 3016 | 3019 |
observe.validation.activityLongline.startDate.after.currentTrip.startDate=La date doit être supérieure ou égale à la date de début de marée
|
| 3017 | 3020 |
observe.validation.activityLongline.startDate.before.currentTrip.endDate=La date doit être inférieure ou égale à la date de fin de marée
|
| 3018 | 3021 |
observe.validation.baitsComposition.bound.individualSize=La taille doit être comprise entre %s et %s.
|
| ... | ... | @@ -3023,7 +3026,7 @@ observe.validation.baitsComposition.desactivated.baitType=Le type d'appât séle |
| 3023 | 3026 |
observe.validation.baitsComposition.required.baitType=La sélection d'un type est obligatoire.
|
| 3024 | 3027 |
observe.validation.baitsComposition.required.proportion=Proportion non renseignée.
|
| 3025 | 3028 |
observe.validation.basket.bound.floatline1Length=La longueur d'orin 1 être comprise entre %1$s et %2$s.
|
| 3026 |
-observe.validation.basket.bound.floatline2Length=La longueur d'orin 1 être comprise entre %1$s et %2$s.&
|
|
| 3029 |
+observe.validation.basket.bound.floatline2Length=La longueur d'orin 1 être comprise entre %1$s et %2$s.
|
|
| 3027 | 3030 |
observe.validation.basket.required.settingIdentifier=L'identifiant de filage est obligatoire.
|
| 3028 | 3031 |
observe.validation.bound.currentDirection=La direction courant doit être un entier compris entre %1$s et %2$s.
|
| 3029 | 3032 |
observe.validation.bound.currentSpeed=La vitesse courant (en nd) doit être un nombre compris entre %1$s et %2$s.
|
| ... | ... | @@ -120,10 +120,34 @@ public class SetServiceLocal extends ObserveServiceLocal implements SetService { |
| 120 | 120 |
entity.fromDto(getReferentialLocale(), globalCompositionToCopy);
|
| 121 | 121 |
entity.fromDto(getReferentialLocale(), dto);
|
| 122 | 122 |
|
| 123 |
+ // caracteristics tab
|
|
| 124 |
+ |
|
| 125 |
+ entity.setSettingVesselSpeed(entityToCopy.getSettingVesselSpeed());
|
|
| 126 |
+ entity.setTimeBetweenHooks(entityToCopy.getTimeBetweenHooks());
|
|
| 123 | 127 |
entity.setTotalLineLength(entityToCopy.getTotalLineLength());
|
| 124 | 128 |
entity.setBasketLineLength(entityToCopy.getBasketLineLength());
|
| 125 | 129 |
entity.setLengthBetweenBranchlines(entityToCopy.getLengthBetweenBranchlines());
|
| 130 |
+ entity.setShooterUsed(entityToCopy.getShooterUsed());
|
|
| 131 |
+ entity.setShooterSpeed(entityToCopy.getShooterSpeed());
|
|
| 132 |
+ entity.setMaxDepthTargeted(entityToCopy.getMaxDepthTargeted());
|
|
| 133 |
+ entity.setTotalSectionsCount(entityToCopy.getTotalSectionsCount());
|
|
| 134 |
+ entity.setBasketsPerSectionCount(entityToCopy.getBasketsPerSectionCount());
|
|
| 135 |
+ entity.setTotalBasketsCount(entityToCopy.getTotalBasketsCount());
|
|
| 136 |
+ entity.setBranchlinesPerBasketCount(entityToCopy.getBranchlinesPerBasketCount());
|
|
| 137 |
+ entity.setTotalHooksCount(entityToCopy.getTotalHooksCount());
|
|
| 126 | 138 |
entity.setLineType(entityToCopy.getLineType());
|
| 139 |
+ entity.setWeightedSwivel(entityToCopy.getWeightedSwivel());
|
|
| 140 |
+ entity.setSwivelWeight(entityToCopy.getSwivelWeight());
|
|
| 141 |
+ entity.setWeightedSnap(entityToCopy.getWeightedSnap());
|
|
| 142 |
+ entity.setSnapWeight(entityToCopy.getSnapWeight());
|
|
| 143 |
+ entity.setMonitored(entityToCopy.getMonitored());
|
|
| 144 |
+ |
|
| 145 |
+ // lightsticks tab
|
|
| 146 |
+ |
|
| 147 |
+ entity.setLightsticksUsed(entityToCopy.getLightsticksUsed());
|
|
| 148 |
+ entity.setTotalLightsticksCount(entityToCopy.getTotalLightsticksCount());
|
|
| 149 |
+ entity.setLightsticksType(entityToCopy.getLightsticksType());
|
|
| 150 |
+ entity.setLightsticksColor(entityToCopy.getLightsticksColor());
|
|
| 127 | 151 |
|
| 128 | 152 |
SaveResultDto result = saveEntity(entity);
|
| 129 | 153 |
if (dto.isNotPersisted()) {
|
| ... | ... | @@ -74,6 +74,7 @@ public abstract class AbstractSpeciesFieldDtoValidator extends FieldValidatorSup |
| 74 | 74 |
private Float ratio;
|
| 75 | 75 |
private String speciesField = "species";
|
| 76 | 76 |
private Bound bound;
|
| 77 |
+ private Bound boundWithRatio;
|
|
| 77 | 78 |
|
| 78 | 79 |
private String getSpeciesField() {
|
| 79 | 80 |
return speciesField;
|
| ... | ... | @@ -202,7 +203,7 @@ public abstract class AbstractSpeciesFieldDtoValidator extends FieldValidatorSup |
| 202 | 203 |
return;
|
| 203 | 204 |
}
|
| 204 | 205 |
|
| 205 |
- Bound boundWithRatio = bound.applyRatio(ratio);
|
|
| 206 |
+ boundWithRatio = bound.applyRatio(ratio);
|
|
| 206 | 207 |
|
| 207 | 208 |
if (log.isDebugEnabled()) {
|
| 208 | 209 |
log.debug("Bound : " + bound);
|
| ... | ... | @@ -218,6 +219,14 @@ public abstract class AbstractSpeciesFieldDtoValidator extends FieldValidatorSup |
| 218 | 219 |
}
|
| 219 | 220 |
}
|
| 220 | 221 |
|
| 222 |
+ public Float getMin() {
|
|
| 223 |
+ return boundWithRatio.getMin();
|
|
| 224 |
+ }
|
|
| 225 |
+ |
|
| 226 |
+ public Float getMax() {
|
|
| 227 |
+ return boundWithRatio.getMax();
|
|
| 228 |
+ }
|
|
| 229 |
+ |
|
| 221 | 230 |
private Bound getBound(SpeciesDto species) {
|
| 222 | 231 |
|
| 223 | 232 |
Float min = getBoundMin(species);
|
| ... | ... | @@ -48,6 +48,7 @@ observe.data.ll.landing.LandingPart.onBoardProcessing |
| 48 | 48 |
observe.data.ll.landing.LandingPart.weight
|
| 49 | 49 |
observe.data.ll.logbook.Activity.currentDirection
|
| 50 | 50 |
observe.data.ll.logbook.Activity.currentSpeed
|
| 51 |
+observe.data.ll.logbook.Activity.endTime
|
|
| 51 | 52 |
observe.data.ll.logbook.Activity.endTimeStamp
|
| 52 | 53 |
observe.data.ll.logbook.Activity.fpaZone
|
| 53 | 54 |
observe.data.ll.logbook.Activity.relatedObservedActivity
|
| ... | ... | @@ -2,7 +2,9 @@ observe.validation.activity.duplicated.time |
| 2 | 2 |
observe.validation.activity.null.dcp
|
| 3 | 3 |
observe.validation.activity.required.observedSystem.for.nonTargetCatch
|
| 4 | 4 |
observe.validation.activityLongline.endDate.after.currentTrip.startDate
|
| 5 |
+observe.validation.activityLongline.endDate.after.startDate
|
|
| 5 | 6 |
observe.validation.activityLongline.endDate.before.currentTrip.endDate
|
| 7 |
+observe.validation.activityLongline.endTime.after.startTime
|
|
| 6 | 8 |
observe.validation.activityLongline.startDate.after.currentTrip.startDate
|
| 7 | 9 |
observe.validation.activityLongline.startDate.before.currentTrip.endDate
|
| 8 | 10 |
observe.validation.catchLongline.required.count.when.acquisitionModeIsGrouped
|
| ... | ... | @@ -77,6 +77,21 @@ |
| 77 | 77 |
</param>
|
| 78 | 78 |
<message>observe.validation.activityLongline.endDate.after.currentTrip.startDate</message>
|
| 79 | 79 |
</field-validator>
|
| 80 |
+ <field-validator type="fieldexpression" short-circuit="true">
|
|
| 81 |
+ <param name="expression">
|
|
| 82 |
+ <![CDATA[ endDate == null || startDate == null || startDate.time <= endDate.time ]]>
|
|
| 83 |
+ </param>
|
|
| 84 |
+ <message>observe.validation.activityLongline.endTime.after.startTime</message>
|
|
| 85 |
+ </field-validator>
|
|
| 86 |
+ </field>
|
|
| 87 |
+ |
|
| 88 |
+ <field name="endTime">
|
|
| 89 |
+ <field-validator type="fieldexpression" short-circuit="true">
|
|
| 90 |
+ <param name="expression">
|
|
| 91 |
+ <![CDATA[ endTime == null || startTime == null || startTime.time <= endTime.time ]]>
|
|
| 92 |
+ </param>
|
|
| 93 |
+ <message>observe.validation.activityLongline.endTime.after.startTime</message>
|
|
| 94 |
+ </field-validator>
|
|
| 80 | 95 |
</field>
|
| 81 | 96 |
|
| 82 | 97 |
<field name="seaSurfaceTemperature">
|
| ... | ... | @@ -88,6 +88,21 @@ |
| 88 | 88 |
</param>
|
| 89 | 89 |
<message>observe.validation.activityLongline.endDate.after.currentTrip.startDate</message>
|
| 90 | 90 |
</field-validator>
|
| 91 |
+ <field-validator type="fieldexpression" short-circuit="true">
|
|
| 92 |
+ <param name="expression">
|
|
| 93 |
+ <![CDATA[ endDate == null || startDate == null || startDate.time <= endDate.time ]]>
|
|
| 94 |
+ </param>
|
|
| 95 |
+ <message>observe.validation.activityLongline.endDate.after.startDate</message>
|
|
| 96 |
+ </field-validator>
|
|
| 97 |
+ </field>
|
|
| 98 |
+ |
|
| 99 |
+ <field name="endTime">
|
|
| 100 |
+ <field-validator type="fieldexpression" short-circuit="true">
|
|
| 101 |
+ <param name="expression">
|
|
| 102 |
+ <![CDATA[ endTime == null || startTime == null || startTime.time <= endTime.time ]]>
|
|
| 103 |
+ </param>
|
|
| 104 |
+ <message>observe.validation.activityLongline.endTime.after.startTime</message>
|
|
| 105 |
+ </field-validator>
|
|
| 91 | 106 |
</field>
|
| 92 | 107 |
|
| 93 | 108 |
<field name="currentDirection">
|