You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ct...@apache.org on 2008/10/29 05:16:22 UTC
svn commit: r708765 [5/7] - in
/continuum/branches/continuum-transient-state: ./ continuum-api/
continuum-api/src/main/java/org/apache/continuum/configuration/
continuum-api/src/main/java/org/apache/continuum/dao/
continuum-api/src/main/java/org/apache...
Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePrepare.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePrepare.jsp?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePrepare.jsp (original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePrepare.jsp Tue Oct 28 21:16:12 2008
@@ -32,14 +32,16 @@
<input type="hidden" name="projectId" value="<ww:property value="projectId"/>"/>
<div class="axial">
<table border="1" cellspacing="2" cellpadding="3" width="100%">
- <ww:textfield label="SCM Username" name="scmUsername" required="true"/>
- <ww:password label="SCM Password" name="scmPassword" required="true"/>
- <ww:textfield label="SCM Tag" name="scmTag" required="true"/>
+ <ww:textfield label="%{getText('releasePrepare.scmUsername.label')}" name="scmUsername" required="true"/>
+ <ww:password label="%{getText('releasePrepare.scmPassword.label')}" name="scmPassword" required="true"/>
+ <ww:textfield label="%{getText('releasePrepare.scmTag.label')}" name="scmTag" required="true"/>
<c:if test="${!empty (scmTagBase)}">
- <ww:textfield label="SCM Tag Base" name="scmTagBase"/>
+ <ww:textfield label="%{getText('releasePrepare.scmTagBase.label')}" name="scmTagBase"/>
</c:if>
- <ww:textfield label="Preparation Goals" name="prepareGoals" required="true"/>
- </table>
+ <ww:textfield label="%{getText('releasePrepare.prepareGoals.label')}" name="prepareGoals" required="true"/>
+ <ww:select label="%{getText('releasePrepare.buildEnvironment.label')}" name="profileId" list="profiles" listValue="name"
+ listKey="id" headerKey="-1" headerValue=""/>
+ </table>
</div>
<ww:iterator value="projects">
Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp (original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp Tue Oct 28 21:16:12 2008
@@ -43,6 +43,7 @@
<ww:form action="releaseInProgress" method="post">
<ww:hidden name="projectId"/>
<ww:hidden name="releaseId"/>
+ <ww:hidden name="releaseGoal"/>
<ww:submit value="Cancel"/>
</ww:form>
</td>
Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseViewResult.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseViewResult.jsp?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseViewResult.jsp (original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseViewResult.jsp Tue Oct 28 21:16:12 2008
@@ -30,6 +30,12 @@
<h4><ww:text name="releaseViewResult.summary"/></h4>
<div class="axial">
<table border="1" cellspacing="2" cellpadding="3" width="100%">
+ <c1:data label="%{getText('releaseViewResult.projectName')}">
+ <ww:param name="after"><ww:property value="projectName"/></ww:param>
+ </c1:data>
+ <c1:data label="%{getText('releaseViewResult.releaseGoal')}">
+ <ww:param name="after"><ww:property value="releaseGoal"/></ww:param>
+ </c1:data>
<c1:data label="%{getText('releaseViewResult.startTime')}">
<ww:param name="after"><c1:date name="result.startTime"/></ww:param>
</c1:data>
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml Tue Oct 28 21:16:12 2008
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>continuum-xmlrpc-api</artifactId>
@@ -52,7 +52,7 @@
</execution>
</executions>
<configuration>
- <version>1.1.0</version>
+ <version>1.1.1</version>
<packageWithVersion>false</packageWithVersion>
</configuration>
</plugin>
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java Tue Oct 28 21:16:12 2008
@@ -20,7 +20,12 @@
*/
import java.util.List;
+import java.util.Map;
+import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
+import org.apache.continuum.xmlrpc.repository.LocalRepository;
+import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
+import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
import org.apache.maven.continuum.xmlrpc.project.AddingResult;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinitionTemplate;
@@ -30,6 +35,7 @@
import org.apache.maven.continuum.xmlrpc.project.Project;
import org.apache.maven.continuum.xmlrpc.project.ProjectGroup;
import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
+import org.apache.maven.continuum.xmlrpc.project.ProjectNotifier;
import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
import org.apache.maven.continuum.xmlrpc.project.Schedule;
import org.apache.maven.continuum.xmlrpc.system.Installation;
@@ -58,6 +64,17 @@
List<ProjectSummary> getProjects( int projectGroupId )
throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId The project group Id
+ * @return List of {@link ProjectSummary} as RPC value
+ * @throws Exception
+ */
+ List<Object> getProjectsRPC(int projectGroupId)throws Exception;
+
+
/**
* Get a project.
*
@@ -69,6 +86,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId the project id
+ * @return The project summary as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> getProjectSummaryRPC(int projectId)throws Exception;
+
+ /**
* Get a project with all details.
*
* @param projectId The project id
@@ -79,6 +105,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId the project id
+ * @return The project as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> getProjectWithAllDetailsRPC(int projectId)throws Exception;
+
+ /**
* Remove a project.
*
* @param projectId The project id
@@ -96,11 +131,37 @@
ProjectSummary updateProject( ProjectSummary project )
throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param project The project to update
+ * @return The project as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> updateProjectRPC(Map<String,Object> project)throws Exception;
// ----------------------------------------------------------------------
// Projects Groups
// ----------------------------------------------------------------------
/**
+ * Get a project groups.
+ *
+ * @param projectGroupId the id
+ * @return project group
+ * @throws Exception
+ */
+ ProjectGroup getProjectGroup(int projectGroupId) throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId the id
+ * @return project group as RPC value
+ * @throws Exception
+ */
+ Map<String, Object> getProjectGroupRPC(int projectGroupId) throws Exception;
+
+ /**
* Get all project groups.
*
* @return All project groups
@@ -110,6 +171,14 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return List of {@link ProjectGroupSummary} as RPC value
+ * @throws Exception
+ */
+ List<Object> getAllProjectGroupsRPC()throws Exception;
+
+ /**
* Get all project groups with all details (project summaries, notifiers, build definitions).
*
* @return All project groups
@@ -119,6 +188,14 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return List of {@link ProjectGroup} as RPC value
+ * @throws Exception
+ */
+ List<Object> getAllProjectGroupsWithAllDetailsRPC()throws Exception;
+
+ /**
* Get all project groups with all details.
*
* @return All project groups
@@ -139,6 +216,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId The project group id
+ * @return The project group summary as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> getProjectGroupSummaryRPC(int projectGroupId)throws Exception;
+
+ /**
* Get a project group with all details.
*
* @param projectGroupId The project group id
@@ -149,6 +235,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId The project group id
+ * @return The project group as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> getProjectGroupWithProjectsRPC(int projectGroupId)throws Exception;
+
+ /**
* Remove a project group.
*
* @param projectGroupId The project group id
@@ -167,6 +262,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroup The project group to update
+ * @return The project group as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> updateProjectGroupRPC(Map<String,Object> projectGroup)throws Exception;
+
+ /**
* Add a project Group.
*
* @param groupName The project group name
@@ -177,7 +281,48 @@
*/
ProjectGroupSummary addProjectGroup( String groupName, String groupId, String description )
throws Exception;
-
+
+ int removeBuildDefinitionFromProjectGroup(int projectGroupId, int buildDefinitionId) throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param groupName The project group name
+ * @param groupId The project group id
+ * @param description The project group description
+ * @return the project group summary of the created project group as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addProjectGroupRPC( String groupName, String groupId, String description )
+ throws Exception;
+
+ ProjectNotifier getNotifier(int projectid, int notifierId) throws Exception;
+
+ Map<String, Object> getNotifierRPC(int projectid, int notifierId) throws Exception;
+
+ ProjectNotifier getGroupNotifier(int projectgroupid, int notifierId) throws Exception;
+
+ Map<String, Object> getGroupNotifierRPC(int projectgroupid, int notifierId) throws Exception;
+
+ ProjectNotifier updateGroupNotifier(int projectgroupid, ProjectNotifier newNotifier) throws Exception;
+
+ Map<String, Object> updateGroupNotifierRPC(int projectgroupid, Map<String, Object> newNotifier) throws Exception;
+
+ ProjectNotifier updateNotifier(int projectid, ProjectNotifier newNotifier) throws Exception;
+
+ Map<String, Object> updateNotifierRPC(int projectid, Map<String, Object> newNotifier) throws Exception;
+
+ int removeGroupNotifier(int projectgroupid, int notifierId) throws Exception;
+
+ int removeNotifier(int projectid, int notifierId) throws Exception;
+
+ ProjectNotifier addNotifier(int projectid, ProjectNotifier newNotifier) throws Exception;
+
+ ProjectNotifier addGroupNotifier(int projectgroupid, ProjectNotifier newNotifier) throws Exception;
+
+ Map<String, Object> addNotifierRPC(int projectid, Map<String, Object> newNotifier) throws Exception;
+
+ Map<String, Object> addGroupNotifierRPC(int projectgroupid, Map<String, Object> newNotifier) throws Exception;
+
// ----------------------------------------------------------------------
// Build Definitions
// ----------------------------------------------------------------------
@@ -193,6 +338,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId The project id
+ * @return The build definitions list as RPC value
+ * @throws Exception
+ */
+ List<Object> getBuildDefinitionsForProjectRPC( int projectId )
+ throws Exception;
+
+ /**
* Get the build definitions list of the project group.
*
* @param projectGroupId The project group id
@@ -203,6 +358,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId The project group id
+ * @return The build definitions list as RPC value
+ * @throws Exception
+ */
+ List<Object> getBuildDefinitionsForProjectGroupRPC( int projectGroupId )
+ throws Exception;
+
+ /**
* Update a project build definition.
*
* @param projectId The project id
@@ -214,6 +379,17 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId The project id
+ * @param buildDef The build defintion to update
+ * @return the updated build definition as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> updateBuildDefinitionForProjectRPC( int projectId, Map<String,Object> buildDef )
+ throws Exception;
+
+ /**
* Update a project group build definition.
*
* @param projectGroupId The project group id
@@ -225,6 +401,17 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId The project group id
+ * @param buildDef The build defintion to update
+ * @return the updated build definition as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> updateBuildDefinitionForProjectGroupRPC( int projectGroupId, Map<String,Object> buildDef )
+ throws Exception;
+
+ /**
* Add a project build definition.
*
* @param projectId The project id
@@ -236,6 +423,17 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId The project id
+ * @param buildDef The build defintion to update
+ * @return the added build definition as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addBuildDefinitionToProjectRPC( int projectId, Map<String,Object> buildDef )
+ throws Exception;
+
+ /**
* Add a project group buildDefinition.
*
* @param projectGroupId The project group id
@@ -247,6 +445,17 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId The project group id
+ * @param buildDef The build defintion to update
+ * @return the added build definition as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addBuildDefinitionToProjectGroupRPC( int projectGroupId, Map<String,Object> buildDef )
+ throws Exception;
+
+ /**
* Get the build definition templates list.
*
* @return The build definitions templates list
@@ -255,6 +464,14 @@
List<BuildDefinitionTemplate> getBuildDefinitionTemplates()
throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return The build definitions templates list as RPC value
+ * @throws Exception
+ */
+ List<Object> getBuildDefinitionTemplatesRPC()
+ throws Exception;
// ----------------------------------------------------------------------
// Building
// ----------------------------------------------------------------------
@@ -315,6 +532,7 @@
*/
int buildGroup( int projectGroupId, int buildDefinitionId )
throws Exception;
+
// ----------------------------------------------------------------------
// Build Results
// ----------------------------------------------------------------------
@@ -330,6 +548,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId The project id
+ * @return The build result as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> getLatestBuildResultRPC( int projectId )
+ throws Exception;
+
+ /**
* Returns the build result.
*
* @param projectId The project id
@@ -341,6 +569,17 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId The project id
+ * @param buildId The build id
+ * @return The build result as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> getBuildResultRPC( int projectId, int buildId )
+ throws Exception;
+
+ /**
* Returns the project build result summary list.
*
* @param projectId The project id
@@ -351,6 +590,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectId The project id
+ * @return The build result list as RPC value
+ * @throws Exception
+ */
+ List<Object> getBuildResultsForProjectRPC( int projectId )
+ throws Exception;
+
+ /**
* Remove the project build result.
*
* @param br The project build result
@@ -361,6 +610,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param br The project build result
+ * @return 0
+ * @throws Exception
+ */
+ int removeBuildResultRPC( Map<String,Object> br )
+ throws Exception;
+
+ /**
* Returns the build output.
*
* @param projectId The project id
@@ -386,6 +645,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param url The POM url
+ * @return The result of the action with the list of projects created as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addMavenTwoProjectRPC( String url )
+ throws Exception;
+
+ /**
* Add a maven 2.x project from an url.
*
* @param url The POM url
@@ -396,6 +665,17 @@
AddingResult addMavenTwoProject( String url, int projectGroupId )
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
+ * @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 )
+ throws Exception;
+
// ----------------------------------------------------------------------
// Maven 1.x projects
// ----------------------------------------------------------------------
@@ -411,6 +691,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param url The POM url
+ * @return The result of the action with the list of projects created as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addMavenOneProjectRPC( String url )
+ throws Exception;
+
+ /**
* Add a maven 1.x project from an url.
*
* @param url The POM url
@@ -421,6 +711,17 @@
AddingResult addMavenOneProject( String url, int projectGroupId )
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
+ * @return The result of the action with the list of projects created as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addMavenOneProjectRPC( String url, int projectGroupId )
+ throws Exception;
+
// ----------------------------------------------------------------------
// Maven ANT projects
// ----------------------------------------------------------------------
@@ -436,6 +737,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param project The project to add. name, version and scm informations are required
+ * @return The project populated with the id as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addAntProjectRPC( Map<String,Object> project)
+ throws Exception;
+
+ /**
* Add an ANT project in the specified group.
*
* @param project The project to add. name, version and scm informations are required
@@ -446,6 +757,17 @@
ProjectSummary addAntProject( ProjectSummary project, int projectGroupId )
throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param project The project to add. name, version and scm informations are required
+ * @param projectGroupId The id of the group where projects will be stored
+ * @return The project populated with the id as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addAntProjectRPC( Map<String,Object> project, int projectGroupId )
+ throws Exception;
+
// ----------------------------------------------------------------------
// Maven Shell projects
// ----------------------------------------------------------------------
@@ -461,6 +783,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param project The project to add. name, version and scm informations are required
+ * @return The project populated with the id as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addShellProjectRPC( Map<String,Object> project )
+ throws Exception;
+
+ /**
* Add an shell project in the specified group.
*
* @param project The project to add. name, version and scm informations are required
@@ -471,6 +803,17 @@
ProjectSummary addShellProject( ProjectSummary project, int projectGroupId )
throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param project The project to add. name, version and scm informations are required
+ * @param projectGroupId The id of the group where projects will be stored
+ * @return The project populated with the id as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> addShellProjectRPC( Map<String,Object> project, int projectGroupId )
+ throws Exception;
+
// ----------------------------------------------------------------------
// ADMIN TASKS
// ----------------------------------------------------------------------
@@ -489,6 +832,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return The schedule list as RPC value.
+ * @throws Exception
+ */
+ List<Object> getSchedulesRPC()
+ throws Exception;
+
+ /**
* Return the schedule defined by this id.
*
* @param scheduleId The schedule id
@@ -499,6 +851,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param scheduleId The schedule id
+ * @return The schedule as RPC value.
+ * @throws Exception
+ */
+ Map<String,Object> getScheduleRPC(int scheduleId)
+ throws Exception;
+
+ /**
* Add the schedule.
*
* @param schedule The schedule
@@ -509,6 +871,16 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param schedule The schedule
+ * @return The schedule as RPC value.
+ * @throws Exception
+ */
+ Map<String,Object> addScheduleRPC( Map<String,Object> schedule )
+ throws Exception;
+
+ /**
* Update the schedule.
*
* @param schedule The schedule
@@ -518,6 +890,16 @@
Schedule updateSchedule( Schedule schedule )
throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param schedule The schedule
+ * @return The schedule as RPC value.
+ * @throws Exception
+ */
+ Map<String,Object> updateScheduleRPC( Map<String,Object> schedule )
+ throws Exception;
+
// ----------------------------------------------------------------------
// Profiles
// ----------------------------------------------------------------------
@@ -532,6 +914,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return The profiles list as RPC value.
+ * @throws Exception
+ */
+ List<Object> getProfilesRPC()
+ throws Exception;
+
+ /**
* Return the profile defined by this id.
*
* @param profileId The profile id
@@ -541,6 +932,31 @@
Profile getProfile( int profileId )
throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param profileId The profile id
+ * @return The profile.
+ * @throws Exception
+ */
+ Map<String,Object> getProfileRPC( int profileId )
+ throws Exception;
+
+ Profile addProfile(Profile profile)
+ throws Exception;
+
+ int updateProfile(Profile profile)
+ throws Exception;
+
+ int deleteProfile(int profileId)
+ throws Exception;
+
+ Map<String,Object> addProfileRPC(Map<String,Object> profile)
+ throws Exception;
+
+ int updateProfileRPC(Map<String,Object> profile)
+ throws Exception;
+
// ----------------------------------------------------------------------
// Installations
// ----------------------------------------------------------------------
@@ -555,6 +971,15 @@
throws Exception;
/**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return The installations list.
+ * @throws Exception
+ */
+ List<Object> getInstallationsRPC()
+ throws Exception;
+
+ /**
* Return the installation defined by this id.
*
* @param installationId The installation id
@@ -564,12 +989,40 @@
Installation getInstallation( int installationId )
throws Exception;
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param installationId The installation id
+ * @return The installation.
+ * @throws Exception
+ */
+ Map<String,Object> getInstallationRPC( int installationId )
+ throws Exception;
+
+ Installation addInstallation(Installation installation)
+ throws Exception;
+
+ int updateInstallation(Installation installation)
+ throws Exception;
+
+ int deleteInstallation(int installationId)
+ throws Exception;
+
+ Map<String,Object> addInstallationRPC(Map<String,Object> installation)
+ throws Exception;
+
+ int updateInstallationRPC(Map<String,Object> installation)
+ throws Exception;
+
// ----------------------------------------------------------------------
// SystemConfiguration
// ----------------------------------------------------------------------
SystemConfiguration getSystemConfiguration()
throws Exception;
+
+ Map<String,Object> getSystemConfigurationRPC()
+ throws Exception;
// ----------------------------------------------------------------------
// Queue
@@ -593,6 +1046,25 @@
public List<BuildProjectTask> getProjectsInBuildQueue()
throws Exception;
+ /**
+ * Remove projects from build queue
+ *
+ * @param projectsId project id to be removed from the building queue
+ * @return
+ * @throws Exception
+ */
+ int removeProjectsFromBuildingQueue( int[] projectsId )
+ throws Exception;
+
+ /**
+ * Cancel the current project build
+ *
+ * @return
+ * @throws Exception
+ */
+ boolean cancelCurrentBuild()
+ throws Exception;
+
// ----------------------------------------------------------------------
// TODO:Users
// ----------------------------------------------------------------------
@@ -603,4 +1075,356 @@
boolean ping()
throws Exception;
+
+ // ----------------------------------------------------------------------
+ // Local Repository
+ // ----------------------------------------------------------------------
+
+ /**
+ * Add a local repository
+ *
+ * @param repository the local repository to add
+ * @return
+ * @throws Exception
+ */
+ LocalRepository addLocalRepository( LocalRepository repository )
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @param repository the local repository to add
+ * @return
+ * @throws Exception
+ */
+ Map<String, Object> addLocalRepositoryRPC( Map<String, Object> repository )
+ throws Exception;
+
+ /**
+ * Update the local repository
+ *
+ * @param repository the local repository to update
+ * @return
+ * @throws Exception
+ */
+ int updateLocalRepository( LocalRepository repository )
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @param repository the local repository to update
+ * @return
+ * @throws Exception
+ */
+ int updateLocalRepositoryRPC( Map<String, Object> repository )
+ throws Exception;
+
+ /**
+ * Remove the local repository
+ *
+ * @param repositoryId
+ * @return
+ * @throws Exception
+ */
+ int removeLocalRepository( int repositoryId )
+ throws Exception;
+
+ /**
+ * Returns the local repository
+ *
+ * @param repositoryId the local repository id
+ * @return
+ * @throws Exception
+ */
+ LocalRepository getLocalRepository( int repositoryId )
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @param repositoryId
+ * @return
+ * @throws Exception
+ */
+ Map<String, Object> getLocalRepositoryRPC( int repositoryId )
+ throws Exception;
+
+ /**
+ * Returns all local repositories
+ *
+ * @return
+ * @throws Exception
+ */
+ List<LocalRepository> getAllLocalRepositories()
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @return
+ * @throws Exception
+ */
+ List<Object> getAllLocalRepositoriesRPC()
+ throws Exception;
+
+ // ----------------------------------------------------------------------
+ // Purging
+ // ----------------------------------------------------------------------
+
+ /**
+ * Add a repository purge configuration
+ *
+ * @param repoPurge the repository purge configuration
+ * @return
+ * @throws Exception
+ */
+ RepositoryPurgeConfiguration addRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @param repoPurge the repository purge configuration
+ * @return
+ * @throws Exception
+ */
+ Map<String, Object> addRepositoryPurgeConfigurationRPC( Map<String, Object> repoPurge )
+ throws Exception;
+
+ /**
+ * Update the repository purge configuration
+ *
+ * @param repoPurge the repository purge configuration
+ * @return
+ * @throws Exception
+ */
+ int updateRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @param repoPurge the repository purge configuration
+ * @return
+ * @throws Exception
+ */
+ int updateRepositoryPurgeConfigurationRPC( Map<String, Object> repoPurge )
+ throws Exception;
+
+ /**
+ * Remove repository purge configuration
+ *
+ * @param repoPurgeId the repository purge configuration id
+ * @return
+ * @throws Exception
+ */
+ int removeRepositoryPurgeConfiguration( int repoPurgeId )
+ throws Exception;
+
+ /**
+ * Returns the repository purge configuration
+ *
+ * @param purgeConfigId the repository purge configuration id
+ * @return the repository purge configuration
+ * @throws Exception
+ */
+ RepositoryPurgeConfiguration getRepositoryPurgeConfiguration( int repoPurgeId )
+ throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param purgeConfigId the repository purge configuration id
+ * @return the repository purge configuration
+ * @throws Exception
+ */
+ Map<String, Object> getRepositoryPurgeConfigurationRPC( int purgeConfigId )
+ throws Exception;
+
+ /**
+ * Returns repository purge configurations list
+ *
+ * @return list of repository purge configurations
+ * @throws Exception
+ */
+ List<RepositoryPurgeConfiguration> getAllRepositoryPurgeConfigurations()
+ throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return list of repository purge configurations
+ * @throws Exception
+ */
+ List<Object> getAllRepositoryPurgeConfigurationsRPC()
+ throws Exception;
+
+ /**
+ * Add a directory purge configuration
+ *
+ * @param dirPurge the directory purge configuration
+ * @return
+ * @throws Exception
+ */
+ DirectoryPurgeConfiguration addDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge )
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @param dirPurge the directory purge configuration
+ * @return
+ * @throws Exception
+ */
+ Map<String, Object> addDirectoryPurgeConfigurationRPC( Map<String, Object> dirPurge )
+ throws Exception;
+
+ /**
+ * Update the directory purge configuration
+ *
+ * @param dirPurge the directory purge configuration
+ * @return
+ * @throws Exception
+ */
+ int updateDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge )
+ throws Exception;
+
+ /**
+ * Same method but compatible with the standard XMLRPC
+ *
+ * @param dirPurge the directory purge configuration
+ * @return
+ * @throws Exception
+ */
+ int updateDirectoryPurgeConfigurationRPC( Map<String, Object> dirPurge )
+ throws Exception;
+
+ /**
+ * Removes the directory purge configuration
+ *
+ * @param dirPurgeId the directory purge configuration id
+ * @return
+ * @throws Exception
+ */
+ int removeDirectoryPurgeConfiguration( int dirPurgeId )
+ throws Exception;
+
+ /**
+ * Returns the directory purge configuration
+ *
+ * @param purgeConfigId the directory purge configuration id
+ * @return the directory purge configuration
+ * @throws Exception
+ */
+ DirectoryPurgeConfiguration getDirectoryPurgeConfiguration( int purgeConfigId )
+ throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param purgeConfigId the directory purge configuration id
+ * @return the directory purge configuration
+ * @throws Exception
+ */
+ Map<String, Object> getDirectoryPurgeConfigurationRPC( int purgeConfigId )
+ throws Exception;
+
+ /**
+ * Returns directory purge configurations list
+ *
+ * @return list of directory purge configurations
+ * @throws Exception
+ */
+ List<DirectoryPurgeConfiguration> getAllDirectoryPurgeConfigurations()
+ throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @return list of directory purge configurations
+ * @throws Exception
+ */
+ List<Object> getAllDirectoryPurgeConfigurationsRPC()
+ throws Exception;
+
+ void purgeLocalRepository( int repoPurgeId )
+ throws Exception;
+
+ void purgeDirectory( int dirPurgeId )
+ throws Exception;
+
+ // ----------------------------------------------------------------------
+ // Release Results
+ // ----------------------------------------------------------------------
+
+ /**
+ * Returns the release result.
+ *
+ * @param releaseId The release id
+ * @return The release result
+ * @throws Exception
+ */
+ ContinuumReleaseResult getReleaseResult( int releaseId )
+ throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param releaseId The release id
+ * @return The release result as RPC value
+ * @throws Exception
+ */
+ Map<String,Object> getReleaseResultRPC( int releaseId )
+ throws Exception;
+
+ /**
+ * Returns the project group release result list.
+ *
+ * @param projectGroupId The project group id
+ * @return The release result list
+ * @throws Exception
+ */
+ List<ContinuumReleaseResult> getReleaseResultsForProjectGroup( int projectGroupId )
+ throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param projectGroupId The project group id
+ * @return The release result list as RPC value
+ * @throws Exception
+ */
+ List<Object> getReleaseResultsForProjectGroupRPC( int projectGroupId )
+ throws Exception;
+
+ /**
+ * Remove the project release result.
+ *
+ * @param releaseResult The project release result
+ * @return 0
+ * @throws Exception
+ */
+ int removeReleaseResult( ContinuumReleaseResult releaseResult )
+ throws Exception;
+
+ /**
+ * Same method but compatible with standard XMLRPC
+ *
+ * @param rr The project release result
+ * @return 0
+ * @throws Exception
+ */
+ int removeReleaseResultRPC( Map<String,Object> rr )
+ throws Exception;
+
+ /**
+ * Returns the release output.
+ *
+ * @param releaseId The release id
+ * @return The release output
+ * @throws Exception
+ */
+ String getReleaseOutput( int releaseId )
+ throws Exception;
}
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml Tue Oct 28 21:16:12 2008
@@ -55,6 +55,13 @@
<version>1.1.0+</version>
<type>String</type>
</field>
+ <field>
+ <name>localRepository</name>
+ <version>1.1.1+</version>
+ <association>
+ <type>LocalRepository</type>
+ </association>
+ </field>
</fields>
</class>
@@ -1201,6 +1208,204 @@
</field>
</fields>
</class>
+
+ <class>
+ <name>LocalRepository</name>
+ <version>1.1.1+</version>
+ <packageName>org.apache.continuum.xmlrpc.repository</packageName>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.1.1+</version>
+ <type>int</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.1.1+</version>
+ <type>String</type>
+ <required>true</required>
+ </field>
+ <field jpox.column="repoLocation">
+ <name>location</name>
+ <version>1.1.1+</version>
+ <type>String</type>
+ <required>true</required>
+ <description>
+ The file system location for this repository
+ </description>
+ </field>
+ <field>
+ <name>layout</name>
+ <version>1.1.1+</version>
+ <type>String</type>
+ <defaultValue>default</defaultValue>
+ <description>
+ The layout of the repository. Valid values are "default" and "legacy"
+ </description>
+ </field>
+ </fields>
+ </class>
+ <class>
+ <name>AbstractPurgeConfiguration</name>
+ <version>1.1.1+</version>
+ <abstract>true</abstract>
+ <packageName>org.apache.continuum.xmlrpc.repository</packageName>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.1.1+</version>
+ <identifier>true</identifier>
+ <type>int</type>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.1.1+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>deleteAll</name>
+ <version>1.1.1+</version>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>retentionCount</name>
+ <version>1.1.1+</version>
+ <type>int</type>
+ <defaultValue>2</defaultValue>
+ <description>
+ The total count of the artifact for each snapshot or the release/build output folder to be retained.
+ </description>
+ </field>
+ <field>
+ <name>daysOlder</name>
+ <version>1.1.1+</version>
+ <type>int</type>
+ <defaultValue>100</defaultValue>
+ <description>
+ The number of days old which will be the basis for removing a snapshot or a folder.
+ </description>
+ </field>
+ <field>
+ <name>enabled</name>
+ <version>1.1.1+</version>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>schedule</name>
+ <version>1.1.1+</version>
+ <association xml.reference="true" stash.part="true" jpox.dependent="false">
+ <type>Schedule</type>
+ </association>
+ </field>
+ <field>
+ <name>defaultPurge</name>
+ <version>1.1.1+</version>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ </field>
+ </fields>
+ </class>
+ <class>
+ <name>RepositoryPurgeConfiguration</name>
+ <version>1.1.1+</version>
+ <superClass>AbstractPurgeConfiguration</superClass>
+ <packageName>org.apache.continuum.xmlrpc.repository</packageName>
+ <fields>
+ <field>
+ <name>repository</name>
+ <version>1.1.1+</version>
+ <association xml.reference="true" stash.part="true" jpox.dependent="false">
+ <type>LocalRepository</type>
+ </association>
+ <required>true</required>
+ </field>
+ <field>
+ <name>deleteReleasedSnapshots</name>
+ <version>1.1.1+</version>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ <description>
+ True if the released snapshots are to be removed from the repo during repository purge.
+ </description>
+ </field>
+ </fields>
+ </class>
+ <class>
+ <name>DirectoryPurgeConfiguration</name>
+ <version>1.1.1+</version>
+ <superClass>AbstractPurgeConfiguration</superClass>
+ <packageName>org.apache.continuum.xmlrpc.repository</packageName>
+ <fields>
+ <field jpox.column="directoryLocation">
+ <name>location</name>
+ <version>1.1.1+</version>
+ <type>String</type>
+ <description>
+ The file system path for this directory
+ </description>
+ <required>true</required>
+ </field>
+ <field>
+ <name>directoryType</name>
+ <version>1.1.1+</version>
+ <type>String</type>
+ <description>
+ The type of directory. Valid values are "releases" and "buildOutput"
+ </description>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>ContinuumReleaseResult</name>
+ <version>1.1.1+</version>
+ <packageName>org.apache.continuum.xmlrpc.release</packageName>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.1.1+</version>
+ <identifier>true</identifier>
+ <type>int</type>
+ </field>
+ <field>
+ <name>startTime</name>
+ <version>1.1.1+</version>
+ <type>long</type>
+ </field>
+ <field>
+ <name>endTime</name>
+ <version>1.1.1+</version>
+ <type>long</type>
+ </field>
+ <field>
+ <name>resultCode</name>
+ <version>1.1.1+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>projectGroup</name>
+ <version>1.1.1+</version>
+ <association xml.reference="true" stash.part="true" jpox.dependent="false">
+ <type>ProjectGroup</type>
+ </association>
+ </field>
+ <field>
+ <name>project</name>
+ <version>1.1.1+</version>
+ <association xml.reference="true" stash.part="true" jpox.dependent="false">
+ <type>Project</type>
+ </association>
+ </field>
+ <field>
+ <name>releaseGoal</name>
+ <version>1.1.1+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
</classes>
</model>
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/pom.xml?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/pom.xml (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/pom.xml Tue Oct 28 21:16:12 2008
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>continuum-xmlrpc-backup</artifactId>
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/src/main/java/org/apache/maven/continuum/xmlrpc/backup/Backup.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/src/main/java/org/apache/maven/continuum/xmlrpc/backup/Backup.java?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/src/main/java/org/apache/maven/continuum/xmlrpc/backup/Backup.java (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-backup/src/main/java/org/apache/maven/continuum/xmlrpc/backup/Backup.java Tue Oct 28 21:16:12 2008
@@ -24,6 +24,10 @@
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
+import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
+import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
+import org.apache.continuum.xmlrpc.repository.LocalRepository;
+import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
import org.apache.maven.continuum.xmlrpc.client.ContinuumXmlRpcClient;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinitionTemplate;
@@ -149,6 +153,9 @@
backupAllProfiles();
backupAllBuildDefinitionTemplates();
backupAllProjectGroup();
+ backupAllLocalRepositories();
+ backupAllRepositoryPurgeConfigurations();
+ backupAllDirectoryPurgeConfigurations();
endTag( "continuumDatabase", true );
writer.close();
LOGGER.info( "Done." );
@@ -339,6 +346,7 @@
endTag( "notifiers", true );
}
+ backupContinuumReleaseResultsForProjectGroup( pg.getId() );
endTag( "projectGroup", true );
}
@@ -667,4 +675,132 @@
return fields;
}
+
+ private static void backupAllLocalRepositories()
+ throws Exception
+ {
+ LOGGER.info( "Backup local repositories" );
+ List<LocalRepository> repos = client.getAllLocalRepositories();
+ if ( repos != null && !repos.isEmpty() )
+ {
+ startTag( "localRepositories", true );
+ for ( LocalRepository repo : repos )
+ {
+ LOGGER.debug( "Backup local repository " + repo.getName() );
+ writeObject( repo, "localRepository", true );
+ }
+ endTag( "localRepositories", true );
+ }
+ }
+
+ private static void backupAllRepositoryPurgeConfigurations()
+ throws Exception
+ {
+ LOGGER.info( "Backup repository purge configurations" );
+ List<RepositoryPurgeConfiguration> purgeConfigs = client.getAllRepositoryPurgeConfigurations();
+ if ( purgeConfigs != null && !purgeConfigs.isEmpty() )
+ {
+ startTag( "repositoryPurgeConfigurations", true );
+ for ( RepositoryPurgeConfiguration purgeConfig : purgeConfigs )
+ {
+ LOGGER.debug( "Backup repository purge configuration" );
+ backupRepositoryPurgeConfiguration( purgeConfig );
+ }
+ endTag( "repositoryPurgeConfigurations", true );
+ }
+ }
+
+ private static void backupRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
+ throws Exception
+ {
+ if ( repoPurge == null )
+ {
+ return;
+ }
+ startTag( "repositoryPurgeConfiguration", true );
+ writeSimpleFields( repoPurge );
+
+ if ( repoPurge.getRepository() != null )
+ {
+ writeTagWithParameter( "repository", "id", String.valueOf( repoPurge.getRepository().getId() ) );
+ }
+
+ if ( repoPurge.getSchedule() != null )
+ {
+ writeTagWithParameter( "schedule", "id", String.valueOf( repoPurge.getSchedule().getId() ) );
+ }
+ endTag( "repositoryPurgeConfiguration", true );
+ }
+
+ private static void backupAllDirectoryPurgeConfigurations()
+ throws Exception
+ {
+ LOGGER.info( "Backup repository purge configurations" );
+ List<DirectoryPurgeConfiguration> purgeConfigs = client.getAllDirectoryPurgeConfigurations();
+ if ( purgeConfigs != null && !purgeConfigs.isEmpty() )
+ {
+ startTag( "directoryPurgeConfigurations", true );
+ for ( DirectoryPurgeConfiguration purgeConfig : purgeConfigs )
+ {
+ LOGGER.debug( "Backup directory purge configuration" );
+ backupDirectoryPurgeConfiguration( purgeConfig );
+ }
+ endTag( "directoryPurgeConfigurations", true );
+ }
+ }
+
+ private static void backupDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge )
+ throws Exception
+ {
+ if ( dirPurge == null )
+ {
+ return;
+ }
+ startTag( "directoryPurgeConfiguration", true);
+ writeSimpleFields( dirPurge );
+
+ if ( dirPurge.getSchedule() != null )
+ {
+ writeTagWithParameter( "schedule", "id", String.valueOf( dirPurge.getSchedule().getId() ) );
+ }
+ endTag( "directoryPurgeConfiguration", true );
+ }
+
+ private static void backupContinuumReleaseResultsForProjectGroup( int projectGroupId )
+ throws Exception
+ {
+ LOGGER.info( "Backup release results" );
+ List<ContinuumReleaseResult> results = client.getReleaseResultsForProjectGroup( projectGroupId );
+ if ( results != null && !results.isEmpty() )
+ {
+ startTag( "continuumReleaseResults", true );
+ for ( ContinuumReleaseResult result : results )
+ {
+ LOGGER.debug( "Backup release result" );
+ backupContinuumReleaseResult( result );
+ }
+ endTag( "continuumReleaseResults", true );
+ }
+ }
+
+ private static void backupContinuumReleaseResult( ContinuumReleaseResult result )
+ throws Exception
+ {
+ if ( result == null )
+ {
+ return;
+ }
+ startTag( "continuumReleaseResult", true );
+ writeSimpleFields( result );
+
+ if ( result.getProjectGroup() != null )
+ {
+ writeTagWithParameter( "projectGroup", "id", String.valueOf( result.getProjectGroup().getId() ) );
+ }
+ if ( result.getProject() != null )
+ {
+ writeTagWithParameter( "project", "id", String.valueOf( result.getProject().getId() ) );
+ }
+ endTag( "continuumReleaseResult", true );
+ }
}
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml Tue Oct 28 21:16:12 2008
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>continuum-xmlrpc-client</artifactId>
@@ -52,7 +52,7 @@
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath />
- <argument>org.apache.continuum.xmlrpc.client.SampleClient</argument>
+ <argument>org.apache.maven.continuum.xmlrpc.client.SampleClient</argument>
</arguments>
</configuration>
</plugin>
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java Tue Oct 28 21:16:12 2008
@@ -19,6 +19,10 @@
* under the License.
*/
+import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
+import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
+import org.apache.continuum.xmlrpc.repository.LocalRepository;
+import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
import org.apache.maven.continuum.xmlrpc.ContinuumService;
import org.apache.maven.continuum.xmlrpc.project.AddingResult;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
@@ -30,6 +34,7 @@
import org.apache.maven.continuum.xmlrpc.project.Project;
import org.apache.maven.continuum.xmlrpc.project.ProjectGroup;
import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
+import org.apache.maven.continuum.xmlrpc.project.ProjectNotifier;
import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
import org.apache.maven.continuum.xmlrpc.project.Schedule;
import org.apache.maven.continuum.xmlrpc.system.Installation;
@@ -43,6 +48,7 @@
import java.net.URL;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -266,6 +272,12 @@
return continuum.updateBuildDefinitionForProjectGroup( projectGroupId, buildDef );
}
+ public int removeBuildDefinitionFromProjectGroup( int projectGroupId, int buildDefinitionId )
+ throws Exception
+ {
+ return continuum.removeBuildDefinitionFromProjectGroup( projectGroupId, buildDefinitionId );
+ }
+
public BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDef )
throws Exception
{
@@ -516,5 +528,636 @@
{
return continuum.isProjectInBuildingQueue( projectId );
}
-
+
+ public int removeProjectsFromBuildingQueue( int[] projectsId )
+ throws Exception
+ {
+ return continuum.removeProjectsFromBuildingQueue( projectsId );
+ }
+
+ public boolean cancelCurrentBuild()
+ throws Exception
+ {
+ return continuum.cancelCurrentBuild();
+ }
+
+ // ----------------------------------------------------------------------
+ // Release Result
+ // ----------------------------------------------------------------------
+
+ public ContinuumReleaseResult getReleaseResult( int releaseId )
+ throws Exception
+ {
+ return continuum.getReleaseResult( releaseId );
+ }
+
+ public List<ContinuumReleaseResult> getReleaseResultsForProjectGroup( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getReleaseResultsForProjectGroup( projectGroupId );
+ }
+
+ public int removeReleaseResult( ContinuumReleaseResult releaseResult )
+ throws Exception
+ {
+ return continuum.removeReleaseResult( releaseResult );
+ }
+
+ public String getReleaseOutput( int releaseId )
+ throws Exception
+ {
+ return continuum.getReleaseOutput( releaseId );
+ }
+
+ // ----------------------------------------------------------------------
+ // Purge Configuration
+ // ----------------------------------------------------------------------
+
+ public RepositoryPurgeConfiguration addRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
+ throws Exception
+ {
+ return continuum.addRepositoryPurgeConfiguration( repoPurge );
+ }
+
+ public int updateRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
+ throws Exception
+ {
+ return continuum.updateRepositoryPurgeConfiguration( repoPurge );
+ }
+
+ public int removeRepositoryPurgeConfiguration( int repoPurgeId )
+ throws Exception
+ {
+ return continuum.removeRepositoryPurgeConfiguration( repoPurgeId );
+ }
+
+ public RepositoryPurgeConfiguration getRepositoryPurgeConfiguration( int repoPurgeId )
+ throws Exception
+ {
+ return continuum.getRepositoryPurgeConfiguration( repoPurgeId );
+ }
+
+ public List<RepositoryPurgeConfiguration> getAllRepositoryPurgeConfigurations()
+ throws Exception
+ {
+ return continuum.getAllRepositoryPurgeConfigurations();
+ }
+
+ public DirectoryPurgeConfiguration addDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge )
+ throws Exception
+ {
+ return continuum.addDirectoryPurgeConfiguration( dirPurge );
+ }
+
+ public int updateDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge )
+ throws Exception
+ {
+ return continuum.updateDirectoryPurgeConfiguration( dirPurge );
+ }
+
+ public int removeDirectoryPurgeConfiguration( int dirPurgeId )
+ throws Exception
+ {
+ return continuum.removeDirectoryPurgeConfiguration( dirPurgeId );
+ }
+
+ public DirectoryPurgeConfiguration getDirectoryPurgeConfiguration( int dirPurgeId )
+ throws Exception
+ {
+ return continuum.getDirectoryPurgeConfiguration( dirPurgeId );
+ }
+
+ public List<DirectoryPurgeConfiguration> getAllDirectoryPurgeConfigurations()
+ throws Exception
+ {
+ return continuum.getAllDirectoryPurgeConfigurations();
+ }
+
+ public void purgeLocalRepository( int repoPurgeId )
+ throws Exception
+ {
+ continuum.purgeLocalRepository( repoPurgeId );
+ }
+
+ public void purgeDirectory( int dirPurgeId )
+ throws Exception
+ {
+ continuum.purgeDirectory( dirPurgeId );
+ }
+
+ // ----------------------------------------------------------------------
+ // Local Repository
+ // ----------------------------------------------------------------------
+
+ public LocalRepository addLocalRepository( LocalRepository repository )
+ throws Exception
+ {
+ return continuum.addLocalRepository( repository );
+ }
+
+ public int updateLocalRepository( LocalRepository repository )
+ throws Exception
+ {
+ return continuum.updateLocalRepository( repository );
+ }
+
+ public int removeLocalRepository( int repositoryId )
+ throws Exception
+ {
+ return continuum.removeLocalRepository( repositoryId );
+ }
+
+ public LocalRepository getLocalRepository( int repositoryId )
+ throws Exception
+ {
+ return continuum.getLocalRepository( repositoryId );
+ }
+
+ public List<LocalRepository> getAllLocalRepositories()
+ throws Exception
+ {
+ return continuum.getAllLocalRepositories();
+ }
+
+ public Map<String, Object> addAntProjectRPC( Map<String, Object> project )
+ throws Exception
+ {
+ return continuum.addAntProjectRPC( project );
+ }
+
+ public Map<String, Object> addAntProjectRPC( Map<String, Object> project, int projectGroupId )
+ throws Exception
+ {
+ return continuum.addAntProjectRPC( project, projectGroupId );
+ }
+
+ public Map<String, Object> addBuildDefinitionToProjectGroupRPC( int projectGroupId,
+ Map<String, Object> buildDef )
+ throws Exception
+ {
+ return continuum.addBuildDefinitionToProjectGroupRPC( projectGroupId, buildDef );
+ }
+
+ public Map<String, Object> addBuildDefinitionToProjectRPC( int projectId,
+ Map<String, Object> buildDef )
+ throws Exception
+ {
+ return continuum.addBuildDefinitionToProjectRPC( projectId, buildDef );
+ }
+
+ public Map<String, Object> addMavenOneProjectRPC( String url )
+ throws Exception
+ {
+ return continuum.addMavenOneProjectRPC( url );
+ }
+
+ public Map<String, Object> addMavenOneProjectRPC( String url, int projectGroupId )
+ throws Exception
+ {
+ return continuum.addMavenOneProjectRPC( url, projectGroupId );
+ }
+
+ public Map<String, Object> addMavenTwoProjectRPC( String url )
+ throws Exception
+ {
+ return continuum.addMavenTwoProjectRPC( url );
+ }
+
+ public Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId )
+ throws Exception
+ {
+ return continuum.addMavenTwoProjectRPC( url, projectGroupId );
+ }
+
+ public Map<String, Object> addProjectGroupRPC( String groupName,
+ String groupId,
+ String description )
+ throws Exception
+ {
+ return continuum.addProjectGroupRPC( groupName, groupId, description );
+ }
+
+ public Map<String, Object> addScheduleRPC( Map<String, Object> schedule )
+ throws Exception
+ {
+ return continuum.addScheduleRPC( schedule );
+ }
+
+ public Map<String, Object> addShellProjectRPC( Map<String, Object> project, int projectGroupId )
+ throws Exception
+ {
+ return continuum.addShellProjectRPC( project, projectGroupId );
+ }
+
+ public Map<String, Object> addShellProjectRPC( Map<String, Object> project )
+ throws Exception
+ {
+ return continuum.addShellProjectRPC( project );
+ }
+
+ public List<Object> getAllProjectGroupsRPC()
+ throws Exception
+ {
+ return continuum.getAllProjectGroupsRPC();
+ }
+
+ public List<Object> getAllProjectGroupsWithAllDetailsRPC()
+ throws Exception
+ {
+ return continuum.getAllProjectGroupsWithAllDetailsRPC();
+ }
+
+ public List<Object> getBuildDefinitionTemplatesRPC()
+ throws Exception
+ {
+ return continuum.getBuildDefinitionTemplatesRPC();
+ }
+
+ public List<Object> getBuildDefinitionsForProjectGroupRPC( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getBuildDefinitionsForProjectGroupRPC( projectGroupId );
+ }
+
+ public List<Object> getBuildDefinitionsForProjectRPC( int projectId )
+ throws Exception
+ {
+ return continuum.getBuildDefinitionsForProjectRPC( projectId );
+ }
+
+ public Map<String, Object> getBuildResultRPC( int projectId, int buildId )
+ throws Exception
+ {
+ return continuum.getBuildResultRPC( projectId, buildId );
+ }
+
+ public List<Object> getBuildResultsForProjectRPC( int projectId )
+ throws Exception
+ {
+ return continuum.getBuildResultsForProjectRPC( projectId );
+ }
+
+ public Map<String, Object> getInstallationRPC( int installationId )
+ throws Exception
+ {
+ return continuum.getInstallationRPC( installationId );
+ }
+
+ public List<Object> getInstallationsRPC()
+ throws Exception
+ {
+ return continuum.getInstallationsRPC();
+ }
+
+ public Map<String, Object> getLatestBuildResultRPC( int projectId )
+ throws Exception
+ {
+ return continuum.getLatestBuildResultRPC( projectId );
+ }
+
+ public Map<String, Object> getProfileRPC( int profileId )
+ throws Exception
+ {
+ return continuum.getProfileRPC( profileId );
+ }
+
+ public List<Object> getProfilesRPC()
+ throws Exception
+ {
+ return continuum.getProfilesRPC();
+ }
+
+ public Map<String, Object> getProjectGroupSummaryRPC( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getProjectGroupSummaryRPC( projectGroupId );
+ }
+
+ public Map<String, Object> getProjectGroupWithProjectsRPC( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getProjectGroupWithProjectsRPC( projectGroupId );
+ }
+
+ public Map<String, Object> updateProjectGroupRPC( Map<String, Object> projectGroup )
+ throws Exception
+ {
+ return continuum.updateProjectGroupRPC( projectGroup );
+ }
+
+ public Map<String, Object> getProjectSummaryRPC( int projectId )
+ throws Exception
+ {
+ return continuum.getProjectSummaryRPC( projectId );
+ }
+
+ public Map<String, Object> getProjectWithAllDetailsRPC( int projectId )
+ throws Exception
+ {
+ return continuum.getProjectWithAllDetailsRPC( projectId );
+ }
+
+ public List<Object> getProjectsRPC( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getProjectsRPC( projectGroupId );
+ }
+
+ public Map<String, Object> getScheduleRPC( int scheduleId )
+ throws Exception
+ {
+ return continuum.getScheduleRPC( scheduleId );
+ }
+
+ public List<Object> getSchedulesRPC()
+ throws Exception
+ {
+ return continuum.getSchedulesRPC();
+ }
+
+ public Map<String, Object> getSystemConfigurationRPC()
+ throws Exception
+ {
+ return continuum.getSystemConfigurationRPC();
+ }
+
+ public int removeBuildResultRPC( Map<String, Object> br )
+ throws Exception
+ {
+ return continuum.removeBuildResultRPC( br );
+ }
+
+ public Map<String, Object> updateBuildDefinitionForProjectGroupRPC( int projectGroupId,
+ Map<String, Object> buildDef )
+ throws Exception
+ {
+ return continuum.updateBuildDefinitionForProjectGroupRPC( projectGroupId, buildDef );
+ }
+
+ public Map<String, Object> updateBuildDefinitionForProjectRPC( int projectId,
+ Map<String, Object> buildDef )
+ throws Exception
+ {
+ return continuum.updateBuildDefinitionForProjectRPC( projectId, buildDef );
+ }
+
+ public Map<String, Object> updateProjectRPC( Map<String, Object> project )
+ throws Exception
+ {
+ return continuum.updateProjectRPC( project );
+ }
+
+ public Map<String, Object> updateScheduleRPC( Map<String, Object> schedule )
+ throws Exception
+ {
+ return continuum.updateScheduleRPC( schedule );
+ }
+
+ public ProjectGroup getProjectGroup( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getProjectGroup( projectGroupId );
+ }
+
+ public Map<String, Object> getProjectGroupRPC( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getProjectGroupRPC( projectGroupId );
+ }
+
+ public ProjectNotifier getGroupNotifier( int projectgroupid, int notifierId )
+ throws Exception
+ {
+ return continuum.getGroupNotifier( projectgroupid, notifierId );
+ }
+
+ public Map<String, Object> getGroupNotifierRPC( int projectgroupid, int notifierId )
+ throws Exception
+ {
+ return continuum.getGroupNotifierRPC( projectgroupid, notifierId );
+ }
+
+ public ProjectNotifier getNotifier( int projectid, int notifierId )
+ throws Exception
+ {
+ return continuum.getNotifier( projectid, notifierId );
+ }
+
+ public Map<String, Object> getNotifierRPC( int projectid, int notifierId )
+ throws Exception
+ {
+ return continuum.getNotifierRPC( projectid, notifierId );
+ }
+
+ public ProjectNotifier updateGroupNotifier( int projectgroupid, ProjectNotifier newNotifier )
+ throws Exception
+ {
+ return continuum.updateGroupNotifier( projectgroupid, newNotifier );
+ }
+
+ public Map<String, Object> updateGroupNotifierRPC( int projectgroupid,
+ Map<String, Object> newNotifier )
+ throws Exception
+ {
+ return continuum.updateGroupNotifierRPC( projectgroupid, newNotifier );
+ }
+
+ public ProjectNotifier updateNotifier( int projectid, ProjectNotifier newNotifier )
+ throws Exception
+ {
+ return continuum.updateNotifier( projectid, newNotifier );
+ }
+
+ public Map<String, Object> updateNotifierRPC( int projectid, Map<String, Object> newNotifier )
+ throws Exception
+ {
+ return continuum.updateNotifierRPC( projectid, newNotifier );
+ }
+
+ public int removeGroupNotifier( int projectgroupid, int notifierId )
+ throws Exception
+ {
+ return continuum.removeGroupNotifier( projectgroupid, notifierId );
+ }
+
+ public int removeNotifier( int projectid, int notifierId )
+ throws Exception
+ {
+ return continuum.removeNotifier( projectid, notifierId );
+ }
+
+ public ProjectNotifier addGroupNotifier( int projectgroupid, ProjectNotifier newNotifier )
+ throws Exception
+ {
+ return continuum.addGroupNotifier( projectgroupid, newNotifier );
+ }
+
+ public Map<String, Object> addGroupNotifierRPC( int projectgroupid,
+ Map<String, Object> newNotifier )
+ throws Exception
+ {
+ return continuum.addGroupNotifierRPC( projectgroupid, newNotifier );
+ }
+
+ public ProjectNotifier addNotifier( int projectid, ProjectNotifier newNotifier )
+ throws Exception
+ {
+ return continuum.addNotifier( projectid, newNotifier );
+ }
+
+ public Map<String, Object> addNotifierRPC( int projectid, Map<String, Object> newNotifier )
+ throws Exception
+ {
+ return continuum.addNotifierRPC( projectid, newNotifier );
+ }
+
+ public Installation addInstallation( Installation installation )
+ throws Exception
+ {
+ return continuum.addInstallation( installation );
+ }
+
+ public Map<String, Object> addInstallationRPC( Map<String, Object> installation )
+ throws Exception
+ {
+ return continuum.addInstallationRPC( installation );
+ }
+
+ public Profile addProfile( Profile profile )
+ throws Exception
+ {
+ return continuum.addProfile( profile );
+ }
+
+ public Map<String, Object> addProfileRPC( Map<String, Object> profile )
+ throws Exception
+ {
+ return continuum.addProfileRPC( profile );
+ }
+
+ public int deleteInstallation( int installationId )
+ throws Exception
+ {
+ return continuum.deleteInstallation( installationId );
+ }
+
+ public int deleteProfile( int profileId )
+ throws Exception
+ {
+ return continuum.deleteProfile( profileId );
+ }
+
+ public int updateInstallation( Installation installation )
+ throws Exception
+ {
+ return continuum.updateInstallation( installation );
+ }
+
+ public int updateInstallationRPC( Map<String, Object> installation )
+ throws Exception
+ {
+ return continuum.updateInstallationRPC( installation );
+ }
+
+ public int updateProfile( Profile profile )
+ throws Exception
+ {
+ return continuum.updateProfile( profile );
+ }
+
+ public int updateProfileRPC( Map<String, Object> profile )
+ throws Exception
+ {
+ return continuum.updateProfileRPC( profile );
+ }
+
+ public Map<String, Object> getReleaseResultRPC( int releaseId )
+ throws Exception
+ {
+ return continuum.getReleaseResultRPC( releaseId );
+ }
+
+ public List<Object> getReleaseResultsForProjectGroupRPC( int projectGroupId )
+ throws Exception
+ {
+ return continuum.getReleaseResultsForProjectGroupRPC( projectGroupId );
+ }
+
+ public int removeReleaseResultRPC( Map<String, Object> rr )
+ throws Exception
+ {
+ return continuum.removeReleaseResultRPC( rr );
+ }
+
+ public Map<String, Object> addRepositoryPurgeConfigurationRPC( Map<String, Object> repoPurge )
+ throws Exception
+ {
+ return continuum.addRepositoryPurgeConfigurationRPC( repoPurge );
+ }
+
+ public int updateRepositoryPurgeConfigurationRPC( Map<String, Object> repoPurge )
+ throws Exception
+ {
+ return continuum.updateRepositoryPurgeConfigurationRPC( repoPurge );
+ }
+
+ public Map<String, Object> getRepositoryPurgeConfigurationRPC( int repoPurgeId )
+ throws Exception
+ {
+ return continuum.getRepositoryPurgeConfigurationRPC( repoPurgeId );
+ }
+
+ public List<Object> getAllRepositoryPurgeConfigurationsRPC()
+ throws Exception
+ {
+ return continuum.getAllRepositoryPurgeConfigurationsRPC();
+ }
+
+ public Map<String, Object> addDirectoryPurgeConfigurationRPC( Map<String, Object> dirPurge )
+ throws Exception
+ {
+ return continuum.addDirectoryPurgeConfigurationRPC( dirPurge );
+ }
+
+ public int updateDirectoryPurgeConfigurationRPC( Map<String, Object> dirPurge )
+ throws Exception
+ {
+ return continuum.updateDirectoryPurgeConfigurationRPC( dirPurge );
+ }
+
+ public Map<String, Object> getDirectoryPurgeConfigurationRPC( int dirPurgeId )
+ throws Exception
+ {
+ return continuum.getDirectoryPurgeConfigurationRPC( dirPurgeId );
+ }
+
+ public List<Object> getAllDirectoryPurgeConfigurationsRPC()
+ throws Exception
+ {
+ return continuum.getAllDirectoryPurgeConfigurationsRPC();
+ }
+
+ public Map<String, Object> addLocalRepositoryRPC( Map<String, Object> repository )
+ throws Exception
+ {
+ return continuum.addLocalRepositoryRPC( repository );
+ }
+
+ public int updateLocalRepositoryRPC( Map<String, Object> repository )
+ throws Exception
+ {
+ return continuum.updateLocalRepositoryRPC( repository );
+ }
+
+ public Map<String, Object> getLocalRepositoryRPC( int repositoryId )
+ throws Exception
+ {
+ return continuum.getLocalRepositoryRPC( repositoryId );
+ }
+
+ public List<Object> getAllLocalRepositoriesRPC()
+ throws Exception
+ {
+ return continuum.getAllLocalRepositoriesRPC();
+ }
}
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java Tue Oct 28 21:16:12 2008
@@ -19,6 +19,9 @@
* under the License.
*/
+import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
+import org.apache.continuum.xmlrpc.repository.LocalRepository;
+import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
import org.apache.maven.continuum.xmlrpc.project.AddingResult;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
import org.apache.maven.continuum.xmlrpc.project.BuildResult;
@@ -60,10 +63,7 @@
{
ProjectGroupSummary pg = (ProjectGroupSummary) i.next();
projectGroupId = pg.getId();
- System.out.println( "Id: " + pg.getId() );
- System.out.println( "Group Id" + pg.getGroupId() );
- System.out.println( "Name: " + pg.getName() );
- System.out.println( "Description:" + pg.getDescription() );
+ printProjectGroupSummary( client.getProjectGroupSummary( projectGroupId ) );
}
System.out.println();
@@ -170,6 +170,70 @@
"Removing Project Group '" + pg.getName() + "' - " + pg.getGroupId() + " (" + pg.getId() + ")'..." );
client.removeProjectGroup( pg.getId() );
System.out.println( "Done." );
+ System.out.println();
+
+ LocalRepository repository = new LocalRepository();
+ repository.setLocation( "/home/marica/repository" );
+ repository.setName( "Repository" );
+ repository.setLayout( "default" );
+ System.out.println( "Adding local repository..." );
+ repository = client.addLocalRepository( repository );
+ System.out.println();
+
+ System.out.println( "Repository list" );
+ System.out.println( "=====================" );
+ List<LocalRepository> repositories = client.getAllLocalRepositories();
+ for ( LocalRepository repo : repositories )
+ {
+ printLocalRepository( repo );
+ System.out.println();
+ }
+
+ DirectoryPurgeConfiguration dirPurgeConfig = new DirectoryPurgeConfiguration();
+ dirPurgeConfig.setDirectoryType( "buildOutput" );
+ System.out.println( "Adding Directory Purge Configuration..." );
+ dirPurgeConfig = client.addDirectoryPurgeConfiguration( dirPurgeConfig );
+ System.out.println();
+
+ RepositoryPurgeConfiguration purgeConfig = new RepositoryPurgeConfiguration();
+ purgeConfig.setDeleteAll( true );
+ purgeConfig.setRepository( repository );
+ purgeConfig.setDescription( "Delete all artifacts from repository" );
+ System.out.println( "Adding Repository Purge Configuration..." );
+ purgeConfig = client.addRepositoryPurgeConfiguration( purgeConfig );
+ System.out.println();
+
+ System.out.println( "Repository Purge list" );
+ System.out.println( "=====================" );
+ List<RepositoryPurgeConfiguration> repoPurges = client.getAllRepositoryPurgeConfigurations();
+ for ( RepositoryPurgeConfiguration repoPurge : repoPurges )
+ {
+ printRepositoryPurgeConfiguration( repoPurge );
+ }
+ System.out.println();
+
+ System.out.println( "Remove local repository" );
+ System.out.println( "=====================" );
+ System.out.println( "Removing Local Repository '" + repository.getName() + "' (" +
+ repository.getId() + ")..." );
+ client.removeLocalRepository( repository.getId() );
+ System.out.println( "Done." );
+ }
+
+ public static void printProjectGroupSummary( ProjectGroupSummary pg )
+ {
+ System.out.println( "Id: " + pg.getId() );
+ System.out.println( "Group Id" + pg.getGroupId() );
+ System.out.println( "Name: " + pg.getName() );
+ System.out.println( "Description:" + pg.getDescription() );
+ if ( pg.getLocalRepository() != null )
+ {
+ System.out.println( "Local Repository:" + pg.getLocalRepository().getName() );
+ }
+ else
+ {
+ System.out.println( "Local Repository:" );
+ }
}
public static void printProjectSummary( ProjectSummary project )
@@ -262,4 +326,23 @@
System.out.println( buildDef.isDefaultForProject() );
}
+ public static void printLocalRepository( LocalRepository repo )
+ {
+ System.out.println( "Id: " +repo.getId() );
+ System.out.println( "Layout: " + repo.getLayout() );
+ System.out.println( "Location: " + repo.getLocation() );
+ System.out.println( "Name: " + repo.getName() );
+ }
+
+ public static void printRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
+ {
+ System.out.println( "Id: " + repoPurge.getId() );
+ System.out.println( "Description: " + repoPurge.getDescription() );
+ System.out.println( "Local Repository: " + repoPurge.getRepository().getName() );
+ System.out.println( "Days Older: " + repoPurge.getDaysOlder() );
+ System.out.println( "Retention Count: " + repoPurge.getRetentionCount() );
+ System.out.println( "Delete All: " + repoPurge.isDeleteAll() );
+ System.out.println( "Delete Released Snapshots: " + repoPurge.isDeleteReleasedSnapshots() );
+ System.out.println( "Default Purge: " + repoPurge.isDefaultPurge() );
+ }
}
Modified: continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml?rev=708765&r1=708764&r2=708765&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml (original)
+++ continuum/branches/continuum-transient-state/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml Tue Oct 28 21:16:12 2008
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>continuum-xmlrpc-server</artifactId>