nbubna 2004/03/12 15:36:19 Modified: src/java/org/apache/velocity/tools/struts Tag: VELTOOLS_1_1 ActionMessagesTool.java ErrorsTool.java StrutsUtils.java Log: deprecate StrutsUtils' getActionErrors() and getActionMessages in favor of getErrors() and getMessages() (so we can stop using the extraneous ActionErrors class) Revision Changes Path No revision No revision 1.8.2.1 +2 -2 jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ActionMessagesTool.java Index: ActionMessagesTool.java =================================================================== RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ActionMessagesTool.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -r1.8 -r1.8.2.1 --- ActionMessagesTool.java 18 Feb 2004 20:09:51 -0000 1.8 +++ ActionMessagesTool.java 12 Mar 2004 23:36:19 -0000 1.8.2.1 @@ -78,7 +78,7 @@ //setup superclass instance members super.init(obj); - this.actionMsgs = StrutsUtils.getActionMessages(this.request); + this.actionMsgs = StrutsUtils.getMessages(this.request); } 1.12.2.1 +2 -2 jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ErrorsTool.java Index: ErrorsTool.java =================================================================== RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ErrorsTool.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -u -r1.12 -r1.12.2.1 --- ErrorsTool.java 18 Feb 2004 20:09:51 -0000 1.12 +++ ErrorsTool.java 12 Mar 2004 23:36:19 -0000 1.12.2.1 @@ -61,7 +61,7 @@ //setup superclass instance members super.init(obj); - this.actionMsgs = StrutsUtils.getActionErrors(this.request); + this.actionMsgs = StrutsUtils.getErrors(this.request); } 1.16.2.2 +26 -9 jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java Index: StrutsUtils.java =================================================================== RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.2 diff -u -r1.16.2.1 -r1.16.2.2 --- StrutsUtils.java 12 Mar 2004 20:16:27 -0000 1.16.2.1 +++ StrutsUtils.java 12 Mar 2004 23:36:19 -0000 1.16.2.2 @@ -331,27 +331,44 @@ /*********************** Struts Request Resources ****************/ /** - * Returns the <code>org.apache.struts.action.ActionErrors</code> - * object for this request or <code>null</code> if none exists. + * Returns the Struts errors for this request or <code>null</code> + * if none exist. * * @param request the servlet request + * @since VelocityTools 1.1 */ - public static ActionErrors getActionErrors(HttpServletRequest request) + public static ActionMessages getErrors(HttpServletRequest request) { - return (ActionErrors)request.getAttribute(Globals.ERROR_KEY); + return (ActionMessages)request.getAttribute(Globals.ERROR_KEY); } - /** - * Returns the <code>org.apache.struts.action.ActionMessages</code> - * object for this request or <code>null</code> if none exists. + * Returns the Struts messages for this request or <code>null</code> + * if none exist. * * @param request the servlet request * @since VelocityTools 1.1 */ - public static ActionMessages getActionMessages(HttpServletRequest request) + public static ActionMessages getMessages(HttpServletRequest request) { return (ActionMessages)request.getAttribute(Globals.MESSAGE_KEY); + } + + + /** + * @deprecated use [EMAIL PROTECTED] #getErrors(HttpServletRequest request)}. + */ + public static ActionErrors getActionErrors(HttpServletRequest request) + { + return (ActionErrors)getErrors(request); + } + + /** + * @deprecated use [EMAIL PROTECTED] #getMessages(HttpServletRequest request)}. + */ + public static ActionMessages getActionMessages(HttpServletRequest request) + { + return getMessages(request); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]