commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts MailReaderAction.java LogonAction.java
Date Tue, 01 Jun 2004 00:50:36 GMT
husted      2004/05/31 17:50:36

  Modified:    chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts
                        MailReaderAction.java LogonAction.java
  Log:
  Javadoc and code formatting.
  
  Revision  Changes    Path
  1.5       +42 -41    jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/MailReaderAction.java
  
  Index: MailReaderAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/MailReaderAction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MailReaderAction.java	8 Apr 2004 23:21:22 -0000	1.4
  +++ MailReaderAction.java	1 Jun 2004 00:50:36 -0000	1.5
  @@ -65,10 +65,10 @@
   
       // See interface for JavaDoc
       public MailReader getContext(
  -        ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request)
  -        throws Exception {
  +            ActionMapping mapping,
  +            ActionForm form,
  +            HttpServletRequest request)
  +            throws Exception {
   
           Locale locale = getLocale(request);
           Context input = getInput(form);
  @@ -87,9 +87,9 @@
        * @return ActionForward to follow, or null
        */
       protected ActionForward preExecute(ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request,
  -        HttpServletResponse response) throws Exception {
  +                                       ActionForm form,
  +                                       HttpServletRequest request,
  +                                       HttpServletResponse response) throws Exception {
   
           // override to provide functionality
           return null;
  @@ -104,8 +104,8 @@
        * @return Command for this helper
        */
       protected Command getCatalogCommand(ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request) throws Exception {
  +                                        ActionForm form,
  +                                        HttpServletRequest request) throws Exception {
   
           Catalog catalog = (Catalog) request.getSession().getServletContext().getAttribute("catalog");
           String name = mapping.getName();
  @@ -117,11 +117,11 @@
        * <p>Transfer input properties (back) to ActionForm.</p>
        */
       protected void conformInput(ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request,
  -        MailReader mailReader) throws Exception {
  +                                ActionForm form,
  +                                HttpServletRequest request,
  +                                MailReader mailReader) throws Exception {
   
  -        BeanUtils.copyProperties(form,mailReader.getInput());
  +        BeanUtils.copyProperties(form, mailReader.getInput());
   
       }
   
  @@ -129,11 +129,11 @@
        * <p>Transfer framework properties (back) to framework objects.</p>
        */
       protected void conformState(ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request,
  -        MailReader mailReader) throws Exception {
  +                                ActionForm form,
  +                                HttpServletRequest request,
  +                                MailReader mailReader) throws Exception {
   
  -        setLocale(request,mailReader.getLocale());
  +        setLocale(request, mailReader.getLocale());
           User user = mailReader.getUser();
           request.getSession().setAttribute(Constants.USER_KEY, user);
   
  @@ -147,9 +147,9 @@
        * </p>
        */
       protected ActionForward checkState(ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request,
  -        HttpServletResponse response) throws Exception {
  +                                       ActionForm form,
  +                                       HttpServletRequest request,
  +                                       HttpServletResponse response) throws Exception {
   
           // override to provide functionality
           return null;
  @@ -162,19 +162,19 @@
        * </p>
        */
       protected ActionForward postExecute(ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request,
  -        HttpServletResponse response,
  -        MailReader mailReader) throws Exception {
  +                                        ActionForm form,
  +                                        HttpServletRequest request,
  +                                        HttpServletResponse response,
  +                                        MailReader mailReader) throws Exception {
   
  -        conformInput(mapping,form,request,mailReader);
  -        conformState(mapping,form,request,mailReader);
  +        conformInput(mapping, form, request, mailReader);
  +        conformState(mapping, form, request, mailReader);
   
           // TODO: Expose any output
           // TODO: Expose any status messages,
   
  -        ActionForward location = checkState(mapping,form,request,response);
  -        if (null!=location) return location;
  +        ActionForward location = checkState(mapping, form, request, response);
  +        if (null != location) return location;
   
           return null;
   
  @@ -212,23 +212,24 @@
       }
   
   
  -      // See super class for JavaDoc
  +    // See super class for JavaDoc
       public ActionForward execute(
  -        ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request,
  -        HttpServletResponse response)
  -        throws Exception {
  +            ActionMapping mapping,
  +            ActionForm form,
  +            HttpServletRequest request,
  +            HttpServletResponse response)
  +            throws Exception {
   
           ActionForward location;
  -        MailReader mailReader = getContext(mapping,form,request);
  +        MailReader mailReader = getContext(mapping, form, request);
   
  -        location = preExecute(mapping,form,request,response);
  +        location = preExecute(mapping, form, request, response);
           if (location != null) return location;
   
  -        boolean stop = getCatalogCommand(mapping,form,request).execute(mailReader);
  +        Command command = getCatalogCommand(mapping, form, request);
  +        boolean stop = command.execute(mailReader);
   
  -        location = postExecute(mapping,form,request,response,mailReader);
  +        location = postExecute(mapping, form, request, response, mailReader);
           if (location != null) return location;
   
           return findSuccess(mapping);
  
  
  
  1.2       +7 -8      jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/LogonAction.java
  
  Index: LogonAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/LogonAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LogonAction.java	8 Apr 2004 23:21:02 -0000	1.1
  +++ LogonAction.java	1 Jun 2004 00:50:36 -0000	1.2
  @@ -12,24 +12,23 @@
   public class LogonAction extends MailReaderAction {
   
       protected ActionForward checkState(ActionMapping mapping,
  -        ActionForm form,
  -        HttpServletRequest request,
  -        HttpServletResponse response) throws Exception {
  +                                       ActionForm form,
  +                                       HttpServletRequest request,
  +                                       HttpServletResponse response) throws Exception {
   
           Object user = request.getSession().getAttribute(Constants.USER_KEY);
  -        if (user==null) {
  +        if (user == null) {
               ActionMessages errors = new ActionMessages();
               errors.add(
  -               ActionMessages.GLOBAL_MESSAGE,
  -               new ActionMessage("error.password.mismatch"));
  -            saveErrors(request,errors);
  +                    ActionMessages.GLOBAL_MESSAGE,
  +                    new ActionMessage("error.password.mismatch"));
  +            saveErrors(request, errors);
               return findInput(mapping);
           }
   
           return null;
   
       }
  -
   
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message