Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 2012c764 by Tony CHEMIT at 2017-05-31T14:58:04+02:00 Remove dcp fields (See #711) - - - - - 16 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-create-warning-validation.xml - application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-error-validation.xml - − application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-warning-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 - application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java - application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIModel.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_0.java - + persistence/src/main/resources/db/migration/6.901/04_remove_dcp_fields_H2.sql - + persistence/src/main/resources/db/migration/6.901/04_remove_dcp_fields_PG.sql - persistence/src/main/xmi/observe-seine.zargo - services-binder/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-validation/src/main/resources/fr/ird/observe/entities/seine/FloatingObject-service-warning-validation.xml - services/src/main/xmi/observe-services-dto-seine.zargo Changes: ===================================== application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-create-error-validation.xml ===================================== --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-create-error-validation.xml +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-create-error-validation.xml @@ -60,16 +60,6 @@ </field> - <field name="daysAtSeaCount"> - - <!-- count de jours a la mer positif --> - <field-validator type="int" short-circuit="true"> - <param name="min">0</param> - <message>validator.ui.floatingObject.positive.daysAtSeaCount</message> - </field-validator> - - </field> - <field name="comment"> <!-- comentaire de moins de 1024 caractères --> ===================================== application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-create-warning-validation.xml deleted ===================================== --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-create-warning-validation.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - ObServe :: Application Swing Validation - %% - Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io - %% - 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% - --> - -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="daysAtSeaCount"> - - <!-- count de jour a l'eau non renseigne --> - <field-validator type="required" short-circuit="true"> - <message>validator.ui.floatingObject.null.daysAtSeaCount</message> - </field-validator> - - </field> - -</validators> ===================================== application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-error-validation.xml ===================================== --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-error-validation.xml +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-error-validation.xml @@ -60,16 +60,6 @@ </field> - <field name="daysAtSeaCount"> - - <!-- count de jours a la mer positif --> - <field-validator type="int" short-circuit="true"> - <param name="min">0</param> - <message>validator.ui.floatingObject.positive.daysAtSeaCount</message> - </field-validator> - - </field> - <field name="comment"> <!-- comentaire de moins de 1024 caractères --> ===================================== application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-warning-validation.xml deleted ===================================== --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-ui-update-warning-validation.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - ObServe :: Application Swing Validation - %% - Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io - %% - 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% - --> - -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="daysAtSeaCount"> - - <!-- count de jour a l'eau non renseigne --> - <field-validator type="required" short-circuit="true"> - <message>validator.ui.floatingObject.null.daysAtSeaCount</message> - </field-validator> - - </field> - -</validators> ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jaxx @@ -86,14 +86,6 @@ </cell> </row> <row> - <cell anchor='west'> - <JLabel id='daysAtSeaCountLabel'/> - </cell> - <cell anchor='east' weightx="1"> - <NumberEditor id='daysAtSeaCount' constructorParams='this' styleClass="int6"/> - </cell> - </row> - <row> <cell columns='2' fill="both" weighty="0.7"> <JComment id="comment"/> </cell> ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUI.jcss @@ -72,18 +72,6 @@ BeanComboBox { selectedItem:{bean.getObjectType()}; } -#daysAtSeaCountLabel { - text:"observe.common.daysAtSeaCount"; - labelFor:{daysAtSeaCount}; -} - -#daysAtSeaCount { - bean:{bean}; - property:{FloatingObjectDto.PROPERTY_DAYS_AT_SEA_COUNT}; - numberValue:{bean.getDaysAtSeaCount()}; - showReset:true; -} - #comment { title:"observe.common.comment.floatingObject"; } ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIHandler.java @@ -207,8 +207,7 @@ public class FloatingObjectUIHandler extends ContentUIHandler<FloatingObjectDto, getTypeI18nKey(FloatingObjectDto.class), t("observe.content.floatingObject.message.updating")); } - super.startEditUI(FloatingObjectUI.BINDING_DAYS_AT_SEA_COUNT_NUMBER_VALUE, - FloatingObjectUI.BINDING_OBJECT_TYPE_SELECTED_ITEM, + super.startEditUI(FloatingObjectUI.BINDING_OBJECT_TYPE_SELECTED_ITEM, FloatingObjectUI.BINDING_COMMENT_MODEL); contentUIModel.setModified(create); } ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIModel.java ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIModel.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/impl/seine/FloatingObjectUIModel.java @@ -72,7 +72,6 @@ public class FloatingObjectUIModel extends ContentUIModel<FloatingObjectDto> { public static final Set<String> GENERAL_TAB_PROPERTIES = ImmutableSet.<String>builder().add(FloatingObjectDto.PROPERTY_OBJECT_OPERATION, FloatingObjectDto.PROPERTY_OBJECT_TYPE, - FloatingObjectDto.PROPERTY_DAYS_AT_SEA_COUNT, FloatingObjectDto.PROPERTY_COMMENT).build(); static final Set<String> MATERIALS_TAB_PROPERTIES = ===================================== persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_0.java ===================================== --- a/persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_0.java +++ b/persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_0.java @@ -49,6 +49,7 @@ public class DataSourceMigrationForVersion_7_0 extends AbstractObserveMigrationC addScript("01", "add_object_operation", queries); addScript("02", "add_object_material", queries); addScript("03", "add_floating_object_part", queries); + addScript("04", "remove_dcp_fields", queries); } public static class H2DataSourceMigrationForVersion extends DataSourceMigrationForVersion_7_0 { ===================================== persistence/src/main/resources/db/migration/6.901/04_remove_dcp_fields_H2.sql ===================================== --- /dev/null +++ b/persistence/src/main/resources/db/migration/6.901/04_remove_dcp_fields_H2.sql @@ -0,0 +1,23 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io +-- %% +-- 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% +--- +ALTER TABLE observe_seine.FloatingObject DROP COLUMN DAYSATSEACOUNT; + ===================================== persistence/src/main/resources/db/migration/6.901/04_remove_dcp_fields_PG.sql ===================================== --- /dev/null +++ b/persistence/src/main/resources/db/migration/6.901/04_remove_dcp_fields_PG.sql @@ -0,0 +1,23 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io +-- %% +-- 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% +--- +ALTER TABLE observe_seine.FloatingObject DROP COLUMN DAYSATSEACOUNT; + ===================================== persistence/src/main/xmi/observe-seine.zargo ===================================== Binary files a/persistence/src/main/xmi/observe-seine.zargo and b/persistence/src/main/xmi/observe-seine.zargo differ ===================================== services-binder/src/main/java/fr/ird/observe/services/binder/data/seine/FloatingObjectBinder.java ===================================== --- a/services-binder/src/main/java/fr/ird/observe/services/binder/data/seine/FloatingObjectBinder.java +++ b/services-binder/src/main/java/fr/ird/observe/services/binder/data/seine/FloatingObjectBinder.java @@ -48,7 +48,6 @@ public class FloatingObjectBinder extends DataBinderSupport<FloatingObject, Floa copyDtoDataFieldsToEntity(dto, entity); - entity.setDaysAtSeaCount(dto.getDaysAtSeaCount()); entity.setObjectOperation(toEntity(dto.getObjectOperation(), ObjectOperation.class)); entity.setObjectType(toEntity(dto.getObjectType(), ObjectType.class)); @@ -59,7 +58,6 @@ public class FloatingObjectBinder extends DataBinderSupport<FloatingObject, Floa copyEntityDataFieldsToDto(entity, dto); - dto.setDaysAtSeaCount(entity.getDaysAtSeaCount()); dto.setObjectOperation(toReferentialReference(referentialLocale, entity.getObjectOperation(), ObjectOperationDto.class)); dto.setObjectType(toReferentialReference(referentialLocale, entity.getObjectType(), ObjectTypeDto.class)); ===================================== services-validation/src/main/resources/fr/ird/observe/entities/seine/FloatingObject-service-error-validation.xml ===================================== --- a/services-validation/src/main/resources/fr/ird/observe/entities/seine/FloatingObject-service-error-validation.xml +++ b/services-validation/src/main/resources/fr/ird/observe/entities/seine/FloatingObject-service-error-validation.xml @@ -60,16 +60,6 @@ </field> - <field name="daysAtSeaCount"> - - <!-- count de jours a la mer positif --> - <field-validator type="int" short-circuit="true"> - <param name="min">0</param> - <message>validator.service.floatingObject.positive.daysAtSeaCount</message> - </field-validator> - - </field> - <field name="comment"> <!-- comentaire de moins de 1024 caractères --> ===================================== services-validation/src/main/resources/fr/ird/observe/entities/seine/FloatingObject-service-warning-validation.xml deleted ===================================== --- a/services-validation/src/main/resources/fr/ird/observe/entities/seine/FloatingObject-service-warning-validation.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - ObServe :: Services Validation - %% - Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io - %% - 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% - --> - -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="daysAtSeaCount"> - - <!-- count de jour a l'eau non renseigne --> - <field-validator type="required" short-circuit="true"> - <message>validator.service.floatingObject.null.daysAtSeaCount</message> - </field-validator> - - </field> - -</validators> ===================================== services/src/main/xmi/observe-services-dto-seine.zargo ===================================== Binary files a/services/src/main/xmi/observe-services-dto-seine.zargo and b/services/src/main/xmi/observe-services-dto-seine.zargo differ View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/2012c7642c500689121706439665... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/2012c7642c500689121706439665... You're receiving this email because of your account on gitlab.com.