continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r554924 - in /maven/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/jav...
Date Tue, 10 Jul 2007 12:50:09 GMT
Author: evenisse
Date: Tue Jul 10 05:50:07 2007
New Revision: 554924

URL: http://svn.apache.org/viewvc?view=rev&rev=554924
Log:
add AddBuildDefinition* methods

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

Modified: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java?view=diff&rev=554924&r1=554923&r2=554924
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
Tue Jul 10 05:50:07 2007
@@ -187,10 +187,11 @@
         throws ContinuumException, XmlRpcException;
 
     /**
-     * Update a project buildDefinition.
+     * Update a project build definition.
      *
      * @param projectId The project id
      * @param buildDef  The build defintion to update
+     * @return the updated build definition
      * @throws ContinuumException
      * @throws XmlRpcException
      */
@@ -198,14 +199,39 @@
         throws ContinuumException, XmlRpcException;
 
     /**
-     * Update a project group buildDefinition.
+     * Update a project group build definition.
      *
      * @param projectGroupId The project group id
      * @param buildDef       The build defintion to update
+     * @return the updated build definition
      * @throws ContinuumException
      * @throws XmlRpcException
      */
     BuildDefinition updateBuildDefinitionForProjectGroup( int projectGroupId, BuildDefinition
buildDef )
+        throws ContinuumException, XmlRpcException;
+
+    /**
+     * Add a project build definition.
+     *
+     * @param projectId The project id
+     * @param buildDef  The build defintion to update
+     * @return the added build definition
+     * @throws ContinuumException
+     * @throws XmlRpcException
+     */
+    BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDef
)
+        throws ContinuumException, XmlRpcException;
+
+    /**
+     * Add a project group buildDefinition.
+     *
+     * @param projectGroupId The project group id
+     * @param buildDef       The build defintion to update
+     * @return the build definition added
+     * @throws ContinuumException
+     * @throws XmlRpcException
+     */
+    BuildDefinition addBuildDefinitionToProjectGroup( int projectGroupId, BuildDefinition
buildDef )
         throws ContinuumException, XmlRpcException;
 
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java?view=diff&rev=554924&r1=554923&r2=554924
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
Tue Jul 10 05:50:07 2007
@@ -29,7 +29,6 @@
 import org.apache.maven.continuum.xmlrpc.project.ProjectGroup;
 import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
 import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
-import org.apache.xmlrpc.XmlRpcException;
 import org.apache.xmlrpc.client.XmlRpcClient;
 import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
 import org.apache.xmlrpc.client.util.ClientFactory;
@@ -161,7 +160,7 @@
     }
 
     public ProjectSummary updateProject( ProjectSummary project )
-        throws ContinuumException, XmlRpcException
+        throws ContinuumException
     {
         try
         {
@@ -198,7 +197,7 @@
     // ----------------------------------------------------------------------
 
     public List getAllProjectGroups()
-        throws ContinuumException, XmlRpcException
+        throws ContinuumException
     {
         try
         {
@@ -211,7 +210,7 @@
     }
 
     public List getAllProjectGroupsWithProjects()
-        throws ContinuumException, XmlRpcException
+        throws ContinuumException
     {
         try
         {
@@ -283,7 +282,7 @@
     }
 
     public ProjectGroupSummary updateProjectGroup( ProjectGroupSummary projectGroup )
-        throws ContinuumException, XmlRpcException
+        throws ContinuumException
     {
         try
         {
@@ -326,7 +325,7 @@
     }
 
     public BuildDefinition updateBuildDefinitionForProject( int projectId, BuildDefinition
buildDef )
-        throws ContinuumException, XmlRpcException
+        throws ContinuumException
     {
         try
         {
@@ -339,11 +338,37 @@
     }
 
     public BuildDefinition updateBuildDefinitionForProjectGroup( int projectGroupId, BuildDefinition
buildDef )
-        throws ContinuumException, XmlRpcException
+        throws ContinuumException
     {
         try
         {
             return continuum.updateBuildDefinitionForProjectGroup( projectGroupId, buildDef
);
+        }
+        catch ( Exception e )
+        {
+            throw new ContinuumException( "The remote method failed.", e );
+        }
+    }
+
+    public BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDef
)
+        throws ContinuumException
+    {
+        try
+        {
+            return continuum.addBuildDefinitionToProject( projectId, buildDef );
+        }
+        catch ( Exception e )
+        {
+            throw new ContinuumException( "The remote method failed.", e );
+        }
+    }
+
+    public BuildDefinition addBuildDefinitionToProjectGroup( int projectGroupId, BuildDefinition
buildDef )
+        throws ContinuumException
+    {
+        try
+        {
+            return continuum.addBuildDefinitionToProjectGroup( projectGroupId, buildDef );
         }
         catch ( Exception e )
         {

Modified: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java?view=diff&rev=554924&r1=554923&r2=554924
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
Tue Jul 10 05:50:07 2007
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.continuum.xmlrpc.project.AddingResult;
+import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
 import org.apache.maven.continuum.xmlrpc.project.BuildResult;
 import org.apache.maven.continuum.xmlrpc.project.ProjectDependency;
 import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
@@ -280,4 +281,17 @@
             }
         }
     }
+
+    public static void printBuildDefinition( BuildDefinition buildDef )
+    {
+        System.out.println( buildDef.getId() );
+        System.out.println( buildDef.getBuildFile() );
+        System.out.println( buildDef.getArguments() );
+        System.out.println( buildDef.getGoals() );
+        //printProfile( buildDef.getProfile() );
+        //printSchedule( buildDef.getSchedule() );
+        System.out.println( buildDef.isBuildFresh() );
+        System.out.println( buildDef.isDefaultForProject() );
+    }
+
 }

Modified: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?view=diff&rev=554924&r1=554923&r2=554924
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
Tue Jul 10 05:50:07 2007
@@ -359,6 +359,26 @@
         return populateBuildDefinition( bd );
     }
 
+    public BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDef
)
+        throws ContinuumException
+    {
+        checkAddProjectBuildDefinitionAuthorization( getProjectSummary( projectId ).getName()
);
+
+        org.apache.maven.continuum.model.project.BuildDefinition bd = populateBuildDefinition(
buildDef );
+        bd = continuum.addBuildDefinitionToProject( projectId, bd );
+        return populateBuildDefinition( bd );
+    }
+
+    public BuildDefinition addBuildDefinitionToProjectGroup( int projectGroupId, BuildDefinition
buildDef )
+        throws ContinuumException
+    {
+        checkAddGroupBuildDefinitionAuthorization( getPGSummary( projectGroupId ).getName()
);
+
+        org.apache.maven.continuum.model.project.BuildDefinition bd = populateBuildDefinition(
buildDef );
+        bd = continuum.addBuildDefinitionToProjectGroup( projectGroupId, bd );
+        return populateBuildDefinition( bd );
+    }
+
     // ----------------------------------------------------------------------
     // Building
     // ----------------------------------------------------------------------



Mime
View raw message