This is an automated email from the git hooks/post-receive script. New commit to branch feature/7599 in repository observe. See http://git.codelutin.com/observe.git commit 44d772e94967a3fa27161fa59e1edc307178bcf8 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Oct 15 10:32:35 2015 +0200 mise en place de la validation (refs #7599) --- ...loatingObjectDto-n1-create-error-validation.xml | 112 +++++++++++++++++++++ ...atingObjectDto-n1-create-warning-validation.xml | 55 ++++++++++ ...loatingObjectDto-n1-update-error-validation.xml | 111 ++++++++++++++++++++ ...atingObjectDto-n1-update-warning-validation.xml | 55 ++++++++++ 4 files changed, 333 insertions(+) diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-create-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-create-error-validation.xml new file mode 100644 index 0000000..fe5b689 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-create-error-validation.xml @@ -0,0 +1,112 @@ +<?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="objectType"> + + <!-- pas de type selectionne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.required.type</message> + </field-validator> + + <!-- type desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ objectType.enabled ]]> + </param> + <message>validator.floatingObject.desactivated.type</message> + </field-validator> + + </field> + + <field name="objectOperation"> + + <!-- pas de objectOperation selectionne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.required.objectOperation</message> + </field-validator> + + <!-- objectOperation desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ objectOperation.enabled ]]> + </param> + <message>validator.floatingObject.desactivated.objectOperation</message> + </field-validator> + + </field> + + <field name="supportVesselName"> + + <!-- supportVesselName de ${maxLength} caractères maximum --> + <field-validator type="fieldexpressionwithparams"> + <param name="intParams">maxLength:32</param> + <param name="expression"> + <![CDATA[ supportVesselName == null || supportVesselName.length() < ints.maxLength ]]> + </param> + <message>validator.floatingObject.size.supportVesselName##${ints.maxLength}</message> + </field-validator> + + </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.floatingObject.positive.daysAtSeaCount</message> + </field-validator> + + </field> + + <field name="comment"> + + <!-- comentaire de moins de 1024 caractères --> + <field-validator type="stringlength"> + <param name="maxLength">1024</param> + <message>validator.floatingObject.comment.tobig</message> + </field-validator> + + <!-- comment requis pour certains types d'objet --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ objectType == null || !objectType.needComment || (comment != null && !comment.empty) ]]> + </param> + <message>validator.floatingObject.required.comment.for.type</message> + </field-validator> + + <!-- comment requis pour certains objectFates d'objet --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ objectFate == null || !objectFate.needComment || (comment != null && !comment.empty) ]]> + </param> + <message>validator.floatingObject.required.comment.for.objectFate</message> + </field-validator> + + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-create-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-create-warning-validation.xml new file mode 100644 index 0000000..e89bff3 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-create-warning-validation.xml @@ -0,0 +1,55 @@ +<?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="objectFate"> + + <!-- pas de objectFate selectionne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.required.objectFate</message> + </field-validator> + + <!-- objectFate desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ objectFate.enabled ]]> + </param> + <message>validator.floatingObject.desactivated.objectFate</message> + </field-validator> + + </field> + + <field name="daysAtSeaCount"> + + <!-- count de jour a l'eau non renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.null.daysAtSeaCount</message> + </field-validator> + + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-update-error-validation.xml new file mode 100644 index 0000000..4ce1c8e --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-update-error-validation.xml @@ -0,0 +1,111 @@ +<?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="objectType"> + + <!-- pas de type selectionne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.required.type</message> + </field-validator> + + <!-- type desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ objectType.enabled ]]> + </param> + <message>validator.floatingObject.desactivated.type</message> + </field-validator> + + </field> + + <field name="objectOperation"> + + <!-- pas de objectOperation selectionne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.required.objectOperation</message> + </field-validator> + + <!-- objectOperation desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ objectOperation.enabled ]]> + </param> + <message>validator.floatingObject.desactivated.objectOperation</message> + </field-validator> + + </field> + + <field name="supportVesselName"> + + <!-- supportVesselName de ${maxLength} caractères maximum --> + <field-validator type="fieldexpressionwithparams"> + <param name="intParams">maxLength:32</param> + <param name="expression"> + <![CDATA[ supportVesselName == null || supportVesselName.length() < ints.maxLength ]]> + </param> + <message>validator.floatingObject.size.supportVesselName##${ints.maxLength}</message> + </field-validator> + + </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.floatingObject.positive.daysAtSeaCount</message> + </field-validator> + + </field> + + <field name="comment"> + + <!-- comentaire de moins de 1024 caractères --> + <field-validator type="stringlength"> + <param name="maxLength">1024</param> + <message>validator.floatingObject.comment.tobig</message> + </field-validator> + + <!-- comment requis pour certains types d'objet --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ objectType == null || !objectType.needComment || (comment != null && comment != "") ]]> + </param> + <message>validator.floatingObject.required.comment.for.type</message> + </field-validator> + + <!-- comment requis pour certains objectFates d'objet --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ objectFate == null || !objectFate.needComment || ( comment != null && comment != "" ) ]]> + </param> + <message>validator.floatingObject.required.comment.for.objectFate</message> + </field-validator> + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-update-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-update-warning-validation.xml new file mode 100644 index 0000000..e89bff3 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/seine/FloatingObjectDto-n1-update-warning-validation.xml @@ -0,0 +1,55 @@ +<?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="objectFate"> + + <!-- pas de objectFate selectionne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.required.objectFate</message> + </field-validator> + + <!-- objectFate desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ objectFate.enabled ]]> + </param> + <message>validator.floatingObject.desactivated.objectFate</message> + </field-validator> + + </field> + + <field name="daysAtSeaCount"> + + <!-- count de jour a l'eau non renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.floatingObject.null.daysAtSeaCount</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>.