continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r513262 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/core/action/ continuum-core/...
Date Thu, 01 Mar 2007 10:29:51 GMT
Author: evenisse
Date: Thu Mar  1 02:29:50 2007
New Revision: 513262

URL: http://svn.apache.org/viewvc?view=rev&rev=513262
Log:
Rename some store method as suggested by Trygve

Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectGroupAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
    maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
Thu Mar  1 02:29:50 2007
@@ -185,7 +185,7 @@
 
     void removeProjectGroup( ProjectGroup projectGroup );
 
-    ProjectGroup getProjectGroupWithBuildDetails( int projectGroupId )
+    ProjectGroup getProjectGroupWithBuildDetailsByProjectGroupId( int projectGroupId )
         throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     List getProjectsInGroup( int projectGroupId )
@@ -225,7 +225,7 @@
 
     List getBuildResultsForProject( int projectId, long fromDate );
 
-    Map getLatestBuildResults( int projectGroupId );
+    Map getLatestBuildResultsByProjectGroupId( int projectGroupId );
 
     Map getLatestBuildResults();
 
@@ -233,7 +233,7 @@
 
     Map getBuildResultsInSuccess();
 
-    Map getBuildResultsInSuccess( int projectGroupId );
+    Map getBuildResultsInSuccessByProjectGroupId( int projectGroupId );
 
     void addBuildResult( Project project, BuildResult build )
         throws ContinuumStoreException, ContinuumObjectNotFoundException;

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?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- 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
Thu Mar  1 02:29:50 2007
@@ -384,7 +384,7 @@
 
     public Map getLatestBuildResults( int projectGroupId )
     {
-        Map result = store.getLatestBuildResults( projectGroupId );
+        Map result = store.getLatestBuildResultsByProjectGroupId( projectGroupId );
 
         if ( result == null )
         {
@@ -408,7 +408,7 @@
 
     public Map getBuildResultsInSuccess( int projectGroupId )
     {
-        Map result = store.getBuildResultsInSuccess( projectGroupId );
+        Map result = store.getBuildResultsInSuccessByProjectGroupId( projectGroupId );
 
         if ( result == null )
         {
@@ -1344,7 +1344,7 @@
                 }
             }
 
-            projectGroup = store.getProjectGroupWithBuildDetails( projectGroupId );
+            projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId
);
 
             /* add the project group loaded from database, which has more info, like id */
             result.getProjectGroups().remove( 0 );
@@ -2553,7 +2553,7 @@
     {
         try
         {
-            return store.getProjectGroupWithBuildDetails( projectGroupId );
+            return store.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId
);
         }
         catch ( ContinuumObjectNotFoundException e )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
Thu Mar  1 02:29:50 2007
@@ -44,7 +44,7 @@
         BuildDefinition buildDefinition = getBuildDefinition( map );
         int projectGroupId =  getProjectGroupId( map );
 
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( projectGroupId
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
projectGroupId );
 
         resolveDefaultBuildDefinitionsForProjectGroup( buildDefinition, projectGroup );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectGroupAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectGroupAction.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectGroupAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectGroupAction.java
Thu Mar  1 02:29:50 2007
@@ -45,7 +45,7 @@
         BuildDefinition buildDefinition = getBuildDefinition( map );
         int projectGroupId =  getProjectGroupId( map );
 
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( projectGroupId
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
projectGroupId );
 
         if ( buildDefinition.isDefaultForProject() )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java
Thu Mar  1 02:29:50 2007
@@ -44,7 +44,7 @@
         BuildDefinition buildDefinition = getBuildDefinition( map );
         int projectGroupId = getProjectGroupId( map );
 
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( projectGroupId
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
projectGroupId );
 
         resolveDefaultBuildDefinitionsForProjectGroup( buildDefinition, projectGroup );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
Thu Mar  1 02:29:50 2007
@@ -142,7 +142,7 @@
                 context.put( CONTEXT_UPDATE_SCM_RESULT, buildResult.getScmResult() );
             }
 
