continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r580641 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/
Date Sat, 29 Sep 2007 20:43:55 GMT
Author: olamy
Date: Sat Sep 29 13:43:55 2007
New Revision: 580641

URL: http://svn.apache.org/viewvc?rev=580641&view=rev
Log:
[CONTINUUM-1500] remove ContinuumStore use from the webapp part

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=580641&r1=580640&r2=580641&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Sat Sep 29 13:43:55 2007
@@ -2138,12 +2138,13 @@
         }
         catch ( ContinuumObjectNotFoundException cne )
         {
-            throw new ContinuumException( "no default build definition for project group",
cne );
+            throw new ContinuumException( "Project Group (id=" + projectGroupId +
+            " doens't have a default build definition, this should be impossible, it should
always have a default definition set." );
         }
         catch ( ContinuumStoreException cse )
         {
-            throw new ContinuumException(
-                "error attempting to access default build definition for project group "
+ projectGroupId, cse );
+            throw new ContinuumException( "Project Group (id=" + projectGroupId +
+            " doens't have a default build definition, this should be impossible, it should
always have a default definition set." );
         }
     }
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java?rev=580641&r1=580640&r2=580641&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java
Sat Sep 29 13:43:55 2007
@@ -19,15 +19,13 @@
  * under the License.
  */
 
-import com.opensymphony.xwork.Validateable;
+import java.util.Iterator;
+
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.ProjectGroup;
-import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
-import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 
-import java.util.Iterator;
+import com.opensymphony.xwork.Validateable;
 
 /**
  * @author Henry Isidro <hisidro@exist.com>
@@ -37,11 +35,6 @@
     extends ContinuumActionSupport
     implements Validateable
 {
-    /**
-     * @plexus.requirement role-hint="jdo"
-     */
-    private ContinuumStore store;
-
     private String name;
 
     private String groupId;
@@ -84,18 +77,15 @@
         {
             try
             {
-                if ( store.getProjectGroupByGroupId( groupId ) != null )
+                if ( getContinuum().getProjectGroupByGroupId( groupId ) != null )
                 {
                     addActionError( "projectGroup.error.groupId.already.exists" );
                 }
             }
-            catch ( ContinuumObjectNotFoundException e )
+            catch ( ContinuumException e )
             {
                 //since we want to add a new project group, we should be getting
                 //this exception
-            }
-            catch ( ContinuumStoreException e )
-            {
             }
         }
     }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java?rev=580641&r1=580640&r2=580641&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
Sat Sep 29 13:43:55 2007
@@ -43,11 +43,6 @@
 public class ProjectsListAction
     extends ContinuumActionSupport
 {
-    /**
-     * @plexus.requirement role-hint="jdo"
-     */
-    private ContinuumStore store;
-
     private Collection selectedProjects;
 
     private String projectGroupName = "";
@@ -148,22 +143,9 @@
 
             //TODO : Change this part because it's a duplicate of DefaultContinuum.buildProjectGroup*
             List<BuildDefinition> groupDefaultBDs = null;
-            if (getBuildDefinitionId() == -1 || getBuildDefinitionId() == 0)
+            if ( getBuildDefinitionId() == -1 || getBuildDefinitionId() == 0 )
             {
-                try
-                {
-                    groupDefaultBDs = store.getDefaultBuildDefinitionsForProjectGroup( projectGroupId
);
-                }
-                catch ( ContinuumObjectNotFoundException e )
-                {
-                    throw new ContinuumException( "Project Group (id=" + projectGroupId +
-                        " doens't have a default build definition, this should be impossible,
it should always have a default definition set." );
-                }
-                catch ( ContinuumStoreException e )
-                {
-                    throw new ContinuumException( "Project Group (id=" + projectGroupId +
-                        " doens't have a default build definition, this should be impossible,
it should always have a default definition set." );
-                }
+                groupDefaultBDs = getContinuum().getDefaultBuildDefinitionsForProjectGroup(
projectGroupId );
             }
             for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
             {
@@ -186,16 +168,14 @@
                     {
                         try
                         {
-                            projectDefaultBD = store.getDefaultBuildDefinitionForProject(
project.getId() );
-                        }
-                        catch ( ContinuumObjectNotFoundException e )
-                        {
-                            getLogger().debug( e.getMessage() );
+                            projectDefaultBD = getContinuum().getDefaultBuildDefinition(
project.getId() );
                         }
-                        catch ( ContinuumStoreException e )
+                        catch ( ContinuumException e )
                         {
+                            // here skip ObjectNotException
                             getLogger().debug( e.getMessage() );
                         }
+                        
 
                         if ( projectDefaultBD != null )
                         {

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java?rev=580641&r1=580640&r2=580641&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
Sat Sep 29 13:43:55 2007
@@ -19,12 +19,13 @@
  * under the License.
  */
 
-import com.opensymphony.webwork.ServletActionContext;
-import com.opensymphony.xwork.Preparable;
+import java.io.File;
+
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.configuration.ConfigurationStoringException;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 import org.codehaus.plexus.redback.rbac.Resource;
@@ -33,8 +34,8 @@
 import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.util.StringUtils;
 
-import javax.servlet.http.HttpServletRequest;
-import java.io.File;
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.Preparable;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -45,11 +46,6 @@
     extends ContinuumActionSupport
     implements Preparable, SecureAction
 {
-    /**
-     * @plexus.requirement role-hint="jdo"
-     */
-    private ContinuumStore store;
-
     private String workingDirectory;
 
     private String buildOutputDirectory;



Mime
View raw message