branch develop updated (1d2a7cb -> 99e0b81)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository faxtomail. See http://git.codelutin.com/faxtomail.git from 1d2a7cb add missing dependency new 99e0b81 ajout de la suppression des signatures + validators The 1 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 99e0b812717e81f1ecac0e4d6c7315e84146f7d2 Author: Kevin Morin <morin@codelutin.com> Date: Wed Aug 26 11:37:08 2015 +0200 ajout de la suppression des signatures + validators Summary of changes: .../actions/{SaveSigningAction.java => DeleteSigningAction.java} | 6 +++--- ...r-validation.xml => SigningSettingsUIModel-error-validation.xml} | 0 2 files changed, 3 insertions(+), 3 deletions(-) copy faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/actions/{SaveSigningAction.java => DeleteSigningAction.java} (89%) copy faxtomail-ui-swing/src/main/resources/com/franciaflex/faxtomail/ui/swing/content/reply/{ReplyFormUIModel-error-validation.xml => SigningSettingsUIModel-error-validation.xml} (100%) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See http://git.codelutin.com/faxtomail.git commit 99e0b812717e81f1ecac0e4d6c7315e84146f7d2 Author: Kevin Morin <morin@codelutin.com> Date: Wed Aug 26 11:37:08 2015 +0200 ajout de la suppression des signatures + validators --- .../content/reply/actions/DeleteSigningAction.java | 73 +++++++++++++++++++++ .../SigningSettingsUIModel-error-validation.xml | 74 ++++++++++++++++++++++ 2 files changed, 147 insertions(+) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/actions/DeleteSigningAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/actions/DeleteSigningAction.java new file mode 100644 index 0000000..41f1b74 --- /dev/null +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/actions/DeleteSigningAction.java @@ -0,0 +1,73 @@ +package com.franciaflex.faxtomail.ui.swing.content.reply.actions; + +/* + * #%L + * FaxToMail :: UI + * $Id:$ + * $HeadURL:$ + * %% + * Copyright (C) 2014 - 2015 Mac-Groupe, Code Lutin + * %% + * 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% + */ + +import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; +import com.franciaflex.faxtomail.persistence.entities.Stamp; +import com.franciaflex.faxtomail.services.service.UserService; +import com.franciaflex.faxtomail.ui.swing.actions.AbstractFaxToMailAction; +import com.franciaflex.faxtomail.ui.swing.content.reply.SigningSettingsUI; +import com.franciaflex.faxtomail.ui.swing.content.reply.SigningSettingsUIHandler; +import com.franciaflex.faxtomail.ui.swing.content.reply.SigningSettingsUIModel; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * @author Kevin Morin (Code Lutin) + * @since 1.4 + */ +public class DeleteSigningAction extends AbstractFaxToMailAction<SigningSettingsUIModel, SigningSettingsUI, SigningSettingsUIHandler> { + + /** + * Logger. + */ + private static final Log log = LogFactory.getLog(DeleteSigningAction.class); + + public DeleteSigningAction(SigningSettingsUIHandler handler) { + super(handler, false); + } + + @Override + public void doAction() throws Exception { + SigningSettingsUIModel model = getModel(); + Stamp signing = model.getSelectedSigning(); + signing.setLabel(model.getSelectedSigningName()); + signing.setText(model.getSelectedSigningText()); + + FaxToMailUser user = getContext().getCurrentUser(); + + UserService userService = getContext().newServiceContext().getUserService(); + userService.saveSigning(user, signing, user.isSigningsEmpty()); + + } + + @Override + public void postSuccessAction() { + super.postSuccessAction(); + getModel().updateSetDefaultButtonEnabled(); + getModel().setModified(false); + getUI().getSigningList().repaint(); + } +} diff --git a/faxtomail-ui-swing/src/main/resources/com/franciaflex/faxtomail/ui/swing/content/reply/SigningSettingsUIModel-error-validation.xml b/faxtomail-ui-swing/src/main/resources/com/franciaflex/faxtomail/ui/swing/content/reply/SigningSettingsUIModel-error-validation.xml new file mode 100644 index 0000000..73b90d8 --- /dev/null +++ b/faxtomail-ui-swing/src/main/resources/com/franciaflex/faxtomail/ui/swing/content/reply/SigningSettingsUIModel-error-validation.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + FaxToMail :: UI + $Id$ + $HeadURL$ + %% + Copyright (C) 2014 Mac-Groupe, Code Lutin + %% + 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="to"> + <field-validator type="requiredstring" short-circuit="true"> + <message>faxtomail.validator.error.reply.to.required</message> + </field-validator> + <field-validator type="emails" short-circuit="true"> + <message>faxtomail.validator.error.reply.to.email</message> + </field-validator> + </field> + + <field name="cc"> + <field-validator type="emails" short-circuit="true"> + <message>faxtomail.validator.error.reply.cc.email</message> + </field-validator> + </field> + + <field name="cci"> + <field-validator type="emails" short-circuit="true"> + <message>faxtomail.validator.error.reply.cci.email</message> + </field-validator> + </field> + + <field name="from"> + <field-validator type="requiredstring" short-circuit="true"> + <message>faxtomail.validator.error.reply.from.required</message> + </field-validator> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ isValid("from") ]]> + </param> + <message>faxtomail.validator.error.reply.from.invalidDomain</message> + </field-validator> + <field-validator type="email" short-circuit="true"> + <message>faxtomail.validator.error.reply.from.email</message> + </field-validator> + </field> + + <field name="subject"> + <field-validator type="requiredstring" short-circuit="true"> + <message>faxtomail.validator.error.reply.subject.required</message> + </field-validator> + </field> + +</validators> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm