continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r691239 [3/3] - in /continuum/branches/continuum-transient-state: continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/continuum/purge/ continuum-api/src/main/java/org/apache/continuum/taskqueue/ cont...
Date Tue, 02 Sep 2008 13:24:52 GMT
Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Tue Sep  2 06:24:15 2008
@@ -19,7 +19,9 @@
  * under the License.
  */
 
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.model.repository.LocalRepository;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -78,6 +80,11 @@
      */
     private RoleManager roleManager;
 
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
+    
     private int projectGroupId;
 
     private ProjectGroup projectGroup;
@@ -117,9 +124,11 @@
     private String url;
 
     private int repositoryId;
-    
+
     private List<LocalRepository> repositories;
-    
+
+    private List<ProjectScmRoot> projectScmRoots;
+
     public String summary()
         throws ContinuumException
     {
@@ -220,6 +229,8 @@
                     preferredExecutor = "shell";
                 }
             }
+
+            projectScmRoots = getContinuum().getProjectScmRootByProjectGroup( projectGroup.getId()
);
         }
 
         return SUCCESS;
@@ -292,7 +303,7 @@
     }
 
     public String edit()
-        throws ContinuumException
+        throws Exception
     {
         try
         {
@@ -319,7 +330,7 @@
             while ( proj.hasNext() )
             {
                 Project p = (Project) proj.next();
-                if ( getContinuum().isInCheckoutQueue( p.getId() ) )
+                if ( taskQueueManager.isInCheckoutQueue( p.getId() ) )
                 {
                     projectInCOQueue = true;
                 }
@@ -930,4 +941,14 @@
 	{
 	    this.repositories = repositories;
 	}
+
+	public List<ProjectScmRoot> getProjectScmRoots()
+	{
+	    return projectScmRoots;
+	}
+
+	public void setProjectScmRoots( List<ProjectScmRoot> projectScmRoots )
+	{
+	    this.projectScmRoots = projectScmRoots;
+	}
 }

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
Tue Sep  2 06:24:15 2008
@@ -20,8 +20,10 @@
  */
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -146,8 +148,8 @@
                 Project p = getContinuum().getProjectWithAllDetails( projectId );
                 projectsList.add( p );
             }
-
-            List sortedProjects;
+            
+            List<Project> sortedProjects;
             try
             {
                 sortedProjects = getContinuum().getProjectsInBuildOrder( projectsList );
@@ -157,6 +159,25 @@
                 sortedProjects = projectsList;
             }
 
+            Map<Integer, Integer> projectsBuildDefsMap = getProjectsBuildDefsMap( sortedProjects
);
+            
+            for ( Project project : sortedProjects )
+            {
+                getContinuum().prepareBuildProjects( projectsBuildDefsMap );
+                
+                if ( this.getBuildDefinitionId() <= 0 )
+                {
+                    getContinuum().buildProject( project.getId(), projectsBuildDefsMap.get(
project.getId() ),
+                                                 ContinuumProjectState.TRIGGER_FORCED );
+                }
+                else
+                {
+                    getContinuum().buildProject( project.getId(), this.getBuildDefinitionId(),
+                                                 ContinuumProjectState.TRIGGER_FORCED );
+                }
+            }
+            
+            /*
             //TODO : Change this part because it's a duplicate of DefaultContinuum.buildProjectGroup*
             List<BuildDefinition> groupDefaultBDs = null;
 
@@ -164,6 +185,8 @@
             {
                 groupDefaultBDs = getContinuum().getDefaultBuildDefinitionsForProjectGroup(
projectGroupId );
             }
+          
+            
             for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
             {
                 Project project = (Project) i.next();
@@ -212,11 +235,38 @@
                                                  ContinuumProjectState.TRIGGER_FORCED );
                 }
             }
-
+            */
         }
 
         return SUCCESS;
     }
