craigmcc 2002/07/01 18:52:15
Modified: src/share/org/apache/struts/action ActionForward.java
src/share/org/apache/struts/config ForwardConfig.java
Log:
Convenience constructors for use in unit tests.
Revision Changes Path
1.7 +27 -10
jakarta-struts/src/share/org/apache/struts/action/ActionForward.java
Index: ActionForward.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForward.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ActionForward.java 24 Jun 2002 18:53:01 -0000 1.6
+++ ActionForward.java 2 Jul 2002 01:52:15 -0000 1.7
@@ -113,7 +113,7 @@
*/
public ActionForward() {
- this(null, false);
+ this(null, false);
}
@@ -125,7 +125,7 @@
*/
public ActionForward(String path) {
- this(path, false);
+ this(path, false);
}
@@ -138,10 +138,27 @@
*/
public ActionForward(String path, boolean redirect) {
- super();
- setName(null);
- setPath(path);
- setRedirect(redirect);
+ super();
+ setName(null);
+ setPath(path);
+ setRedirect(redirect);
+
+ }
+
+
+ /**
+ * Construct a new instance with the specified path and redirect flag.
+ *
+ * @param name Name of this instance
+ * @param path Path for this instance
+ * @param redirect Redirect flag for this instance
+ */
+ public ActionForward(String name, String path, boolean redirect) {
+
+ super();
+ setName(name);
+ setPath(path);
+ setRedirect(redirect);
}
1.4 +34 -4
jakarta-struts/src/share/org/apache/struts/config/ForwardConfig.java
Index: ForwardConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ForwardConfig.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ForwardConfig.java 23 Feb 2002 23:53:29 -0000 1.3
+++ ForwardConfig.java 2 Jul 2002 01:52:15 -0000 1.4
@@ -79,6 +79,36 @@
public class ForwardConfig implements Serializable {
+ // ----------------------------------------------------------- Constructors
+
+
+ /**
+ * Construct a new instance with default values.
+ */
+ public ForwardConfig() {
+
+ super();
+
+ }
+
+
+ /**
+ * Construct a new instance with the specified values.
+ *
+ * @param name Name of this forward
+ * @param path Path to which control should be forwarded or redirected
+ * @param redirect Should we do a redirect?
+ */
+ public ForwardConfig(String name, String path, boolean redirect) {
+
+ super();
+ setName(name);
+ setPath(path);
+ setRedirect(redirect);
+
+ }
+
+
// ----------------------------------------------------- Instance Variables
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>