-            ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( project.getProjectGroup().getId()
);
+            ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
project.getProjectGroup().getId() );
 
             // perform the project lvl notifications
             for ( Iterator i = project.getNotifiers().iterator(); i.hasNext(); )

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
Thu Mar  1 02:29:50 2007
@@ -177,7 +177,7 @@
 
         ProjectGroup projectGroup = getStore().getProjectGroupByProjectId( project.getId()
);
 
-        projectGroup = getStore().getProjectGroupWithBuildDetails( projectGroup.getId() );
+        projectGroup = getStore().getProjectGroupWithBuildDetailsByProjectGroupId( projectGroup.getId()
);
 
         List buildDefs = projectGroup.getBuildDefinitions();
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
Thu Mar  1 02:29:50 2007
@@ -237,7 +237,7 @@
 
         int projectGroupId = AbstractContinuumAction.getProjectGroupId( pgContext );
 
-        projectGroup = continuumStore.getProjectGroupWithBuildDetails( projectGroupId );
+        projectGroup = continuumStore.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId
);
 
         project = (Project) projectGroup.getProjects().get( 0 );
 

Modified: maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Thu Mar  1 02:29:50 2007
@@ -483,7 +483,7 @@
         return null;
     }
 
-    public Map getLatestBuildResults( int projectGroupId )
+    public Map getLatestBuildResultsByProjectGroupId( int projectGroupId )
     {
         PersistenceManager pm = getPersistenceManager();
 
@@ -545,7 +545,7 @@
 
     public Map getLatestBuildResults()
     {
-        return getLatestBuildResults( -1 );
+        return getLatestBuildResultsByProjectGroupId( -1 );
     }
 
     public void removeNotifier( ProjectNotifier notifier )
@@ -623,7 +623,7 @@
     public BuildDefinition getDefaultBuildDefinitionForProjectGroup( int projectGroupId )
         throws ContinuumStoreException, ContinuumObjectNotFoundException
     {
-        ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId );
+        ProjectGroup projectGroup = getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId
);
 
         for ( Iterator i = projectGroup.getBuildDefinitions().iterator(); i.hasNext(); )
         {
@@ -1092,7 +1092,7 @@
         return results;
     }
 
-    public Map getBuildResultsInSuccess( int projectGroupId )
+    public Map getBuildResultsInSuccessByProjectGroupId( int projectGroupId )
     {
         PersistenceManager pm = getPersistenceManager();
 
@@ -1155,7 +1155,7 @@
 
     public Map getBuildResultsInSuccess()
     {
-        return getBuildResultsInSuccess( -1 );
+        return getBuildResultsInSuccessByProjectGroupId( -1 );
     }
 
     public void removeProject( Project project )
@@ -1233,7 +1233,7 @@
         return (ProjectGroup) getObjectById( ProjectGroup.class, projectGroupId, PROJECTGROUP_PROJECTS_FETCH_GROUP
);
     }
 
-    public ProjectGroup getProjectGroupWithBuildDetails( int projectGroupId )
+    public ProjectGroup getProjectGroupWithBuildDetailsByProjectGroupId( int projectGroupId
)
         throws ContinuumObjectNotFoundException, ContinuumStoreException
     {
         return (ProjectGroup) getObjectById( ProjectGroup.class, projectGroupId, PROJECT_BUILD_DETAILS_FETCH_GROUP
);

Modified: maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java?view=diff&rev=513262&r1=513261&r2=513262
==============================================================================
--- maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
(original)
+++ maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
Thu Mar  1 02:29:50 2007
@@ -525,7 +525,7 @@
     public void testGetProjectGroupWithDetails()
         throws ContinuumStoreException
     {
-        ProjectGroup retrievedGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        ProjectGroup retrievedGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
defaultProjectGroup.getId() );
         assertProjectGroupEquals( defaultProjectGroup, retrievedGroup );
         assertNotifiersEqual( defaultProjectGroup.getNotifiers(), retrievedGroup.getNotifiers()
);
         assertBuildDefinitionsEqual( retrievedGroup.getBuildDefinitions(), defaultProjectGroup.getBuildDefinitions()
);
@@ -790,14 +790,14 @@
     public void testAddNotifierToProjectGroup()
         throws ContinuumStoreException
     {
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
defaultProjectGroup.getId() );
 
         ProjectNotifier notifier = createTestNotifier( 14, true, false, true, "TADNTPG type"
);
         ProjectNotifier copy = createTestNotifier( notifier );
         projectGroup.addNotifier( notifier );
         store.updateProjectGroup( projectGroup );
 
-        projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId()
);
         assertEquals( "check # notifiers", 3, projectGroup.getNotifiers().size() );
         assertNotifierEquals( copy, (ProjectNotifier) projectGroup.getNotifiers().get( 2
) );
     }
