branch develop updated (2b2575f -> cf1efc6)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository observe. See http://git.codelutin.com/observe.git from 2b2575f Ne plus mettre l'id dans la map de référence new 4bbd9eb migration des écrans des capteurs pour les palangre (refs #7619) new 2e9ab24 binder aussi les propritées dont la valeur est null. new fe6c584 ajout des validateurs (refs #7619) new cf1efc6 Merge branch 'feature/7619' into develop The 4 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 cf1efc6109577a887b632df674efb49e3b471264 Merge: 2b2575f fe6c584 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:35:18 2015 +0200 Merge branch 'feature/7619' into develop commit fe6c58456937f14b983ec9eb037e581be2c2c811 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:34:30 2015 +0200 ajout des validateurs (refs #7619) commit 2e9ab243d6859c172d55f7df7d3829c7de7f520d Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:28:49 2015 +0200 binder aussi les propritées dont la valeur est null. commit 4bbd9ebec65925be085ee7fadf4e14870d18e861 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:27:14 2015 +0200 migration des écrans des capteurs pour les palangre (refs #7619) Summary of changes: .../content/table/impl/longline/SensorUsedUI.jaxx | 14 ++++---- .../table/impl/longline/SensorUsedUIHandler.java | 39 +++++++++------------- .../table/impl/longline/SensorUsedUIModel.java | 35 ++++++++++++++----- ...ineSensorUsedDto-n1-update-error-validation.xml | 0 .../SensorUsedDto-n1-update-error-validation.xml | 0 .../SensorUsedDto-n1-update-warning-validation.xml | 0 ...ctivityLongLineSensorUsedServiceController.java | 5 +-- .../ActivityLongLineSensorUsedService.java | 3 +- .../services/builder/DtoToEntityBuilder.java | 12 +++---- .../ActivityLongLineSensorUsedServiceTopia.java | 8 +++-- 10 files changed, 65 insertions(+), 51 deletions(-) copy observe-entities-validation/src/main/resources/fr/ird/observe/entities/longline/SetLongline-n1-update-globalComposition-error-validation.xml => observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/ActivityLonglineSensorUsedDto-n1-update-error-validation.xml (100%) copy observe-entities-validation/src/main/resources/fr/ird/observe/entities/longline/SensorUsed-n1-update-error-validation.xml => observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-error-validation.xml (100%) copy observe-entities-validation/src/main/resources/fr/ird/observe/entities/longline/SensorUsed-n1-update-warning-validation.xml => observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-warning-validation.xml (100%) -- 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 develop in repository observe. See http://git.codelutin.com/observe.git commit 4bbd9ebec65925be085ee7fadf4e14870d18e861 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:27:14 2015 +0200 migration des écrans des capteurs pour les palangre (refs #7619) --- .../content/table/impl/longline/SensorUsedUI.jaxx | 12 +++---- .../table/impl/longline/SensorUsedUIHandler.java | 39 +++++++++------------- .../table/impl/longline/SensorUsedUIModel.java | 35 ++++++++++++++----- ...ctivityLongLineSensorUsedServiceController.java | 5 +-- .../ActivityLongLineSensorUsedService.java | 3 +- .../ActivityLongLineSensorUsedServiceTopia.java | 8 +++-- 6 files changed, 58 insertions(+), 44 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx index 2cf644c..92599e3 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx @@ -21,19 +21,17 @@ --> <fr.ird.observe.ui.content.table.ContentTableUI - superGenericType='ActivityLonglineDto, SensorUsedDto' + superGenericType='ActivityLonglineSensorUsedDto, SensorUsedDto' contentTitle='{n("observe.sensorUsed.title")}' saveNewEntryText='{n("observe.sensorUsed.action.create")}' - saveNewEntryTip='{n("observe.sensorUsed.action.create.tip")}' - - > + saveNewEntryTip='{n("observe.sensorUsed.action.create.tip")}'> <style source="../../CommonTable.css"/> <import> fr.ird.observe.services.dto.ReferenceDto fr.ird.observe.services.dto.CommentableDto - fr.ird.observe.services.dto.longline.ActivityLonglineDto + fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto fr.ird.observe.services.dto.longline.SensorUsedDto fr.ird.observe.services.dto.referential.longline.SensorTypeDto fr.ird.observe.services.dto.referential.longline.SensorBrandDto @@ -55,7 +53,7 @@ <SensorUsedUIModel id='model'/> <!-- edit bean --> - <ActivityLonglineDto id='bean'/> + <ActivityLonglineSensorUsedDto id='bean'/> <!-- table edit bean --> <SensorUsedDto id='tableEditBean'/> @@ -65,7 +63,7 @@ <!-- le validateur de l'écran --> <BeanValidator id='validator' autoField='true' context='n1-update-sensorUsed' - beanClass='fr.ird.observe.services.dto.longline.ActivityLonglineDto' + beanClass='fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto' errorTableModel='{getErrorTableModel()}'/> <!-- le validateur d'une entrée de tableau --> diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIHandler.java index 71e7cfd..3f4b5ab 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIHandler.java @@ -29,13 +29,14 @@ import fr.ird.observe.ObserveSwingApplicationContext; import fr.ird.observe.ObserveSwingTechnicalException; import fr.ird.observe.business.db.constants.DataContextType; import fr.ird.observe.services.dto.FormDto; -import fr.ird.observe.services.dto.longline.ActivityLonglineDto; -import fr.ird.observe.services.dto.longline.ActivityLonglineDtos; +import fr.ird.observe.services.dto.ReferenceDto; +import fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto; +import fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDtos; import fr.ird.observe.services.dto.longline.SensorUsedDto; import fr.ird.observe.services.dto.referential.longline.SensorBrandDto; import fr.ird.observe.services.dto.referential.longline.SensorDataFormatDto; import fr.ird.observe.services.dto.referential.longline.SensorTypeDto; -import fr.ird.observe.services.service.longline.ActivityLonglineService; +import fr.ird.observe.services.service.longline.ActivityLongLineSensorUsedService; import fr.ird.observe.ui.ObserveMainUI; import fr.ird.observe.ui.UIHelper; import fr.ird.observe.ui.content.table.ContentTableUIHandler; @@ -65,7 +66,7 @@ import static org.nuiton.i18n.I18n.t; * @author Tony Chemit - chemit@codelutin.com * @since 3.7 */ -public class SensorUsedUIHandler extends ContentTableUIHandler<ActivityLonglineDto, SensorUsedDto> { +public class SensorUsedUIHandler extends ContentTableUIHandler<ActivityLonglineSensorUsedDto, SensorUsedDto> { /** Logger */ static private Log log = LogFactory.getLog(SensorUsedUIHandler.class); @@ -107,9 +108,9 @@ public class SensorUsedUIHandler extends ContentTableUIHandler<ActivityLonglineD n("observe.sensorUsed.table.dataLocation"), n("observe.sensorUsed.table.dataLocation.tip")); - UIHelper.setTableColumnRenderer(table, 0, UIHelper.newDecorateTableCellRenderer(renderer, SensorTypeDto.class)); - UIHelper.setTableColumnRenderer(table, 1, UIHelper.newDecorateTableCellRenderer(renderer, SensorBrandDto.class)); - UIHelper.setTableColumnRenderer(table, 2, UIHelper.newDecorateTableCellRenderer(renderer, SensorDataFormatDto.class)); + UIHelper.setTableColumnRenderer(table, 0, UIHelper.newDecorateTableCellRenderer(renderer, ReferenceDto.class, SensorTypeDto.class.getSimpleName())); + UIHelper.setTableColumnRenderer(table, 1, UIHelper.newDecorateTableCellRenderer(renderer, ReferenceDto.class, SensorBrandDto.class.getSimpleName())); + UIHelper.setTableColumnRenderer(table, 2, UIHelper.newDecorateTableCellRenderer(renderer, ReferenceDto.class, SensorDataFormatDto.class.getSimpleName())); UIHelper.setTableColumnRenderer(table, 3, UIHelper.newStringTableCellRenderer(renderer, 10, true)); UIHelper.setTableColumnRenderer(table, 4, UIHelper.newBooleanTableCellRenderer(renderer, new Predicate<Object>() { @Override @@ -183,22 +184,14 @@ public class SensorUsedUIHandler extends ContentTableUIHandler<ActivityLonglineD public void exportData() { - //FIXME -// String filename; -// try { -// filename = getDataService().getSensorUsedDataFilename(getDataSource(), getTableEditBean()); -// } catch (DataSourceException e) { -// throw new ObserveTechnicalException("Could not obtain sensorUser data export filename", e); -// } + String filename = getTableEditBean().getDataFilename(); File file = JaxxFileChooser .forSaving() .setParent(getUi()) .setTitle(t("observe.title.choose.sensorUsed.exportData")) .setApprovalText(t("observe.action.choose.sensorUsed.exportData")) - //FIXME -// .setFilename(filename) - .setFilename(null) + .setFilename(filename) .setUseAcceptAllFileFilter(true) .choose(); @@ -235,19 +228,19 @@ public class SensorUsedUIHandler extends ContentTableUIHandler<ActivityLonglineD } @Override - protected void doPersist(ActivityLonglineDto bean) { - getActivityLonglineService().save(getSelectedParentId(), bean); + protected void doPersist(ActivityLonglineSensorUsedDto bean) { + getActivityLonglineSensorUsedService().save(bean); } @Override protected void loadEditBean(String beanId) { - FormDto<ActivityLonglineDto> formDto = getActivityLonglineService().loadToEdit(beanId); + FormDto<ActivityLonglineSensorUsedDto> formDto = getActivityLonglineSensorUsedService().loadToEdit(beanId); getModel().setFormDto(formDto); - ActivityLonglineDtos.copyActivityLonglineDto(formDto.getForm(), getBean()); + ActivityLonglineSensorUsedDtos.copyActivityLonglineSensorUsedDto(formDto.getForm(), getBean()); } - protected ActivityLonglineService getActivityLonglineService() { - return ObserveSwingApplicationContext.get().newService(ActivityLonglineService.class); + protected ActivityLongLineSensorUsedService getActivityLonglineSensorUsedService() { + return ObserveSwingApplicationContext.get().newService(ActivityLongLineSensorUsedService.class); } } \ No newline at end of file diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIModel.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIModel.java index 0516c35..48127fc 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIModel.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUIModel.java @@ -24,12 +24,15 @@ package fr.ird.observe.ui.content.table.impl.longline; import com.google.common.collect.Lists; import fr.ird.observe.services.dto.longline.ActivityLonglineDto; +import fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto; import fr.ird.observe.services.dto.longline.SensorUsedDto; +import fr.ird.observe.services.dto.longline.SensorUsedDtos; import fr.ird.observe.ui.content.table.ContentTableMeta; import fr.ird.observe.ui.content.table.ContentTableModel; import fr.ird.observe.ui.content.table.ContentTableUIModel; import fr.ird.observe.ui.content.table.ObserveContentTableUI; +import java.util.Collection; import java.util.List; /** @@ -38,18 +41,17 @@ import java.util.List; * @author Tony Chemit - chemit@codelutin.com * @since 3.7 */ -public class SensorUsedUIModel extends ContentTableUIModel<ActivityLonglineDto, SensorUsedDto> { +public class SensorUsedUIModel extends ContentTableUIModel<ActivityLonglineSensorUsedDto, SensorUsedDto> { private static final long serialVersionUID = 1L; public SensorUsedUIModel(SensorUsedUI ui) { - super(ActivityLonglineDto.class, + super(ActivityLonglineSensorUsedDto.class, SensorUsedDto.class, new String[]{ - //FIXME -// ActivityLonglineDto.PROPERTY_SENSOR_USED, - ActivityLonglineDto.PROPERTY_COMMENT}, + ActivityLonglineSensorUsedDto.PROPERTY_SENSOR_USED, + ActivityLonglineSensorUsedDto.PROPERTY_COMMENT}, new String[]{SensorUsedDto.PROPERTY_DATA, SensorUsedDto.PROPERTY_DATA_FILENAME, SensorUsedDto.PROPERTY_DATA_LOCATION, @@ -71,8 +73,25 @@ public class SensorUsedUIModel extends ContentTableUIModel<ActivityLonglineDto, } @Override - protected ContentTableModel<ActivityLonglineDto, SensorUsedDto> createTableModel(ObserveContentTableUI<ActivityLonglineDto, SensorUsedDto> ui, List<ContentTableMeta<SensorUsedDto>> contentTableMetas) { - // FIXME - return null; + protected ContentTableModel<ActivityLonglineSensorUsedDto, SensorUsedDto> createTableModel( + ObserveContentTableUI<ActivityLonglineSensorUsedDto, SensorUsedDto> ui, + List<ContentTableMeta<SensorUsedDto>> contentTableMetas) { + + return new ContentTableModel<ActivityLonglineSensorUsedDto, SensorUsedDto>(ui, contentTableMetas) { + @Override + protected Collection<SensorUsedDto> getChilds(ActivityLonglineSensorUsedDto bean) { + return bean.getSensorUsed(); + } + + @Override + protected void load(SensorUsedDto source, SensorUsedDto target) { + SensorUsedDtos.copySensorUsedDto(source, target); + } + + @Override + protected void setChilds(ActivityLonglineSensorUsedDto parent, List<SensorUsedDto> childs) { + parent.setSensorUsed(childs); + } + }; } } diff --git a/observe-application-web/src/main/java/fr/ird/observe/application/web/controller/v1/longline/ActivityLongLineSensorUsedServiceController.java b/observe-application-web/src/main/java/fr/ird/observe/application/web/controller/v1/longline/ActivityLongLineSensorUsedServiceController.java index d357d02..9ac9b71 100644 --- a/observe-application-web/src/main/java/fr/ird/observe/application/web/controller/v1/longline/ActivityLongLineSensorUsedServiceController.java +++ b/observe-application-web/src/main/java/fr/ird/observe/application/web/controller/v1/longline/ActivityLongLineSensorUsedServiceController.java @@ -25,6 +25,7 @@ package fr.ird.observe.application.web.controller.v1.longline; import fr.ird.observe.application.web.controller.v1.ObserveAuthenticatedServiceControllerSupport; import fr.ird.observe.services.dto.FormDto; import fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto; +import fr.ird.observe.services.dto.result.SaveResultDto; import fr.ird.observe.services.service.longline.ActivityLongLineSensorUsedService; /** @@ -47,7 +48,7 @@ public class ActivityLongLineSensorUsedServiceController extends ObserveAuthenti } @Override - public String save(FormDto<ActivityLonglineSensorUsedDto> form) { - return service.save(form); + public SaveResultDto save(ActivityLonglineSensorUsedDto dto) { + return service.save(dto); } } diff --git a/observe-services-api/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedService.java b/observe-services-api/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedService.java index 83200f8..643754b 100644 --- a/observe-services-api/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedService.java +++ b/observe-services-api/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedService.java @@ -25,6 +25,7 @@ package fr.ird.observe.services.service.longline; import fr.ird.observe.services.ObserveService; import fr.ird.observe.services.dto.FormDto; import fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto; +import fr.ird.observe.services.dto.result.SaveResultDto; import fr.ird.observe.services.spi.PostRequest; import fr.ird.observe.services.spi.ReadDataPermission; import fr.ird.observe.services.spi.Write; @@ -44,6 +45,6 @@ public interface ActivityLongLineSensorUsedService extends ObserveService { @WriteDataPermission @Write @PostRequest - String save(FormDto<ActivityLonglineSensorUsedDto> form); + SaveResultDto save(ActivityLonglineSensorUsedDto dto); } diff --git a/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedServiceTopia.java b/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedServiceTopia.java index d44984a..b4c6a88 100644 --- a/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedServiceTopia.java +++ b/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/ActivityLongLineSensorUsedServiceTopia.java @@ -31,6 +31,8 @@ import fr.ird.observe.services.dto.longline.SensorUsedDto; import fr.ird.observe.services.dto.referential.longline.SensorBrandDto; import fr.ird.observe.services.dto.referential.longline.SensorDataFormatDto; import fr.ird.observe.services.dto.referential.longline.SensorTypeDto; +import fr.ird.observe.services.dto.result.SaveResultDto; +import fr.ird.observe.services.dto.result.SaveResultDtos; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com @@ -66,13 +68,13 @@ public class ActivityLongLineSensorUsedServiceTopia extends ObserveServiceTopia } @Override - public String save(FormDto<ActivityLonglineSensorUsedDto> form) { + public SaveResultDto save(ActivityLonglineSensorUsedDto dto) { - ActivityLongline activityLongline = dtoToEntity(ActivityLonglineSensorUsedDto.class, ActivityLongline.class, form.getForm()); + ActivityLongline activityLongline = dtoToEntity(ActivityLonglineSensorUsedDto.class, ActivityLongline.class, dto); activityLongline = saveEntity(ActivityLongline.class, activityLongline); - return activityLongline.getTopiaId(); + return SaveResultDtos.newSaveResult(activityLongline.getTopiaId(), activityLongline.getLastUpdate()); } } -- 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 develop in repository observe. See http://git.codelutin.com/observe.git commit 2e9ab243d6859c172d55f7df7d3829c7de7f520d Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:28:49 2015 +0200 binder aussi les propritées dont la valeur est null. --- .../fr/ird/observe/services/builder/DtoToEntityBuilder.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/observe-services-topia/src/main/java/fr/ird/observe/services/builder/DtoToEntityBuilder.java b/observe-services-topia/src/main/java/fr/ird/observe/services/builder/DtoToEntityBuilder.java index 407b2c1..75fd352 100644 --- a/observe-services-topia/src/main/java/fr/ird/observe/services/builder/DtoToEntityBuilder.java +++ b/observe-services-topia/src/main/java/fr/ird/observe/services/builder/DtoToEntityBuilder.java @@ -23,7 +23,7 @@ package fr.ird.observe.services.builder; */ import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; import com.google.common.reflect.TypeToken; import fr.ird.observe.services.ObserveServiceTopia; import fr.ird.observe.services.dto.IdDto; @@ -76,9 +76,9 @@ public class DtoToEntityBuilder<D extends IdDto, E extends TopiaEntity> implemen Preconditions.checkNotNull(dto, "'dto' can't be null."); Preconditions.checkNotNull(entity, "'entity' can't be null."); - Map<String, Object> dtoProperties = binder.obtainProperties(dto); + Map<String, Object> dtoProperties = binder.obtainProperties(dto, true); - ImmutableMap.Builder<String, Object> entityProperties = new ImmutableMap.Builder<>(); + Map<String, Object> entityProperties = Maps.newHashMap(); for (Map.Entry<String, Object> entry : dtoProperties.entrySet()) { @@ -188,7 +188,7 @@ public class DtoToEntityBuilder<D extends IdDto, E extends TopiaEntity> implemen } - binder.injectProperties(entityProperties.build(), entity); + binder.injectProperties(entityProperties, entity, true); } @@ -247,13 +247,13 @@ public class DtoToEntityBuilder<D extends IdDto, E extends TopiaEntity> implemen } - protected void addProperty(String propertyName, Object propertyValue, ImmutableMap.Builder<String, Object> entitiesPropertiesBuilder) { + protected void addProperty(String propertyName, Object propertyValue, Map<String, Object> entitiesProperties) { if (IdDto.PROPERTY_ID.equals(propertyName)) { propertyName = TopiaEntity.PROPERTY_TOPIA_ID; } - entitiesPropertiesBuilder.put(propertyName, propertyValue); + entitiesProperties.put(propertyName, propertyValue); } } -- 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 develop in repository observe. See http://git.codelutin.com/observe.git commit fe6c58456937f14b983ec9eb037e581be2c2c811 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:34:30 2015 +0200 ajout des validateurs (refs #7619) --- .../content/table/impl/longline/SensorUsedUI.jaxx | 2 +- ...ineSensorUsedDto-n1-update-error-validation.xml | 39 ++++++++++++ .../SensorUsedDto-n1-update-error-validation.xml | 72 ++++++++++++++++++++++ .../SensorUsedDto-n1-update-warning-validation.xml | 39 ++++++++++++ 4 files changed, 151 insertions(+), 1 deletion(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx index 92599e3..30bf5a6 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/table/impl/longline/SensorUsedUI.jaxx @@ -62,7 +62,7 @@ <ContentTableModel id='tableModel'/> <!-- le validateur de l'écran --> - <BeanValidator id='validator' autoField='true' context='n1-update-sensorUsed' + <BeanValidator id='validator' autoField='true' context='n1-update' beanClass='fr.ird.observe.services.dto.longline.ActivityLonglineSensorUsedDto' errorTableModel='{getErrorTableModel()}'/> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/ActivityLonglineSensorUsedDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/ActivityLonglineSensorUsedDto-n1-update-error-validation.xml new file mode 100644 index 0000000..e0387a2 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/ActivityLonglineSensorUsedDto-n1-update-error-validation.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 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% + --> + +<!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="comment"> + + <!-- comentaire de moins de 1024 caractères --> + <field-validator type="stringlength"> + <param name="maxLength">1024</param> + <message>validator.activity.comment.tobig</message> + </field-validator> + + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-error-validation.xml new file mode 100644 index 0000000..a7e3292 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-error-validation.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 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% + --> + +<!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="sensorType"> + + <!-- pas de sensorType selectionnee --> + <field-validator type="required" short-circuit="true"> + <message>validator.sensorUsed.required.sensorType</message> + </field-validator> + + <!-- sensorType desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sensorType.enabled ]]> + </param> + <message>validator.sensorUsed.desactivated.sensorType</message> + </field-validator> + + </field> + + <field name="sensorDataFormat"> + + <!-- sensorDataFormat desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sensorDataFormat == null || sensorDataFormat.enabled ]]> + </param> + <message>validator.sensorUsed.desactivated.sensorDataFormat</message> + </field-validator> + + </field> + + <field name="sensorBrand"> + + <!-- sensorBrand desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sensorBrand == null || sensorBrand.enabled ]]> + </param> + <message>validator.sensorUsed.desactivated.sensorBrand</message> + </field-validator> + + </field> + + + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-warning-validation.xml new file mode 100644 index 0000000..3ed781f --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/SensorUsedDto-n1-update-warning-validation.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2010 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% + --> + +<!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="sensorSerialNo"> + + <!-- sensorSerialNo non renseigné --> + <field-validator type="required" short-circuit="true"> + <message>validator.sensorUsed.null.sensorSerialNo</message> + </field-validator> + + </field> + + +</validators> -- 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 develop in repository observe. See http://git.codelutin.com/observe.git commit cf1efc6109577a887b632df674efb49e3b471264 Merge: 2b2575f fe6c584 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 22 10:35:18 2015 +0200 Merge branch 'feature/7619' into develop .../content/table/impl/longline/SensorUsedUI.jaxx | 14 ++--- .../table/impl/longline/SensorUsedUIHandler.java | 39 +++++------- .../table/impl/longline/SensorUsedUIModel.java | 35 ++++++++--- ...ineSensorUsedDto-n1-update-error-validation.xml | 39 ++++++++++++ .../SensorUsedDto-n1-update-error-validation.xml | 72 ++++++++++++++++++++++ .../SensorUsedDto-n1-update-warning-validation.xml | 39 ++++++++++++ ...ctivityLongLineSensorUsedServiceController.java | 5 +- .../ActivityLongLineSensorUsedService.java | 3 +- .../services/builder/DtoToEntityBuilder.java | 12 ++-- .../ActivityLongLineSensorUsedServiceTopia.java | 8 ++- 10 files changed, 215 insertions(+), 51 deletions(-) -- 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