husted 2004/02/19 10:45:05 Modified: src/share/org/apache/struts/config ForwardConfig.java Log: Deprecate contextRelative in favor of module. Revision Changes Path 1.13 +33 -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.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ForwardConfig.java 13 Feb 2004 11:07:54 -0000 1.12 +++ ForwardConfig.java 19 Feb 2004 18:45:05 -0000 1.13 @@ -115,6 +115,7 @@ * @param path Path to which control should be forwarded or redirected * @param redirect Should we do a redirect? * @param contextRelative Is this path context relative? + * @deprecated Use module rather than contextRelative */ public ForwardConfig(String name, String path, boolean redirect, boolean contextRelative) { @@ -127,6 +128,25 @@ } + /** + * 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? + * @param module Module prefix, if any + */ + public ForwardConfig(String name, String path, boolean redirect, + String module) { + + super(); + setName(name); + setPath(path); + setRedirect(redirect); + setModule(module); + + } + // ----------------------------------------------------- Instance Variables @@ -144,13 +164,20 @@ * Should the value of the <code>path</code> property be considered * context-relative if it starts with a slash (and therefore not * prefixed with the module prefix? + * @deprecated Use module property instead; will be removed in a release following 1.2.0. */ protected boolean contextRelative = false; + /** + * @deprecated Use module property instead; will be removed in a release following 1.2.0. + */ public boolean getContextRelative() { return (this.contextRelative); } + /** + * @deprecated Use module property instead; will be removed in a release following 1.2.0. + */ public void setContextRelative(boolean contextRelative) { if (configured) { throw new IllegalStateException("Configuration is frozen"); @@ -273,6 +300,8 @@ sb.append(this.redirect); sb.append(",contextRelative="); sb.append(this.contextRelative); + sb.append(",module="); + sb.append(this.module); sb.append("]"); return (sb.toString());
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]