Methods Summary |
---|
public java.lang.String | getAction()Return the maintenance action.
// ----------------------------------------------------------- Properties
return (this.action);
|
public boolean | getAutoConnect()Return the auto-connect flag.
return (this.autoConnect);
|
public java.lang.String | getHost()Return the host name.
return (this.host);
|
public java.lang.String | getPassword()Return the password.
return (this.password);
|
public java.lang.String | getType()Return the subscription type.
return (this.type);
|
public java.lang.String | getUsername()Return the username.
return (this.username);
|
public void | reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)Reset all properties to their default values.
this.action = "Create";
this.autoConnect = false;
this.host = null;
this.password = null;
this.type = null;
this.username = null;
|
public void | setAction(java.lang.String action)Set the maintenance action.
this.action = action;
|
public void | setAutoConnect(boolean autoConnect)Set the auto-connect flag.
this.autoConnect = autoConnect;
|
public void | setHost(java.lang.String host)Set the host name.
this.host = host;
|
public void | setPassword(java.lang.String password)Set the password.
this.password = password;
|
public void | setType(java.lang.String type)Set the subscription type.
this.type = type;
|
public void | setUsername(java.lang.String username)Set the username.
this.username = username;
|
public org.apache.struts.action.ActionErrors | validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)Validate the properties that have been set from this HTTP request,
and return an ActionErrors object that encapsulates any
validation errors that have been found. If no errors are found, return
null or an ActionErrors object with no
recorded error messages.
ActionErrors errors = new ActionErrors();
if ((host == null) || (host.length() < 1))
errors.add("host",
new ActionError("error.host.required"));
if ((username == null) || (username.length() < 1))
errors.add("username",
new ActionError("error.username.required"));
if ((password == null) || (password.length() < 1))
errors.add("password",
new ActionError("error.password.required"));
if ((type == null) || (type.length() < 1))
errors.add("type",
new ActionError("error.type.required"));
else if (!"imap".equals(type) && !"pop3".equals(type))
errors.add("type",
new ActionError("error.type.invalid", type));
return (errors);
|