Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
7fc8b728
by Tony CHEMIT at 2017-07-28T17:37:47+02:00
12 changed files:
- application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-create-error-validation.xml
- application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-error-validation.xml
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss
- persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_6_0.java
- persistence/src/main/models/Observe.model
- − persistence/src/main/resources/db/migration/6.0/03_evol_6997_delete_supportVesselName-H2.sql
- − persistence/src/main/resources/db/migration/6.0/03_evol_6997_delete_supportVesselName-PG.sql
- persistence/src/main/resources/db/migration/6.901/01_add_object_operation-PG.sql
- services-topia/src/main/java/fr/ird/observe/services/binder/data/seine/FloatingObjectBinder.java
- services-validation/src/main/resources/fr/ird/observe/entities/seine/FloatingObject-service-error-validation.xml
- services/src/main/models/Observe.model
Changes:
| ... | ... | @@ -60,6 +60,19 @@ |
| 60 | 60 |
|
| 61 | 61 |
</field>
|
| 62 | 62 |
|
| 63 |
+ <field name="supportVesselName">
|
|
| 64 |
+ |
|
| 65 |
+ <!-- supportVesselName de ${maxLength} caractères maximum -->
|
|
| 66 |
+ <field-validator type="fieldexpressionwithparams">
|
|
| 67 |
+ <param name="intParams">maxLength:32</param>
|
|
| 68 |
+ <param name="expression">
|
|
| 69 |
+ <![CDATA[ supportVesselName == null || supportVesselName.length() < ints.maxLength ]]>
|
|
| 70 |
+ </param>
|
|
| 71 |
+ <message>validator.ui.floatingObject.size.supportVesselName##${ints.maxLength}</message>
|
|
| 72 |
+ </field-validator>
|
|
| 73 |
+ |
|
| 74 |
+ </field>
|
|
| 75 |
+ |
|
| 63 | 76 |
<field name="comment">
|
| 64 | 77 |
|
| 65 | 78 |
<!-- comentaire de moins de 1024 caractères -->
|
| ... | ... | @@ -60,6 +60,19 @@ |
| 60 | 60 |
|
| 61 | 61 |
</field>
|
| 62 | 62 |
|
| 63 |
+ <field name="supportVesselName">
|
|
| 64 |
+ |
|
| 65 |
+ <!-- supportVesselName de ${maxLength} caractères maximum -->
|
|
| 66 |
+ <field-validator type="fieldexpressionwithparams">
|
|
| 67 |
+ <param name="intParams">maxLength:32</param>
|
|
| 68 |
+ <param name="expression">
|
|
| 69 |
+ <![CDATA[ supportVesselName == null || supportVesselName.length() < ints.maxLength ]]>
|
|
| 70 |
+ </param>
|
|
| 71 |
+ <message>validator.ui.floatingObject.size.supportVesselName##${ints.maxLength}</message>
|
|
| 72 |
+ </field-validator>
|
|
| 73 |
+ |
|
| 74 |
+ </field>
|
|
| 75 |
+ |
|
| 63 | 76 |
<field name="comment">
|
| 64 | 77 |
|
| 65 | 78 |
<!-- comentaire de moins de 1024 caractères -->
|
| ... | ... | @@ -92,6 +92,19 @@ |
| 92 | 92 |
</cell>
|
| 93 | 93 |
</row>
|
| 94 | 94 |
<row>
|
| 95 |
+ <cell anchor="west">
|
|
| 96 |
+ <JLabel id='supportVesselNameLabel'/>
|
|
| 97 |
+ </cell>
|
|
| 98 |
+ <cell anchor='east' weightx="1" fill="both">
|
|
| 99 |
+ <JPanel layout='{new BorderLayout()}'>
|
|
| 100 |
+ <JToolBar id='supportVesselNameToolbar' constraints='BorderLayout.WEST'>
|
|
| 101 |
+ <JButton id='resetSupportVesselName' constraints='BorderLayout.WEST' styleClass='resetButton'/>
|
|
| 102 |
+ </JToolBar>
|
|
| 103 |
+ <JTextField id='supportVesselName' constraints='BorderLayout.CENTER'/>
|
|
| 104 |
+ </JPanel>
|
|
| 105 |
+ </cell>
|
|
| 106 |
+ </row>
|
|
| 107 |
+ <row>
|
|
| 95 | 108 |
<cell columns='2'>
|
| 96 | 109 |
<JPanel id='floatingObjectReferencePanel' layout="{new BorderLayout()}">
|
| 97 | 110 |
<JLabel id='floatingObjectReferenceLabel' constraints='BorderLayout.CENTER'/>
|
| ... | ... | @@ -82,6 +82,22 @@ BeanComboBox { |
| 82 | 82 |
selectedItem:{bean.getObjectType()};
|
| 83 | 83 |
}
|
| 84 | 84 |
|
| 85 |
+#supportVesselNameLabel {
|
|
| 86 |
+ text:"observe.common.supportVesselName";
|
|
| 87 |
+ labelFor:{supportVesselName};
|
|
| 88 |
+}
|
|
| 89 |
+ |
|
| 90 |
+#supportVesselName {
|
|
| 91 |
+ _propertyName:{FloatingObjectDto.PROPERTY_SUPPORT_VESSEL_NAME};
|
|
| 92 |
+ text:{getStringValue(bean.getSupportVesselName())};
|
|
| 93 |
+ _validatorLabel:{t("observe.common.supportVesselName")};
|
|
| 94 |
+}
|
|
| 95 |
+ |
|
| 96 |
+#resetSupportVesselName{
|
|
| 97 |
+ toolTipText:"observe.content.action.reset.supportVesselName.tip";
|
|
| 98 |
+ _resetPropertyName:{FloatingObjectDto.PROPERTY_SUPPORT_VESSEL_NAME};
|
|
| 99 |
+}
|
|
| 100 |
+ |
|
| 85 | 101 |
#comment {
|
| 86 | 102 |
title:"observe.common.comment.floatingObject";
|
| 87 | 103 |
}
|
| ... | ... | @@ -60,7 +60,6 @@ public class DataSourceMigrationForVersion_6_0 extends AbstractObserveMigrationC |
| 60 | 60 |
|
| 61 | 61 |
addScript("01", "evol_8374_delete_sonarUsed", queries);
|
| 62 | 62 |
addScript("02", "evol_7886_catch_add_set_idx", queries);
|
| 63 |
- addScript("03", "evol_6997_delete_supportVesselName", queries);
|
|
| 64 | 63 |
addScript("04", "evol_6832_branchlineComposition_add_tracelineLength", queries);
|
| 65 | 64 |
addScript("05", "evol_6999_nonTargetCatch_add_well", queries);
|
| 66 | 65 |
addScript("06", "evol_8375_setSeine_add_booleans", queries);
|
| ... | ... | @@ -727,6 +727,7 @@ objectSchoolEstimate + {*} seine.ObjectSchoolEstimate |
| 727 | 727 |
objectObservedSpecies + {*} seine.ObjectObservedSpecies
|
| 728 | 728 |
objectType {*:0..1} referentiel.seine.ObjectType
|
| 729 | 729 |
objectOperation {*:1} referentiel.seine.ObjectOperation
|
| 730 |
+supportVesselName + {*:1} String
|
|
| 730 | 731 |
transmittingBuoy + {*} seine.TransmittingBuoy | unique
|
| 731 | 732 |
floatingObjectPart + {*} seine.FloatingObjectPart | unique
|
| 732 | 733 |
getTypeTransmittingBuoyOperation() !fr.ird.observe.common.constants.seine.TypeTransmittingBuoyOperation
|
| 1 |
----
|
|
| 2 |
--- #%L
|
|
| 3 |
--- ObServe :: Persistence
|
|
| 4 |
--- %%
|
|
| 5 |
--- Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
--- %%
|
|
| 7 |
--- This program is free software: you can redistribute it and/or modify
|
|
| 8 |
--- it under the terms of the GNU General Public License as
|
|
| 9 |
--- published by the Free Software Foundation, either version 3 of the
|
|
| 10 |
--- License, or (at your option) any later version.
|
|
| 11 |
---
|
|
| 12 |
--- This program is distributed in the hope that it will be useful,
|
|
| 13 |
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
--- GNU General Public License for more details.
|
|
| 16 |
---
|
|
| 17 |
--- You should have received a copy of the GNU General Public
|
|
| 18 |
--- License along with this program. If not, see
|
|
| 19 |
--- <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 20 |
--- #L%
|
|
| 21 |
----
|
|
| 22 |
-ALTER TABLE observe_seine.floatingobject DROP COLUMN supportVesselName;
|
| 1 |
----
|
|
| 2 |
--- #%L
|
|
| 3 |
--- ObServe :: Persistence
|
|
| 4 |
--- %%
|
|
| 5 |
--- Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
--- %%
|
|
| 7 |
--- This program is free software: you can redistribute it and/or modify
|
|
| 8 |
--- it under the terms of the GNU General Public License as
|
|
| 9 |
--- published by the Free Software Foundation, either version 3 of the
|
|
| 10 |
--- License, or (at your option) any later version.
|
|
| 11 |
---
|
|
| 12 |
--- This program is distributed in the hope that it will be useful,
|
|
| 13 |
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
--- GNU General Public License for more details.
|
|
| 16 |
---
|
|
| 17 |
--- You should have received a copy of the GNU General Public
|
|
| 18 |
--- License along with this program. If not, see
|
|
| 19 |
--- <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 20 |
--- #L%
|
|
| 21 |
----
|
|
| 22 |
-ALTER TABLE observe_seine.floatingobject DROP COLUMN supportVesselName CASCADE;
|
| ... | ... | @@ -44,9 +44,9 @@ UPDATE observe_seine.floatingObject set objectOperation2 = 'fr.ird.observe.entit |
| 44 | 44 |
UPDATE observe_seine.floatingObject set objectOperation2 = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#0#8' WHERE objectOperation = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#1239832686249#0.8431519556575698' AND objectFate = 'fr.ird.observe.entities.referentiel.seine.ObjectFate#1396860761530#0.8869464242156488';
|
| 45 | 45 |
UPDATE observe_seine.floatingObject set objectOperation2 = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#0#2' WHERE objectOperation = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#1239832686249#0.8431519556575698' AND objectFate not in ('fr.ird.observe.entities.referentiel.seine.ObjectFate#1239832683674#0.32469201752917276','fr.ird.observe.entities.referentiel.seine.ObjectFate#1239832683675#0.7559688295127481','fr.ird.observe.entities.referentiel.seine.ObjectFate#1239832683675#0.88526017739943','fr.ird.observe.entities.referentiel.seine.ObjectFate#1239832683675#0.190123844350496', 'fr.ird.observe.entities.referentiel.seine.ObjectFate#1396860761530#0.8869464242156488');
|
| 46 | 46 |
|
| 47 |
-alter table observe_seine.floatingObject drop COLUMN objectOperation;
|
|
| 48 |
-alter table observe_seine.floatingObject drop COLUMN objectFate;
|
|
| 49 |
-drop table observe_seine.objectFate;
|
|
| 47 |
+alter table observe_seine.floatingObject drop COLUMN objectOperation CASCADE;
|
|
| 48 |
+alter table observe_seine.floatingObject drop COLUMN objectFate CASCADE;
|
|
| 49 |
+drop table observe_seine.objectFate CASCADE;
|
|
| 50 | 50 |
|
| 51 | 51 |
delete from observe_seine.objectOperation;
|
| 52 | 52 |
|
| ... | ... | @@ -50,6 +50,7 @@ public class FloatingObjectBinder extends DataBinderSupport<FloatingObject, Floa |
| 50 | 50 |
|
| 51 | 51 |
entity.setObjectOperation(toEntity(dto.getObjectOperation(), ObjectOperation.class));
|
| 52 | 52 |
entity.setObjectType(toEntity(dto.getObjectType(), ObjectType.class));
|
| 53 |
+ entity.setSupportVesselName(dto.getSupportVesselName());
|
|
| 53 | 54 |
|
| 54 | 55 |
}
|
| 55 | 56 |
|
| ... | ... | @@ -60,6 +61,7 @@ public class FloatingObjectBinder extends DataBinderSupport<FloatingObject, Floa |
| 60 | 61 |
|
| 61 | 62 |
dto.setObjectOperation(toReferentialReference(referentialLocale, entity.getObjectOperation(), ObjectOperationDto.class));
|
| 62 | 63 |
dto.setObjectType(toReferentialReference(referentialLocale, entity.getObjectType(), ObjectTypeDto.class));
|
| 64 |
+ dto.setSupportVesselName(entity.getSupportVesselName());
|
|
| 63 | 65 |
|
| 64 | 66 |
}
|
| 65 | 67 |
|
| ... | ... | @@ -60,6 +60,19 @@ |
| 60 | 60 |
|
| 61 | 61 |
</field>
|
| 62 | 62 |
|
| 63 |
+ <field name="supportVesselName">
|
|
| 64 |
+ |
|
| 65 |
+ <!-- supportVesselName de ${maxLength} caractères maximum -->
|
|
| 66 |
+ <field-validator type="fieldexpressionwithparams">
|
|
| 67 |
+ <param name="intParams">maxLength:32</param>
|
|
| 68 |
+ <param name="expression">
|
|
| 69 |
+ <![CDATA[ supportVesselName == null || supportVesselName.length() < ints.maxLength ]]>
|
|
| 70 |
+ </param>
|
|
| 71 |
+ <message>validator.service.floatingObject.size.supportVesselName##${ints.maxLength}</message>
|
|
| 72 |
+ </field-validator>
|
|
| 73 |
+ |
|
| 74 |
+ </field>
|
|
| 75 |
+ |
|
| 63 | 76 |
<field name="comment">
|
| 64 | 77 |
|
| 65 | 78 |
<!-- comentaire de moins de 1024 caractères -->
|
| ... | ... | @@ -623,6 +623,7 @@ activityFinDeVeille + {*:1} boolean |
| 623 | 623 |
seine.FloatingObject > Commentable
|
| 624 | 624 |
objectType {*:0..1} reference.ReferentialReference | attributeGeneric=fr.ird.observe.services.dto.referential.seine.ObjectTypeDto
|
| 625 | 625 |
objectOperation {*:1} reference.ReferentialReference | attributeGeneric=fr.ird.observe.services.dto.referential.seine.ObjectOperationDto
|
| 626 |
+supportVesselName + {*:1} String
|
|
| 626 | 627 |
|
| 627 | 628 |
seine.FloatingObjectObservedSpecies > Commentable
|
| 628 | 629 |
objectObservedSpecies {*} seine.ObjectObservedSpecies
|