@@ -805,7 +805,7 @@
     public void testEditGroupNotifier()
         throws ContinuumStoreException
     {
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
defaultProjectGroup.getId() );
 
         ProjectNotifier newNotifier = (ProjectNotifier) projectGroup.getNotifiers().get(
0 );
         // If we use "type1.1", jpox-rc2 store "type1", weird
@@ -815,7 +815,7 @@
         ProjectNotifier copy = createTestNotifier( newNotifier );
         store.updateProjectGroup( projectGroup );
 
-        projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId()
);
         assertEquals( "check # notifiers", 2, projectGroup.getNotifiers().size() );
         assertNotifierEquals( copy, (ProjectNotifier) projectGroup.getNotifiers().get( 0
) );
     }
@@ -823,12 +823,12 @@
     public void testDeleteGroupNotifier()
         throws ContinuumStoreException
     {
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
defaultProjectGroup.getId() );
         ProjectNotifier notifier = (ProjectNotifier) projectGroup.getNotifiers().get( 1 );
         projectGroup.getNotifiers().remove( 0 );
         store.updateProjectGroup( projectGroup );
 
-        projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId()
);
         assertEquals( "check size is now 1", 1, projectGroup.getNotifiers().size() );
         assertNotifierEquals( notifier, (ProjectNotifier) projectGroup.getNotifiers().get(
0 ) );
 
@@ -839,7 +839,7 @@
     public void testAddBuildDefinitionToProjectGroup()
         throws ContinuumStoreException
     {
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
defaultProjectGroup.getId() );
 
         Profile profile = store.getProfile( testProfile1.getId() );
         Schedule schedule = store.getSchedule( testSchedule1.getId() );
@@ -849,7 +849,7 @@
         projectGroup.addBuildDefinition( buildDefinition );
         store.updateProjectGroup( projectGroup );
 
-        projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId()
);
         assertEquals( "check # build defs", 2, projectGroup.getBuildDefinitions().size()
);
         BuildDefinition retrievedBuildDefinition = (BuildDefinition) projectGroup.getBuildDefinitions().get(
1 );
         assertBuildDefinitionEquals( copy, retrievedBuildDefinition );
@@ -860,7 +860,7 @@
     public void testEditGroupBuildDefinition()
         throws ContinuumStoreException
     {
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
defaultProjectGroup.getId() );
 
         BuildDefinition newBuildDefinition = (BuildDefinition) projectGroup.getBuildDefinitions().get(
0 );
         // If we use "arguments1.1", jpox-rc2 store "arguments11", weird
@@ -870,7 +870,7 @@
         BuildDefinition copy = createTestBuildDefinition( newBuildDefinition );
         store.updateProjectGroup( projectGroup );
 
-        projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId()
);
         assertEquals( "check # build defs", 1, projectGroup.getBuildDefinitions().size()
);
         BuildDefinition retrievedBuildDefinition = (BuildDefinition) projectGroup.getBuildDefinitions().get(
0 );
         assertBuildDefinitionEquals( copy, retrievedBuildDefinition );
@@ -881,11 +881,11 @@
     public void testDeleteGroupBuildDefinition()
         throws ContinuumStoreException
     {
-        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId(
defaultProjectGroup.getId() );
         projectGroup.getBuildDefinitions().remove( 0 );
         store.updateProjectGroup( projectGroup );
 
-        projectGroup = store.getProjectGroupWithBuildDetails( defaultProjectGroup.getId()
);
+        projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId()
);
         assertEquals( "check size is now 0", 0, projectGroup.getBuildDefinitions().size()
);
 
         // !! These actually aren't happening !!



Mime
View raw message