1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.mail; 27 28 import java.util.ArrayList ; 29 30 import javax.servlet.http.HttpServletRequest ; 31 32 import org.apache.struts.action.ActionMessage; 33 import org.apache.struts.action.ActionErrors; 34 import org.apache.struts.action.ActionForm; 35 import org.apache.struts.action.ActionMapping; 36 37 40 public class MailFactoryForm extends ActionForm { 41 43 45 private String action = null; 46 47 private String mailFactoryName = null; 48 private String jndiName = null; 49 private String username = null; 51 private String password = null; 52 private String sessionProps = null; 54 private String to = null; 56 private String subject = null; 57 private String cc = null; 58 private String bcc = null; 59 60 private ArrayList listUsedByEjb = new ArrayList (); 61 62 64 70 71 public void reset(ActionMapping mapping, HttpServletRequest request) { 72 action = "apply"; 73 } 74 75 86 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 87 ActionErrors oErrors = new ActionErrors(); 88 if (jndiName.length() == 0) { 89 oErrors.add("jndiName", new ActionMessage("error.mailservice.mailfactory.emptyjndiname")); 90 } 91 return oErrors; 92 } 93 94 public String getAction() { 95 return action; 96 } 97 98 public void setAction(String action) { 99 this.action = action; 100 } 101 102 public String getMailFactoryName() { 103 return mailFactoryName; 104 } 105 106 public void setMailFactoryName(String mailFactoryName) { 107 this.mailFactoryName = mailFactoryName; 108 } 109 110 public String getJndiName() { 111 return jndiName; 112 } 113 114 public void setJndiName(String jndiName) { 115 this.jndiName = jndiName; 116 } 117 118 public String getUsername() { 119 return username; 120 } 121 122 public void setUsername(String username) { 123 this.username = username; 124 } 125 126 public String getPassword() { 127 return password; 128 } 129 130 public void setPassword(String password) { 131 this.password = password; 132 } 133 134 public String getSessionProps() { 135 return sessionProps; 136 } 137 138 public void setSessionProps(String sessionProps) { 139 this.sessionProps = sessionProps; 140 } 141 142 public String getTo() { 143 return to; 144 } 145 146 public void setTo(String to) { 147 this.to = to; 148 } 149 150 public String getSubject() { 151 return subject; 152 } 153 154 public void setSubject(String subject) { 155 this.subject = subject; 156 } 157 158 public String getCc() { 159 return cc; 160 } 161 162 public void setCc(String cc) { 163 this.cc = cc; 164 } 165 166 public String getBcc() { 167 return bcc; 168 } 169 170 public void setBcc(String bcc) { 171 this.bcc = bcc; 172 } 173 174 183 184 public ArrayList getListUsedByEjb() { 185 return listUsedByEjb; 186 } 187 188 public void setListUsedByEjb(ArrayList listUsedByEjb) { 189 this.listUsedByEjb = listUsedByEjb; 190 } 191 192 } 193 | Popular Tags |