continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r443446 - /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Date Thu, 14 Sep 2006 19:29:00 GMT
Author: carlos
Date: Thu Sep 14 12:28:59 2006
New Revision: 443446

URL: http://svn.apache.org/viewvc?view=rev&rev=443446
Log:
Throw unhandled ContinuumException

Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?view=diff&rev=443446&r1=443445&r2=443446
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Thu Sep 14 12:28:59 2006
@@ -69,72 +69,49 @@
     }
 
     public String input()
+        throws ContinuumException
     {
         if ( id != 0 )
         {
-            try
-            {
-                schedule = getContinuum().getSchedule( id );
-                active = schedule.isActive();
+            schedule = getContinuum().getSchedule( id );
+            active = schedule.isActive();
 
-                String[] cronEx = schedule.getCronExpression().split( " " );
-                int i = 0;
-                while ( i < cronEx.length )
+            String[] cronEx = schedule.getCronExpression().split( " " );
+            int i = 0;
+            while ( i < cronEx.length )
+            {
+                switch( i )
                 {
-                    switch( i )
-                    {
-                        case 0 : second = cronEx[i]; break;
-                        case 1 : minute = cronEx[i]; break;
-                        case 2 : hour = cronEx[i]; break;
-                        case 3 : dayOfMonth = cronEx[i]; break;
-                        case 4 : month = cronEx[i]; break;
-                        case 5 : dayOfWeek = cronEx[i]; break;
-                        case 6 : year = cronEx[i]; break;
-                    }
-                    i++;
+                    case 0 : second = cronEx[i]; break;
+                    case 1 : minute = cronEx[i]; break;
+                    case 2 : hour = cronEx[i]; break;
+                    case 3 : dayOfMonth = cronEx[i]; break;
+                    case 4 : month = cronEx[i]; break;
+                    case 5 : dayOfWeek = cronEx[i]; break;
+                    case 6 : year = cronEx[i]; break;
                 }
-
-                description = schedule.getDescription();
-                name = schedule.getName();
-                delay = schedule.getDelay();
-                maxJobExecutionTime = schedule.getMaxJobExecutionTime();
-            }
-            catch ( ContinuumException e )
-            {
-                addActionError( "unable to retrieve schedule for editting" );
-                return ERROR;
+                i++;
             }
+
+            description = schedule.getDescription();
+            name = schedule.getName();
+            delay = schedule.getDelay();
+            maxJobExecutionTime = schedule.getMaxJobExecutionTime();
         }
         return SUCCESS;
     }
 
     public String save()
+        throws ContinuumException
     {
         if ( id == 0 )
         {
-            try
-            {
-                getContinuum().addSchedule( setFields( new Schedule() ) );
-            }
-            catch ( ContinuumException e )
-            {
-                addActionError( "unable to add schedule" );
-                return ERROR;
-            }
+            getContinuum().addSchedule( setFields( new Schedule() ) );
             return SUCCESS;
         }
         else
         {
-            try
-            {
-                getContinuum().updateSchedule( setFields( getContinuum().getSchedule( id
) ) );
-            }
-            catch ( ContinuumException e )
-            {
-                addActionError( "unable to edit schedule" );
-                return ERROR;
-            }
-
+            getContinuum().updateSchedule( setFields( getContinuum().getSchedule( id ) )
);
             return SUCCESS;
         }
     }



Mime
View raw message