This is an automated email from the git hooks/post-receive script. New commit to branch feature/7616 in repository observe. See http://git.codelutin.com/observe.git commit 03685b9f52ddb82329a1e8a6929ef7b175fb581e Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Oct 28 15:56:18 2015 +0100 ajout des validateurs (refs #7616) --- ...to-n1-update-catchLongline-error-validation.xml | 41 +++++ ...CatchLonglineDto-n1-update-error-validation.xml | 175 +++++++++++++++++++++ ...tchLonglineDto-n1-update-warning-validation.xml | 63 ++++++++ 3 files changed, 279 insertions(+) diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/BranchlineDto-n1-update-catchLongline-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/BranchlineDto-n1-update-catchLongline-error-validation.xml new file mode 100644 index 0000000..e229d3d --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/BranchlineDto-n1-update-catchLongline-error-validation.xml @@ -0,0 +1,41 @@ +<?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="baitHaulingStatus"> + + <!-- baitHaulingStatus desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ baitHaulingStatus == null || baitHaulingStatus.enabled ]]> + </param> + <message>validator.branchline.desactivated.baitHaulingStatus</message> + </field-validator> + + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/CatchLonglineDto-n1-update-error-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/CatchLonglineDto-n1-update-error-validation.xml new file mode 100644 index 0000000..e4d07d6 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/CatchLonglineDto-n1-update-error-validation.xml @@ -0,0 +1,175 @@ +<?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="speciesCatch"> + + <!-- pas de species selectionnee --> + <field-validator type="required" short-circuit="true"> + <message>validator.catchLongline.required.speciesCatch</message> + </field-validator> + + <!-- species desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ speciesCatch.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.speciesCatch</message> + </field-validator> + + </field> + + <field name="count"> + + <!-- count obligatoire si mode = groupe --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ acquisitionMode == 0 || count != null ]]> + </param> + <message>validator.catchLongline.required.count.when.acquisitionModeIsGrouped</message> + </field-validator> + + </field> + + <field name="comment"> + + <!-- comentaire de moins de 1024 caractères --> + <field-validator type="stringlength" short-circuit="true"> + <param name="maxLength">1024</param> + <message>validator.catchLongline.comment.tobig</message> + </field-validator> + + <!-- comment requis selon le species --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ (comment != null && !comment.empty) || speciesCatch == null || !speciesCatch.needComment ]]></param> + <message>validator.catchLongline.required.comment.for.speciesCatch</message> + </field-validator> + + </field> + + <field name="catchFateLongline"> + + <!-- catchFateLongline desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ catchFateLongline == null || catchFateLongline.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.catchFateLongline</message> + </field-validator> + + </field> + + <field name="discardHealthness"> + + <!-- discardHealthness desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ discardHealthness == null || discardHealthness.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.discardHealthness</message> + </field-validator> + + </field> + + <field name="maturityStatus"> + + <!-- maturityStatus desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ maturityStatus == null || maturityStatus.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.maturityStatus</message> + </field-validator> + + </field> + + <field name="stomacFullness"> + + <!-- stomacFullness desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ stomacFullness == null || stomacFullness.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.stomacFullness</message> + </field-validator> + + </field> + + <field name="hookPosition"> + + <!-- hookPosition desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ hookPosition == null || hookPosition.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.hookPosition</message> + </field-validator> + + </field> + + <field name="catchHealthness"> + + <!-- catchHealthness desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ catchHealthness == null || catchHealthness.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.catchHealthness</message> + </field-validator> + + </field> + + <field name="sex"> + + <!-- sex desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ sex == null || sex.enabled ]]> + </param> + <message>validator.catchLongline.desactivated.sex</message> + </field-validator> + + </field> + + <field name="gonadeWeight"> + + <!-- gonadeWeight ==null || 0 <= gonadeWeight <= 2000 --> + <field-validator type="fieldexpressionwithparams" short-circuit="true"> + <param name="intParams">min:0|max:2000</param> + <param name="expression"><![CDATA[ + gonadeWeight ==null || (ints.min < gonadeWeight && gonadeWeight < ints.max) + ]]> + </param> + <message> + validator.catchLongline.bound.gonadeWeight##${ints.min}##${ints.max} + </message> + </field-validator> + + </field> + +</validators> diff --git a/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/CatchLonglineDto-n1-update-warning-validation.xml b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/CatchLonglineDto-n1-update-warning-validation.xml new file mode 100644 index 0000000..52820a2 --- /dev/null +++ b/observe-application-swing/src/main/resources/fr/ird/observe/services/dto/longline/CatchLonglineDto-n1-update-warning-validation.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Validation + %% + Copyright (C) 2008 - 2014 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="section"> + + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ !(section == null || basket == null || branchline == null)]]> + </param> + <message>validator.catchLongline.required.position</message> + </field-validator> + + </field> + + <field name="basket"> + + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ !(section == null || basket == null || branchline == null)]]> + </param> + <message>validator.catchLongline.required.position</message> + </field-validator> + + </field> + + <field name="branchline"> + + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ !(section == null || basket == null || branchline == null)]]> + </param> + <message>validator.catchLongline.required.position</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>.