continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1080490 - 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 Fri, 11 Mar 2011 08:56:19 GMT
Author: ctan
Date: Fri Mar 11 08:56:19 2011
New Revision: 1080490

URL: http://svn.apache.org/viewvc?rev=1080490&view=rev
Log:
[2611] ability to set useCredentialCached when adding a maven two project through XMLRPC

Submitted By: Efraim Lorenz Longkines

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=1080490&r1=1080489&r2=1080490&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
Fri Mar 11 08:56:19 2011
@@ -759,12 +759,47 @@ public interface ContinuumService
      * 
      * @param url
      * @param projectGroupId
-     * @return
+     * @return 
      * @throws Exception
      */
     Map<String, Object> addMavenTwoProjectAsSingleProjectRPC( String url, int projectGroupId
)
         throws Exception;
+    
+    /**
+     * Add a maven 2.x multi-module project from a url
+     * 
+     * @param url The POM url
+     * @param projectGroupId The id of the group where projects will be stored
+     * @param checkProtocol Determines whether the protocol will be checked
+     * @param useCredentialsCache Determines whether user credentials will be cached
+     * @param recursiveProjects Determines whether to load recursive projects
+     * @param checkoutInSingleDirectory Determines whether the project will be stored on
a single directory
+     * @return The result of the action with the list of projects created
+     * @throws Exception
+     */
+    AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkProtocol,
+                                     boolean useCredentialsCache, boolean recursiveProjects,
+                                     boolean checkoutInSingleDirectory )
+        throws Exception;
 
+    /**
+     * Same method but compatible with standard XMLRPC
+     * 
+     * @param url The POM url
+     * @param projectGroupId The id of the group where projects will be stored
+     * @param checkProtocol Determines whether the protocol will be checked
+     * @param useCredentialsCache Determines whether user credentials will be cached
+     * @param recursiveProjects Determines whether to load recursive projects
+     * @param checkoutInSingleDirectory Determines whether the project will be stored on
a single directory
+     * @return The result of the action with the list of projects created as RPC value
+     * @throws Exception
+     */
+    Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId, boolean
checkProtocol,
+                                               boolean useCredentialsCache, boolean recursiveProjects,
+                                               boolean checkoutInSingleDirectory )
+        throws Exception;
+    
+    
     // ----------------------------------------------------------------------
     // Maven 1.x projects
     // ----------------------------------------------------------------------

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=1080490&r1=1080489&r2=1080490&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
Fri Mar 11 08:56:19 2011
@@ -406,6 +406,16 @@ public class ContinuumXmlRpcClient
     {
         return continuum.addMavenTwoProjectAsSingleProject( url, projectGroupId );
     }
+    
+    public AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkProtocol,
+                                            boolean useCredentialsCache, boolean recursiveProjects,
+                                            boolean checkoutInSingleDirectory )
+        throws Exception
+    {
+        return continuum.addMavenTwoProject( url, projectGroupId, checkProtocol, useCredentialsCache,
+                                             recursiveProjects, checkoutInSingleDirectory
);
+    }
+
 
     // ----------------------------------------------------------------------
     // Maven 1.x projects
@@ -787,6 +797,15 @@ public class ContinuumXmlRpcClient
     {
         return continuum.addMavenTwoProjectAsSingleProjectRPC( url, projectGroupId );
     }
+    
+    public Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId,
boolean checkProtocol,
+                                                      boolean useCredentialsCache, boolean
recursiveProjects,
+                                                      boolean checkoutInSingleDirectory )
+        throws Exception
+    {
+        return continuum.addMavenTwoProjectRPC( url, projectGroupId, checkProtocol, useCredentialsCache,
+                                                recursiveProjects, checkoutInSingleDirectory
);
+    }
 
     public Map<String, Object> addProjectGroupRPC( String groupName, String groupId,
String description )
         throws Exception

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=1080490&r1=1080489&r2=1080490&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
Fri Mar 11 08:56:19 2011
@@ -850,6 +850,33 @@ public class ContinuumServiceImpl
 
         return populateAddingResult( result );
     }
+    
+    public AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkProtocol,
+                                            boolean useCredentialsCache, boolean recursiveProjects,
+                                            boolean checkoutInSingleDirectory )
+        throws Exception
+    {
+        checkAddProjectToGroupAuthorization( getProjectGroupName( projectGroupId ) );
+
+        ContinuumProjectBuildingResult result = null;
+        try
+        {
+            result =
+                continuum.addMavenTwoProject( url,
+                                              projectGroupId,
+                                              checkProtocol,
+                                              useCredentialsCache,
+                                              recursiveProjects,
+                                              continuum.getBuildDefinitionService().getDefaultMavenTwoBuildDefinitionTemplate().getId(),
+                                              checkoutInSingleDirectory );
+        }
+        catch ( BuildDefinitionServiceException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
+
+        return populateAddingResult( result );
+    }
 
     // ----------------------------------------------------------------------
     // Maven 1.x projects
@@ -2689,6 +2716,15 @@ public class ContinuumServiceImpl
     {
         return serializeObject( this.addMavenTwoProjectAsSingleProject( url, projectGroupId
) );
     }
+    
+    public Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId,
boolean checkProtocol,
+                                                      boolean useCredentialsCache, boolean
recursiveProjects,
+                                                      boolean checkoutInSingleDirectory )
+        throws Exception
+    {
+        return serializeObject( this.addMavenTwoProject( url, projectGroupId, checkProtocol,
useCredentialsCache,
+                                                         recursiveProjects, checkoutInSingleDirectory
) );
+    }
 
     public Map<String, Object> addProjectGroupRPC( String groupName, String groupId,
String description )
         throws Exception



Mime
View raw message