continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1054534 - in /continuum/trunk/continuum-xmlrpc: continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ continuum-xmlrpc-server/src/main/java/org...
Date Mon, 03 Jan 2011 06:48:19 GMT
Author: ctan
Date: Mon Jan  3 06:48:19 2011
New Revision: 1054534

URL: http://svn.apache.org/viewvc?rev=1054534&view=rev
Log:
[2599] ability for ContinuumXMLRPC to retrieve build agent's installations

Submitted By: Marc Jansen Tan Chua

Modified:
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java?rev=1054534&r1=1054533&r2=1054534&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
Mon Jan  3 06:48:19 2011
@@ -1028,6 +1028,26 @@ public interface ContinuumService
     Map<String, Object> getInstallationRPC( int installationId )
         throws Exception;
 
+    /**
+     * Return the installations list defined by this URL.
+     * 
+     * @param url The build agent URL
+     * @return The installations list.
+     * @throws Exception
+     */
+    List<Installation> getBuildAgentInstallations(String url)
+        throws Exception;
+
+    /**
+     * Same method but compatible with standard XMLRPC
+     * 
+     * @param url The build agent URL
+     * @return The installations list.
+     * @throws Exception
+     */
+    List<Object> getBuildAgentInstallationsRPC(String url)
+        throws Exception;
+
     Installation addInstallation( Installation installation )
         throws Exception;
 

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java?rev=1054534&r1=1054533&r2=1054534&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
Mon Jan  3 06:48:19 2011
@@ -497,6 +497,12 @@ public class ContinuumXmlRpcClient
         return continuum.getInstallation( installationId );
     }
 
+    public List<Installation> getBuildAgentInstallations( String url )
+        throws Exception
+    {
+        return continuum.getBuildAgentInstallations( url );
+    }
+
     // ----------------------------------------------------------------------
     // SystemConfiguration
     // ----------------------------------------------------------------------
@@ -854,6 +860,12 @@ public class ContinuumXmlRpcClient
         return continuum.getInstallationsRPC();
     }
 
+    public List<Object> getBuildAgentInstallationsRPC( String url )
+        throws Exception
+    {
+        return continuum.getBuildAgentInstallationsRPC( url );
+    }
+
     public Map<String, Object> getLatestBuildResultRPC( int projectId )
         throws Exception
     {
@@ -1272,5 +1284,4 @@ public class ContinuumXmlRpcClient
     {
         return continuum.getReleasePluginParameters( projectId );
     }
-
 }

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=1054534&r1=1054533&r2=1054534&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
Mon Jan  3 06:48:19 2011
@@ -1034,6 +1034,26 @@ public class ContinuumServiceImpl
         }
     }
 
+    public List<Installation> getBuildAgentInstallations( String url )
+        throws ContinuumException
+    {
+        try
+        {
+            List<org.apache.maven.continuum.model.system.Installation> buildAgentInstallations
= distributedBuildManager.getAvailableInstallations( url );
+
+            List<Installation> convertedBuildAgentInstallations = new ArrayList<Installation>();
+            for ( Object buildAgentInstallation : buildAgentInstallations )
+            {
+                convertedBuildAgentInstallations.add( populateInstallation( (org.apache.maven.continuum.model.system.Installation)
buildAgentInstallation ) );
+            }
+            return convertedBuildAgentInstallations;
+        }
+        catch (Exception e)
+        {
+            throw new ContinuumException( "Can't load installations", e );
+        }
+    }
+
     public Installation getInstallation( int installationId )
         throws ContinuumException
     {
@@ -2725,6 +2745,12 @@ public class ContinuumServiceImpl
         return serializeObject( this.getInstallations() );
     }
 
+    public List<Object> getBuildAgentInstallationsRPC( String url )
+        throws Exception
+    {
+        return serializeObject( this.getBuildAgentInstallations( url ) );
+    }
+
     public Map<String, Object> getLatestBuildResultRPC( int projectId )
         throws Exception
     {



Mime
View raw message