+    
+    private Map<Integer, Integer> getProjectsBuildDefsMap( List<Project> projects
)
+        throws ContinuumException
+    {
+        Map<Integer, Integer> projectsBuildDefsMap = new HashMap<Integer, Integer>();
+        
+        if ( this.getBuildDefinitionId() <= 0 )
+        {
+            boolean checkDefaultBuildDefinitionForProject = false;
+            
+            if ( this.getBuildDefinitionId() == -1 )
+            {
+                checkDefaultBuildDefinitionForProject = true;
+            }
+            
+            List<BuildDefinition> groupDefaultBDs = getContinuum().getDefaultBuildDefinitionsForProjectGroup(
projectGroupId );
+            
+            return getContinuum().getProjectsAndBuildDefinitionsMap( projects, 
+                                                                     groupDefaultBDs, 
+                                                                     checkDefaultBuildDefinitionForProject
);
+        }
+        else
+        {
+            return getContinuum().getProjectsAndBuildDefinitionsMap( projects,
+                                                                     this.getBuildDefinitionId()
);
+        }
+    }
 
     public String getProjectGroupName()
         throws ContinuumException

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
Tue Sep  2 06:24:15 2008
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
@@ -53,6 +55,11 @@
 
     private GroupSummary groupSummary = new GroupSummary();
 
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
+    
     public String execute()
         throws ContinuumException
     {
@@ -101,19 +108,26 @@
             model.setProjectGroupName( project.getProjectGroup().getName() );
 
             model.setProjectType( project.getExecutorId() );
-            
-            if ( getContinuum().isInBuildingQueue( project.getId() ) )
-            {
-                model.setInBuildingQueue( true );
-            }
-            else if ( getContinuum().isInCheckoutQueue( project.getId() ) )
+
+            try
             {
-                model.setInCheckoutQueue( true );
+                if ( taskQueueManager.isInBuildingQueue( project.getId() ) )
+                {
+                    model.setInBuildingQueue( true );
+                }
+                else if ( taskQueueManager.isInCheckoutQueue( project.getId() ) )
+                {
+                    model.setInCheckoutQueue( true );
+                }
+                else
+                {
+                    model.setInBuildingQueue( false );
+                    model.setInCheckoutQueue( false );
+                }
             }
-            else
+            catch ( TaskQueueManagerException e )
             {
-                model.setInBuildingQueue( false );
-                model.setInCheckoutQueue( false );
+                throw new ContinuumException( e.getMessage(), e );
             }
 
             model.setState( project.getState() );

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
Tue Sep  2 06:24:15 2008
@@ -20,6 +20,8 @@
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.taskqueue.Task;
@@ -52,6 +54,7 @@
                 if ( ( (BuildProjectTask) task ).getProjectId() == projectId )
                 {
                     getLogger().info( "Cancelling task for project " + projectId );
+                    
                     return getTaskQueueExecutor().cancelTask( task );
                 }
                 else

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
Tue Sep  2 06:24:15 2008
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import org.apache.commons.lang.ArrayUtils;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
@@ -76,6 +77,11 @@
     private int trigger;
 
     private String projectName;
+    
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
 
     // -----------------------------------------------------
     //  webwork
@@ -121,7 +127,7 @@
             return REQUIRES_AUTHENTICATION;
         }
             
-        getContinuum().removeProjectFromCheckoutQueue( projectId );
+        taskQueueManager.removeProjectFromCheckoutQueue( projectId );
         return SUCCESS;
     }
 
@@ -150,9 +156,9 @@
         throws Exception
     {
         this.setCurrentBuildProjectTask( (BuildProjectTask) taskQueueExecutor.getCurrentTask()
);        
-        this.setBuildProjectTasks( getContinuum().getProjectsInBuildQueue() );
+        this.setBuildProjectTasks( taskQueueManager.getProjectsInBuildQueue() );
         this.setCurrentCheckOutTask( (CheckOutTask) checkoutTaskQueueExecutor.getCurrentTask()
);
-        this.setCurrentCheckOutTasks( getContinuum().getCheckOutTasksInQueue() );
+        this.setCurrentCheckOutTasks( taskQueueManager.getCheckOutTasksInQueue() );
         return SUCCESS;
     }
 
@@ -174,7 +180,7 @@
             return REQUIRES_AUTHENTICATION;
         }
         
-        getContinuum().removeFromBuildingQueue( projectId, buildDefinitionId, trigger, projectName
);
+        taskQueueManager.removeFromBuildingQueue( projectId, buildDefinitionId, trigger,
projectName );
         Project project = getContinuum().getProject( projectId );
         project.setState( project.getOldState() );
         getContinuum().updateProject( project );
@@ -200,7 +206,7 @@
             return REQUIRES_AUTHENTICATION;
         }
         
-        getContinuum().removeProjectsFromBuildingQueueWithHashCodes( listToIntArray(this.getSelectedBuildTaskHashCodes())
);
+        taskQueueManager.removeProjectsFromBuildingQueueWithHashCodes( listToIntArray(this.getSelectedBuildTaskHashCodes())
);
         return SUCCESS;
     }
 
@@ -222,7 +228,7 @@
             return REQUIRES_AUTHENTICATION;
         }
         
-        getContinuum()
+        taskQueueManager
             .removeTasksFromCheckoutQueueWithHashCodes( listToIntArray( this.getSelectedCheckOutTaskHashCodes()
) );
         return SUCCESS;
     }

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
Tue Sep  2 06:24:15 2008
@@ -49,7 +49,7 @@
         {
             return NEW;
         }
-        else if ( state == ContinuumProjectState.OK )
+        else if ( state == ContinuumProjectState.OK || state == ContinuumProjectState.UPDATED
)
         {
             return "<img src=\"" + contextPath + "/images/icon_success_sml.gif\" alt=\""
+ SUCCESS + "\" title=\"" +
                 SUCCESS + "\" border=\"0\" />";

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java
Tue Sep  2 06:24:15 2008
@@ -22,6 +22,8 @@
 import com.opensymphony.webwork.ServletActionContext;
 import com.opensymphony.webwork.views.util.UrlHelper;
 import com.opensymphony.xwork.ActionContext;
+
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.model.ProjectSummary;
@@ -52,40 +54,80 @@
 {
     protected String getCellValue( TableModel tableModel, Column column )
     {
-        ProjectSummary project = (ProjectSummary) tableModel.getCurrentRowBean();
-
-        switch ( project.getState() )
+        if ( tableModel.getCurrentRowBean() instanceof ProjectSummary )
         {
-            case ContinuumProjectState.NEW:
-            case ContinuumProjectState.OK:
-            case ContinuumProjectState.FAILED:
-            case ContinuumProjectState.ERROR:
-            case ContinuumProjectState.BUILDING:
-            case ContinuumProjectState.UPDATING:
-            case ContinuumProjectState.CHECKING_OUT:
-            {
-                String state = StateGenerator.generate( project.getState(), tableModel.getContext().getContextPath()
);
+            ProjectSummary project = (ProjectSummary) tableModel.getCurrentRowBean();
 
-                if ( project.getLatestBuildId() != -1 && !StateGenerator.NEW.equals(
state ) )
+            switch ( project.getState() )
+            {
+                case ContinuumProjectState.NEW:
+                case ContinuumProjectState.OK:
+                case ContinuumProjectState.FAILED:
+                case ContinuumProjectState.ERROR:
+                case ContinuumProjectState.BUILDING:
+                case ContinuumProjectState.UPDATING:
+                case ContinuumProjectState.CHECKING_OUT:
                 {
-                    if ( isAuthorized( project ) )
+                    String state = StateGenerator.generate( project.getState(), tableModel.getContext().getContextPath()
);
+    
+                    if ( project.getLatestBuildId() != -1 && !StateGenerator.NEW.equals(
state ) )
                     {
-                        return createActionLink( "buildResult", project, state );
+                        if ( isAuthorized( project.getProjectGroupName() ) )
+                        {
+                            return createActionLink( "buildResult", project, state );
+                        }
+                        else
+                        {
+                            return state;
+                        }
                     }
                     else
                     {
                         return state;
                     }
                 }
-                else
+    
+                default:
                 {
-                    return state;
+                    return "&nbsp;";
                 }
             }
+        }
+        else 
+        {
+            ProjectScmRoot projectScmRoot = (ProjectScmRoot) tableModel.getCurrentRowBean();
 
-            default:
+            switch ( projectScmRoot.getState() )
             {
-                return "&nbsp;";
+                case ContinuumProjectState.UPDATING:
+                case ContinuumProjectState.UPDATED:
+                case ContinuumProjectState.ERROR:
+                {
+                    String state = StateGenerator.generate( projectScmRoot.getState(), 
+                                                            tableModel.getContext().getContextPath()
);
+                    
+                    if ( !StateGenerator.NEW.equals( state ) )
+                    {
+                        if ( isAuthorized( projectScmRoot.getProjectGroup().getName() ) &&
+                             projectScmRoot.getState() == ContinuumProjectState.ERROR )
+                        {
+                            return createActionLink( "scmResult", projectScmRoot, state );
+                        }
+                        else
+                        {
+                            return state;
+                        }
+                    }
+                    else
+                    {
+                        return state;
+                    }
+                }
+
+                default:
+                {
+                    return "&nbsp;";
+                }
             }
         }
     }
@@ -107,8 +149,22 @@
 
         return "<a href=\"" + url + "\">" + state + "</a>";
     }
+    
+    private static String createActionLink( String action, ProjectScmRoot scmRoot, String
state )
+    {
+        HashMap params = new HashMap();
+
+        params.put( "projectGroupId", new Integer( scmRoot.getProjectGroup().getId() ) );
+
+        params.put( "scmRootAddress", scmRoot.getScmRootAddress() );
+
+        String url = UrlHelper.buildUrl( "/" + action + ".action", ServletActionContext.getRequest(),

+                                         ServletActionContext.getResponse(), params );
+
+        return "<a href=\"" + url + "\">" + state + "</a>";
+    }
 
-    private boolean isAuthorized( ProjectSummary project )
+    private boolean isAuthorized( String projectGroupName )
     {
         // do the authz bit
         ActionContext context = ActionContext.getContext();
@@ -122,7 +178,7 @@
             SecuritySystem securitySystem = (SecuritySystem) container.lookup( SecuritySystem.ROLE
);
 
             if ( !securitySystem.isAuthorized( securitySession, ContinuumRoleConstants.CONTINUUM_VIEW_GROUP_OPERATION,
-                                               project.getProjectGroupName() ) )
+                                               projectGroupName ) )
             {
                 return false;
             }

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
Tue Sep  2 06:24:15 2008
@@ -229,7 +229,7 @@
           <allowedScheme>http</allowedScheme>
           <allowedScheme>https</allowedScheme>
           <allowedScheme>ftp</allowedScheme>
-          <!-- <allowedScheme>file</allowedScheme> -->
+          <allowedScheme>file</allowedScheme>
         </allowedSchemes>
       </configuration>
     </component>

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/resources/localization/Continuum.properties
Tue Sep  2 06:24:15 2008
@@ -180,6 +180,8 @@
 projectGroup.buildDefinition.label = Default Build Definition
 projectGroup.addProject.label = Add New Project
 projectGroup.repository.label = Local Repository
+projectGroup.scmRoot.title = Project Group Scm Root
+projectGroup.scmRoot.label = Scm Root URL
 
 # ----------------------------------------------------------------------
 # Page: Project Group - Members

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp
Tue Sep  2 06:24:15 2008
@@ -96,6 +96,20 @@
       </table>
     </div>
 
+    <h3><ww:text name="projectGroup.scmRoot.title"/></h3>
+    <ec:table items="projectScmRoots"
+              var="projectScmRoot"
+              showExports="false"
+              showPagination="false"
+              showStatusBar="false"
+              sortable="false"
+              filterable="false">
+      <ec:row highlightRow="true">
+        <ec:column property="state" title="&nbsp;" width="1%" cell="org.apache.maven.continuum.web.view.StateCell"/>
+        <ec:column property="scmRootAddress" title="projectGroup.scmRoot.label"/> 

+      </ec:row>
+    </ec:table>
+    
     <redback:ifAnyAuthorized permissions="continuum-build-group,continuum-remove-group"
resource="${projectGroup.name}">
       <h3><ww:text name="projectGroup.actions.title"/></h3>
 

Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=691239&r1=691238&r2=691239&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
Tue Sep  2 06:24:15 2008
@@ -22,6 +22,8 @@
 import net.sf.dozer.util.mapping.DozerBeanMapperSingletonWrapper;
 import net.sf.dozer.util.mapping.MapperIF;
 import org.apache.continuum.dao.SystemConfigurationDao;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
@@ -78,6 +80,11 @@
      * @plexus.requirement role-hint="default"
      */
     private RoleManager roleManager;
+    
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
 
     public boolean ping()
         throws ContinuumException
@@ -792,13 +799,27 @@
     public boolean isProjectInBuildingQueue( int projectId )
         throws ContinuumException
     {
-        return continuum.isInBuildingQueue( projectId );
+        try
+        {
+            return taskQueueManager.isInBuildingQueue( projectId );
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
     }
 
     public List<BuildProjectTask> getProjectsInBuildQueue()
         throws ContinuumException
     {
-        return populateBuildProjectTaskList( continuum.getProjectsInBuildQueue() );
+        try
+        {
+            return populateBuildProjectTaskList( taskQueueManager.getProjectsInBuildQueue()
);
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
     }
 
     // ----------------------------------------------------------------------



Mime
View raw message