branch feature/7587 updated (7a12dcf -> ac31162)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7587 in repository observe. See http://git.codelutin.com/observe.git from 7a12dcf Renommage de ObserveValidator en ObserveSwingValidator new 6b98aaf correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) new 8d75432 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) new ac31162 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit ac3116246a9571a2430b33295581a44d3ba1a668 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 6 15:29:53 2015 +0200 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) commit 8d754326821f0b89c3e15522dcbfcda3bea004d5 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 6 14:30:12 2015 +0200 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) commit 6b98aaff13c8da02391b883e0d9b68f9c1a8d793 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 6 14:26:13 2015 +0200 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) Summary of changes: .../ui/content/open/ContentOpenableUIHandler.java | 70 ++----- .../ui/content/open/impl/seine/TripSeineUI.jaxx | 4 +- .../open/impl/seine/TripSeineUIHandler.java | 4 - .../content/open/impl/seine/TripSeineUIModel.java | 3 +- .../TripSeineDto-n1-update-error-validation.xml | 206 --------------------- .../TripSeineDto-n1-create-error-validation.xml | 0 .../TripSeineDto-n1-create-warning-validation.xml | 0 .../TripSeineDto-n1-update-error-validation.xml | 0 .../TripSeineDto-n1-update-warning-validation.xml | 36 ++-- .../main/xmi/observe-services-dto-seine.properties | 1 + .../src/main/xmi/observe-services-dto-seine.zargo | Bin 59029 -> 59456 bytes .../services/dto/ObserveDtosInitializer.java | 3 +- 12 files changed, 40 insertions(+), 287 deletions(-) delete mode 100644 observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-update-error-validation.xml rename observe-application-swing/src/main/resources/{fr.ird.observe.services.dto.seine => fr/ird/observe/services/dto/seine}/TripSeineDto-n1-create-error-validation.xml (100%) rename observe-application-swing/src/main/resources/{fr.ird.observe.services.dto.seine => fr/ird/observe/services/dto/seine}/TripSeineDto-n1-create-warning-validation.xml (100%) copy observe-entities-validation/src/main/resources/fr/ird/observe/entities/seine/TripSeine-n1-update-error-validation.xml => observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-update-error-validation.xml (100%) rename observe-application-swing/src/main/resources/{fr.ird.observe.services.dto.seine => fr/ird/observe/services/dto/seine}/TripSeineDto-n1-update-warning-validation.xml (65%) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587 in repository observe. See http://git.codelutin.com/observe.git commit 6b98aaff13c8da02391b883e0d9b68f9c1a8d793 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 6 14:26:13 2015 +0200 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) --- .../content/open/impl/seine/TripSeineUIModel.java | 3 +- .../TripSeineDto-n1-create-error-validation.xml | 0 .../TripSeineDto-n1-create-warning-validation.xml | 0 .../TripSeineDto-n1-update-error-validation.xml | 64 ++++++++++----------- .../TripSeineDto-n1-update-warning-validation.xml | 36 ++++++------ .../main/xmi/observe-services-dto-seine.properties | 1 + .../src/main/xmi/observe-services-dto-seine.zargo | Bin 59029 -> 59456 bytes .../services/dto/ObserveDtosInitializer.java | 3 +- 8 files changed, 55 insertions(+), 52 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java index 3da50c1..54b2755 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIModel.java @@ -59,7 +59,8 @@ public class TripSeineUIModel extends ContentOpenableUIModel<TripSeineDto> { TripSeineDto.PROPERTY_DEPARTURE_HARBOUR, TripSeineDto.PROPERTY_LANDING_HARBOUR, TripSeineDto.PROPERTY_ERS_ID, - TripSeineDto.PROPERTY_OPEN); + TripSeineDto.PROPERTY_OPEN, + TripSeineDto.PROPERTY_ROUTE); return builder; diff --git a/observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-create-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-create-error-validation.xml similarity index 100% rename from observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-create-error-validation.xml rename to observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-create-error-validation.xml diff --git a/observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-create-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-create-warning-validation.xml similarity index 100% rename from observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-create-warning-validation.xml rename to observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-create-warning-validation.xml diff --git a/observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-update-error-validation.xml similarity index 79% rename from observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-update-error-validation.xml rename to observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-update-error-validation.xml index 330c0b1..7d3ec4e 100644 --- a/observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-update-error-validation.xml +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-update-error-validation.xml @@ -62,16 +62,16 @@ </field-validator> <!-- coherence startDate > date de toute route --> - <!--<field-validator type="collectionFieldExpression">--> - <!--<param name="mode">ALL</param>--> - <!--<param name="useSensitiveContext">true</param>--> - <!--<param name="collectionFieldName">route</param>--> - <!--<param name="expression"><![CDATA[--> - <!--startDate.time <= current.date.time--> - <!--]]>--> - <!--</param>--> - <!--<message>validator.trip.invalid.startDate##${index}</message>--> - <!--</field-validator>--> + <field-validator type="collectionFieldExpression"> + <param name="mode">ALL</param> + <param name="useSensitiveContext">true</param> + <param name="collectionFieldName">route</param> + <param name="expression"><![CDATA[ + startDate.time <= current.date.time + ]]> + </param> + <message>validator.trip.invalid.startDate##${index}</message> + </field-validator> </field> @@ -91,33 +91,33 @@ </field-validator> <!-- coherence endDate > date de toute route --> - <!--<field-validator type="collectionFieldExpression">--> - <!--<param name="mode">ALL</param>--> - <!--<param name="useSensitiveContext">true</param>--> - <!--<param name="collectionFieldName">route</param>--> - <!--<param name="expression"><![CDATA[--> - <!--current.date.time <= endDate.time--> - <!--]]>--> - <!--</param>--> - <!--<message>validator.trip.invalid.endDate##${index}</message>--> - <!--</field-validator>--> + <field-validator type="collectionFieldExpression"> + <param name="mode">ALL</param> + <param name="useSensitiveContext">true</param> + <param name="collectionFieldName">route</param> + <param name="expression"><![CDATA[ + current.date.time <= endDate.time + ]]> + </param> + <message>validator.trip.invalid.endDate##${index}</message> + </field-validator> </field> - <!--<field name="route">--> + <field name="route"> - <!--<!– coherence date des routes –>--> - <!--<field-validator type="collectionFieldExpression">--> - <!--<param name="mode">ALL</param>--> - <!--<param name="useSensitiveContext">true</param>--> - <!--<param name="expression"><![CDATA[--> - <!--previous == null || previous.date.time <= current.date.time--> - <!--]]>--> - <!--</param>--> - <!--<message>validator.trip.invalid.date##${index}</message>--> - <!--</field-validator>--> + <!-- coherence date des routes --> + <field-validator type="collectionFieldExpression"> + <param name="mode">ALL</param> + <param name="useSensitiveContext">true</param> + <param name="expression"><![CDATA[ + previous == null || previous.date.time <= current.date.time + ]]> + </param> + <message>validator.trip.invalid.date##${index}</message> + </field-validator> - <!--</field>--> + </field> <field name="formsUrl"> diff --git a/observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-update-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-update-warning-validation.xml similarity index 65% rename from observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-update-warning-validation.xml rename to observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-update-warning-validation.xml index e60f881..a4ecd4b 100644 --- a/observe-application-swing/src/main/resources/fr.ird.observe.services.dto.seine/TripSeineDto-n1-update-warning-validation.xml +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/TripSeineDto-n1-update-warning-validation.xml @@ -53,25 +53,25 @@ </field> - <!--<field name="route">--> - - <!--<!– une route est ouverte (interdit la cloture de la maree) –>--> - <!--<!–<field-validator type="openableEntity">–>--> - <!--<!–<message>validator.tripSeine.unclosed.route##${openValueAsString}</message>–>--> - <!--<!–</field-validator>–>--> - - <!--<!– coherence loch des routes –>--> - <!--<field-validator type="collectionFieldExpression">--> - <!--<param name="mode">ALL</param>--> - <!--<param name="useSensitiveContext">true</param>--> - <!--<!–param name="expressionForFirst"><![CDATA[ current.startLogValue == null || current.startLogValue == 0 ]]></param–>--> - <!--<param name="expression">--> - <!--<![CDATA[previous == null || current.startLogValue == null || previous.endLogValue == null || previous.endLogValue <= current.startLogValue ]]>--> - <!--</param>--> - <!--<message>validator.trip.invalid.loch##${current.startLogValue}##${current.date}##${previous.endLogValue}</message>--> + <field name="route"> + + <!-- une route est ouverte (interdit la cloture de la maree) --> + <!--<field-validator type="openableEntity">--> + <!--<message>validator.tripSeine.unclosed.route##${openValueAsString}</message>--> <!--</field-validator>--> - <!-- --> - <!--</field>--> + + <!-- coherence loch des routes --> + <field-validator type="collectionFieldExpression"> + <param name="mode">ALL</param> + <param name="useSensitiveContext">true</param> + <!--param name="expressionForFirst"><![CDATA[ current.startLogValue == null || current.startLogValue == 0 ]]></param--> + <param name="expression"> + <![CDATA[previous == null || current.startLogValue == null || previous.endLogValue == null || previous.endLogValue <= current.startLogValue ]]> + </param> + <message>validator.trip.invalid.loch##${current.startLogValue}##${current.date}##${previous.endLogValue}</message> + </field-validator> + + </field> <field name="captain"> diff --git a/observe-services-model/src/main/xmi/observe-services-dto-seine.properties b/observe-services-model/src/main/xmi/observe-services-dto-seine.properties index efba507..4346372 100644 --- a/observe-services-model/src/main/xmi/observe-services-dto-seine.properties +++ b/observe-services-model/src/main/xmi/observe-services-dto-seine.properties @@ -83,3 +83,4 @@ fr.ird.observe.services.dto.seine.TargetSample.attribute.targetLength.stereotype fr.ird.observe.services.dto.seine.NonTargetSample.attribute.nonTargetLength.stereotype=unique fr.ird.observe.services.dto.seine.GearUseFeaturesSeine.attribute.gearUseFeaturesMeasurement.stereotype=unique fr.ird.observe.services.dto.seine.ActivitySeineObservedSystem.attribute.observedSystem.stereotype=unique +fr.ird.observe.services.dto.seine.TripSeine.attribute.route.stereotype=unique,ordered diff --git a/observe-services-model/src/main/xmi/observe-services-dto-seine.zargo b/observe-services-model/src/main/xmi/observe-services-dto-seine.zargo index e714dbb..e08f6db 100644 Binary files a/observe-services-model/src/main/xmi/observe-services-dto-seine.zargo and b/observe-services-model/src/main/xmi/observe-services-dto-seine.zargo differ diff --git a/observe-services-topia/src/main/java/fr/ird/observe/services/dto/ObserveDtosInitializer.java b/observe-services-topia/src/main/java/fr/ird/observe/services/dto/ObserveDtosInitializer.java index f6927b1..2d9942d 100644 --- a/observe-services-topia/src/main/java/fr/ird/observe/services/dto/ObserveDtosInitializer.java +++ b/observe-services-topia/src/main/java/fr/ird/observe/services/dto/ObserveDtosInitializer.java @@ -1593,7 +1593,8 @@ public class ObserveDtosInitializer implements ObserveModelInitializer { TripSeineDto.PROPERTY_OCEAN, TripSeineDto.PROPERTY_DEPARTURE_HARBOUR, TripSeineDto.PROPERTY_LANDING_HARBOUR, - TripSeineDto.PROPERTY_LAST_UPDATE + TripSeineDto.PROPERTY_LAST_UPDATE, + TripSeineDto.PROPERTY_ROUTE ); registerReferenceBinder(TripSeineDto.class, TripSeine.class, -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587 in repository observe. See http://git.codelutin.com/observe.git commit 8d754326821f0b89c3e15522dcbfcda3bea004d5 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 6 14:30:12 2015 +0200 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) --- .../java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx index f4758a9..4ae57ef 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUI.jaxx @@ -64,8 +64,8 @@ errorTableModel='{getErrorTableModel()}' autoField='true' context='n1-update'> - <!--FIXME--> - <!--<field name='route' component='{actionDown}'/>--> + + <field name='route' component='{actionDown}'/> </BeanValidator> <script><![CDATA[ -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7587 in repository observe. See http://git.codelutin.com/observe.git commit ac3116246a9571a2430b33295581a44d3ba1a668 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Oct 6 15:29:53 2015 +0200 correction de la validation + ajout des routes dans le DTO de trip seine (refs #7587) --- .../ui/content/open/ContentOpenableUIHandler.java | 70 +++++----------------- .../open/impl/seine/TripSeineUIHandler.java | 4 -- 2 files changed, 15 insertions(+), 59 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/ContentOpenableUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/ContentOpenableUIHandler.java index 20ba59c..f7ee163 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/ContentOpenableUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/ContentOpenableUIHandler.java @@ -22,10 +22,13 @@ package fr.ird.observe.ui.content.open; import fr.ird.observe.ObserveOpenDataManager; +import fr.ird.observe.ObserveServiceHelper; import fr.ird.observe.ObserveSwingApplicationContext; import fr.ird.observe.business.db.constants.DataContextType; import fr.ird.observe.db.ObserveSwingDataSource; import fr.ird.observe.services.dto.IdDto; +import fr.ird.observe.services.dto.longline.TripLonglineDto; +import fr.ird.observe.services.dto.seine.TripSeineDto; import fr.ird.observe.ui.content.ContentMode; import fr.ird.observe.ui.content.ContentUIHandler; import fr.ird.observe.ui.tree.ObserveNode; @@ -158,8 +161,7 @@ public abstract class ContentOpenableUIHandler<E extends IdDto> extends ContentU // selectedNode = selectedNode.getParent(); // } // treeHelper.refreshNode(selectedNode, true); - //FIXME -// treeHelper.reloadSelectedNode(bean instanceof Trip, true); + treeHelper.reloadSelectedNode(bean instanceof TripSeineDto || bean instanceof TripLonglineDto, true); updateActions(); } @@ -170,7 +172,6 @@ public abstract class ContentOpenableUIHandler<E extends IdDto> extends ContentU ContentOpenableUI<E> ui = getUi(); - int position = ui.getContextValue(Integer.class, POSITION_OPENABLE); ObserveTreeHelper treeHelper = getTreeHelper(ui); ObserveNode node = treeHelper.getSelectedNode(); @@ -179,13 +180,6 @@ public abstract class ContentOpenableUIHandler<E extends IdDto> extends ContentU E bean = getBean(); - int oldPosition; - if (create) { - oldPosition = parentNode.getChildCount(); - } else { - oldPosition = parentNode.getIndex(node); - } - if (create) { // on passe en mode mise à jour @@ -200,29 +194,15 @@ public abstract class ContentOpenableUIHandler<E extends IdDto> extends ContentU // arrêt de l'édition de l'écran courant stopEditUI(); - if (oldPosition != position) { - - // on doit repositionner le noeud - treeHelper.moveNode(parentNode, node, position); - } + treeHelper.reloadNode(parentNode, true); // on sélectionne le nouveau noeud treeHelper.selectNode(node); } else { - if (oldPosition != position) { - // on doit repositionner le noeud - treeHelper.moveNode(parentNode, node, position); - - // et le selectionner - treeHelper.selectNode(node); - } + treeHelper.reloadNode(parentNode, true); - // on repaint le noeud et ses enfants -// treeHelper.refreshNode(node, true); - treeHelper.reloadSelectedNode(false, true); -// treeHelper.refreshNode(node, false); } } @@ -266,25 +246,6 @@ public abstract class ContentOpenableUIHandler<E extends IdDto> extends ContentU treeHelper.addUnsavedNode(parentNode, getBeanType()); } - //FIXME -// protected final void obtainChildPosition(E bean, -// DataService dataService, -// DataSource dataSource) { -// -// String containerId = getSelectedParentId(); -// -// int position = dataService.getOpenablePosition(dataSource, -// containerId, -// bean.getTopiaId() -// ); -// -// if (log.isDebugEnabled()) { -// log.debug("Position of child : " + position); -// } -// -// getUi().setContextValue(position, POSITION_OPENABLE); -// } - protected final void finalizeOpenUI(ContentMode mode, boolean create) { // utilisation du mode requis @@ -296,16 +257,15 @@ public abstract class ContentOpenableUIHandler<E extends IdDto> extends ContentU if (!create) { - //FIXME -// Trip currentTrip = ObserveServiceHelper.getValidationContext().getCurrentTrip(); -// -// if (currentTrip != null && currentTrip.isHistoricalData()) { -// -// if (log.isInfoEnabled()) { -// log.info(prefix + "Using a historical fish trip " + currentTrip.getTopiaId()); -// } -// historicalData = true; -// } + TripSeineDto currentTripSeine = ObserveServiceHelper.getValidationContext().getCurrentTripSeine(); + + if (currentTripSeine != null && currentTripSeine.isHistoricalData()) { + + if (log.isInfoEnabled()) { + log.info(prefix + "Using a historical fish trip " + currentTripSeine.getId()); + } + historicalData = true; + } } diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java index c567581..bc0949d 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/open/impl/seine/TripSeineUIHandler.java @@ -268,10 +268,6 @@ public class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeineDto> { String beanId = getTripSeineService().save(bean); bean.setId(beanId); - // recuperation de la position de la maree dans le program - //FIXME -// obtainChildPosition(bean, dataService, dataSource); - return true; } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm