rleland 2002/10/09 07:14:12
Modified: src/validator/org/apache/struts/webapp/validator
LocaleAction.java MultiRegistrationAction.java
RegistrationAction.java TypeAction.java
TypeForm.java
Log:
Cleanup depreciation messages and import statements,
in preparation of adding new test cases.
Martin isn't the only one that has been using IntelliJ :-) !
Revision Changes Path
1.3 +4 -6
jakarta-struts/src/validator/org/apache/struts/webapp/validator/LocaleAction.java
Index: LocaleAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/validator/org/apache/struts/webapp/validator/LocaleAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LocaleAction.java 25 Jun 2002 18:26:57 -0000 1.2
+++ LocaleAction.java 9 Oct 2002 14:14:12 -0000 1.3
@@ -55,20 +55,17 @@
package org.apache.struts.webapp.validator;
-import java.io.IOException;
import java.util.Locale;
-import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogSource;
+import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.util.MessageResources;
/**
@@ -83,7 +80,7 @@
/**
* Commons Logging instance.
*/
- private Log log = LogSource.getInstance(this.getClass().getName());
+ private Log log =
LogFactory.getFactory().getInstance(this.getClass().getName());
/**
* Process the specified HTTP request, and create the corresponding HTTP
@@ -93,10 +90,11 @@
* already been completed.
*
* @param mapping The ActionMapping used to select this instance
- * @param actionForm The optional ActionForm bean for this request (if any)
+ * @param form The optional ActionForm bean for this request (if any)
* @param request The HTTP request we are processing
* @param response The HTTP response we are creating
*
+ * @return Action to forward to
* @exception Exception if an input/output error or servlet exception occurs
*/
public ActionForward execute(ActionMapping mapping,
1.3 +4 -6
jakarta-struts/src/validator/org/apache/struts/webapp/validator/MultiRegistrationAction.java
Index: MultiRegistrationAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/validator/org/apache/struts/webapp/validator/MultiRegistrationAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MultiRegistrationAction.java 25 Jun 2002 18:26:57 -0000 1.2
+++ MultiRegistrationAction.java 9 Oct 2002 14:14:12 -0000 1.3
@@ -55,14 +55,12 @@
package org.apache.struts.webapp.validator;
-import java.io.IOException;
import java.util.Locale;
-import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogSource;
+import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
@@ -82,7 +80,7 @@
/**
* Commons Logging instance.
*/
- private Log log = LogSource.getInstance(this.getClass().getName());
+ private Log log =
LogFactory.getFactory().getInstance(this.getClass().getName());
/**
@@ -93,7 +91,7 @@
* already been completed.
*
* @param mapping The ActionMapping used to select this instance
- * @param actionForm The optional ActionForm bean for this request (if any)
+ * @param form The optional ActionForm bean for this request (if any)
* @param request The HTTP request we are processing
* @param response The HTTP response we are creating
*
@@ -108,7 +106,7 @@
// Extract attributes we will need
HttpSession session = request.getSession();
Locale locale = getLocale(request);
- MessageResources messages = getResources();
+ MessageResources messages = getResources(request);
RegistrationForm info = (RegistrationForm)form;
String action = request.getParameter("action");
1.3 +5 -6
jakarta-struts/src/validator/org/apache/struts/webapp/validator/RegistrationAction.java
Index: RegistrationAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/validator/org/apache/struts/webapp/validator/RegistrationAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RegistrationAction.java 25 Jun 2002 18:26:57 -0000 1.2
+++ RegistrationAction.java 9 Oct 2002 14:14:12 -0000 1.3
@@ -55,14 +55,12 @@
package org.apache.struts.webapp.validator;
-import java.io.IOException;
import java.util.Locale;
-import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogSource;
+import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
@@ -80,7 +78,7 @@
/**
* Commons Logging instance.
*/
- private Log log = LogSource.getInstance(this.getClass().getName());
+ private Log log =
LogFactory.getFactory().getInstance(this.getClass().getName());
/**
* Process the specified HTTP request, and create the corresponding HTTP
@@ -90,10 +88,11 @@
* already been completed.
*
* @param mapping The ActionMapping used to select this instance
- * @param actionForm The optional ActionForm bean for this request (if any)
+ * @param form The optional ActionForm bean for this request (if any)
* @param request The HTTP request we are processing
* @param response The HTTP response we are creating
*
+ * @return Action to forward to
* @exception Exception if an input/output error or servlet exception occurs
*/
public ActionForward execute(ActionMapping mapping,
@@ -105,7 +104,7 @@
// Extract attributes we will need
HttpSession session = request.getSession();
Locale locale = getLocale(request);
- MessageResources messages = getResources();
+ MessageResources messages = getResources(request);
RegistrationForm info = (RegistrationForm)form;
String action = request.getParameter("action");
1.3 +5 -6
jakarta-struts/src/validator/org/apache/struts/webapp/validator/TypeAction.java
Index: TypeAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/validator/org/apache/struts/webapp/validator/TypeAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TypeAction.java 25 Jun 2002 18:26:57 -0000 1.2
+++ TypeAction.java 9 Oct 2002 14:14:12 -0000 1.3
@@ -55,14 +55,12 @@
package org.apache.struts.webapp.validator;
-import java.io.IOException;
import java.util.Locale;
-import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogSource;
+import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
@@ -80,7 +78,7 @@
/**
* Commons Logging instance.
*/
- private Log log = LogSource.getInstance(this.getClass().getName());
+ private Log log =
LogFactory.getFactory().getInstance(this.getClass().getName());
/**
* Process the specified HTTP request, and create the corresponding HTTP
@@ -90,10 +88,11 @@
* already been completed.
*
* @param mapping The ActionMapping used to select this instance
- * @param actionForm The optional ActionForm bean for this request (if any)
+ * @param form The optional ActionForm bean for this request (if any)
* @param request The HTTP request we are processing
* @param response The HTTP response we are creating
*
+ * @return Action to forward to
* @exception Exception if an input/output error or servlet exception occurs
*/
public ActionForward execute(ActionMapping mapping,
@@ -105,7 +104,7 @@
// Extract attributes we will need
HttpSession session = request.getSession();
Locale locale = getLocale(request);
- MessageResources messages = getResources();
+ MessageResources messages = getResources(request);
TypeForm info = (TypeForm)form;
String action = request.getParameter("action");
1.3 +29 -28
jakarta-struts/src/validator/org/apache/struts/webapp/validator/TypeForm.java
Index: TypeForm.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/validator/org/apache/struts/webapp/validator/TypeForm.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TypeForm.java 19 Mar 2002 06:49:17 -0000 1.2
+++ TypeForm.java 9 Oct 2002 14:14:12 -0000 1.3
@@ -71,7 +71,7 @@
*/
public final class TypeForm extends ValidatorForm implements Serializable {
private String action = null;
-
+
private String sByte = null;
private String sShort = null;
private String sInteger = null;
@@ -80,7 +80,7 @@
private String sDouble = null;
private String sDate = null;
private String sCreditCard = null;
-
+
private List lNames = initNames();
public String getAction() {
@@ -92,77 +92,77 @@
}
public String getByte() {
- return sByte;
+ return sByte;
}
-
+
public void setByte(String sByte) {
this.sByte = sByte;
}
-
+
public String getShort() {
- return sShort;
+ return sShort;
}
-
+
public void setShort(String sShort) {
this.sShort = sShort;
}
public String getInteger() {
- return sInteger;
+ return sInteger;
}
-
+
public void setInteger(String sInteger) {
this.sInteger = sInteger;
}
public String getLong() {
- return sLong;
+ return sLong;
}
-
+
public void setLong(String sLong) {
this.sLong = sLong;
}
public String getFloat() {
- return sFloat;
+ return sFloat;
}
-
+
public void setFloat(String sFloat) {
this.sFloat = sFloat;
}
public String getDouble() {
- return sDouble;
+ return sDouble;
}
-
+
public void setDouble(String sDouble) {
this.sDouble = sDouble;
}
public String getDate() {
- return sDate;
+ return sDate;
}
-
+
public void setDate(String sDate) {
this.sDate = sDate;
}
public String getCreditCard() {
- return sCreditCard;
+ return sCreditCard;
}
-
+
public void setCreditCard(String sCreditCard) {
this.sCreditCard = sCreditCard;
}
-
+
public List getNameList() {
- return lNames;
+ return lNames;
}
public void setNameList(List lNames) {
- this.lNames = lNames;
+ this.lNames = lNames;
}
-
+
/**
* Reset all properties to their default values.
*
@@ -179,20 +179,21 @@
sDouble = null;
sDate = null;
sCreditCard = null;
-
+
//lNames = initNames();
}
/**
* Initialize list.
+ * @return empty list of LabelValueBeans
*/
- private List initNames() {
+ private static List initNames() {
List lResults = new ArrayList();
-
+
for (int i = 0; i < 3; i++) {
lResults.add(new LabelValueBean(null, null));
}
-
- return lResults;
+
+ return lResults;
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>