MailFactoryForm.java

00001 /*
00002  * JOnAS: Java(TM) Open Application Server
00003  * Copyright (C) 1999 Bull S.A.
00004  * Contact: jonas-team@objectweb.org
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00019  * USA
00020  *
00021  * --------------------------------------------------------------------------
00022  * $Id: MailFactoryForm.java,v 1.3 2004/03/19 14:31:49 sauthieg Exp $
00023  * --------------------------------------------------------------------------
00024  */
00025 
00026 package org.objectweb.jonas.webapp.jonasadmin.service.mail;
00027 
00028 import java.util.ArrayList;
00029 
00030 import javax.servlet.http.HttpServletRequest;
00031 
00032 import org.apache.struts.action.ActionError;
00033 import org.apache.struts.action.ActionErrors;
00034 import org.apache.struts.action.ActionForm;
00035 import org.apache.struts.action.ActionMapping;
00036 
00040 public class MailFactoryForm extends ActionForm {
00041 // --------------------------------------------------------- Constants
00042 
00043 // --------------------------------------------------------- Properties variables
00044 
00045     private String action = null;
00046 
00047     private String mailFactoryName = null;
00048     private String jndiName = null;
00049     // authentication props
00050     private String username = null;
00051     private String password = null;
00052     // mail session props
00053     private String sessionProps = null;
00054     // mimepart datasource message props
00055     private String to = null;
00056     private String subject = null;
00057     private String cc = null;
00058     private String bcc = null;
00059 
00060     private ArrayList listUsedByEjb = new ArrayList();
00061 
00062 // --------------------------------------------------------- Public Methods
00063 
00071     public void reset(ActionMapping mapping, HttpServletRequest request) {
00072         action = "apply";
00073     }
00074 
00086     public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
00087         ActionErrors oErrors = new ActionErrors();
00088         if (jndiName.length() == 0) {
00089             oErrors.add("jndiName", new ActionError("error.mailservice.mailfactory.emptyjndiname"));
00090         }
00091         return oErrors;
00092     }
00093 
00094     public String getAction() {
00095         return action;
00096     }
00097 
00098     public void setAction(String action) {
00099         this.action = action;
00100     }
00101 
00102     public String getMailFactoryName() {
00103         return mailFactoryName;
00104     }
00105 
00106     public void setMailFactoryName(String mailFactoryName) {
00107         this.mailFactoryName = mailFactoryName;
00108     }
00109 
00110     public String getJndiName() {
00111         return jndiName;
00112     }
00113 
00114     public void setJndiName(String jndiName) {
00115         this.jndiName = jndiName;
00116     }
00117 
00118     public String getUsername() {
00119         return username;
00120     }
00121 
00122     public void setUsername(String username) {
00123         this.username = username;
00124     }
00125 
00126     public String getPassword() {
00127         return password;
00128     }
00129 
00130     public void setPassword(String password) {
00131         this.password = password;
00132     }
00133 
00134     public String getSessionProps() {
00135         return sessionProps;
00136     }
00137 
00138     public void setSessionProps(String sessionProps) {
00139         this.sessionProps = sessionProps;
00140     }
00141 
00142     public String getTo() {
00143         return to;
00144     }
00145 
00146     public void setTo(String to) {
00147         this.to = to;
00148     }
00149 
00150     public String getSubject() {
00151         return subject;
00152     }
00153 
00154     public void setSubject(String subject) {
00155         this.subject = subject;
00156     }
00157 
00158     public String getCc() {
00159         return cc;
00160     }
00161 
00162     public void setCc(String cc) {
00163         this.cc = cc;
00164     }
00165 
00166     public String getBcc() {
00167         return bcc;
00168     }
00169 
00170     public void setBcc(String bcc) {
00171         this.bcc = bcc;
00172     }
00173 
00174     /*
00175     public String get() {
00176         return ;
00177     }
00178 
00179     public void set(String ) {
00180         this. = ;
00181     }
00182     */
00183 
00184     public ArrayList getListUsedByEjb() {
00185         return listUsedByEjb;
00186     }
00187 
00188     public void setListUsedByEjb(ArrayList listUsedByEjb) {
00189         this.listUsedByEjb = listUsedByEjb;
00190     }
00191 
00192 }

Generated on Tue Feb 15 15:05:34 2005 for JOnAS by  doxygen 1.3.9.1