archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1163913 - in /archiva/trunk/archiva-modules/archiva-web/archiva-rest: archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ archiva-rest-services/src/main/java/org/apache/archiva/rest/services/
Date Thu, 01 Sep 2011 06:02:31 GMT
Author: olamy
Date: Thu Sep  1 06:02:30 2011
New Revision: 1163913

URL: http://svn.apache.org/viewvc?rev=1163913&view=rev
Log:
fix updateManagedRepo in rest service

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ManagedRepository.java
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ManagedRepository.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ManagedRepository.java?rev=1163913&r1=1163912&r2=1163913&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ManagedRepository.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/ManagedRepository.java
Thu Sep  1 06:02:30 2011
@@ -47,6 +47,8 @@ public class ManagedRepository
 
     private String cronExpression;
 
+    private boolean resetStats;
+
     public ManagedRepository()
     {
         // no op
@@ -160,6 +162,15 @@ public class ManagedRepository
         this.stageRepoNeeded = stageRepoNeeded;
     }
 
+    public boolean isResetStats()
+    {
+        return resetStats;
+    }
+
+    public void setResetStats( boolean resetStats )
+    {
+        this.resetStats = resetStats;
+    }
 
     public int hashCode()
     {
@@ -189,9 +200,19 @@ public class ManagedRepository
     @Override
     public String toString()
     {
-        return "ManagedRepository{" + "id='" + id + '\'' + ", name='" + name + '\'' + ",
location='" + location + '\''
-            + ", layout='" + layout + '\'' + ", snapshots=" + snapshots + ", releases=" +
releases
-            + ", blockRedeployments=" + blockRedeployments + ", cronExpression='" + cronExpression
+ '\''
-            + ", stageRepoNeeded=" + stageRepoNeeded + '}';
+        final StringBuilder sb = new StringBuilder();
+        sb.append( "ManagedRepository" );
+        sb.append( "{id='" ).append( id ).append( '\'' );
+        sb.append( ", name='" ).append( name ).append( '\'' );
+        sb.append( ", location='" ).append( location ).append( '\'' );
+        sb.append( ", layout='" ).append( layout ).append( '\'' );
+        sb.append( ", snapshots=" ).append( snapshots );
+        sb.append( ", releases=" ).append( releases );
+        sb.append( ", blockRedeployments=" ).append( blockRedeployments );
+        sb.append( ", stageRepoNeeded=" ).append( stageRepoNeeded );
+        sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
+        sb.append( ", resetStats=" ).append( resetStats );
+        sb.append( '}' );
+        return sb.toString();
     }
 }
\ No newline at end of file

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java?rev=1163913&r1=1163912&r2=1163913&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
Thu Sep  1 06:02:30 2011
@@ -194,7 +194,7 @@ public class DefaultRepositoriesService
         repo.setReleases( managedRepository.isReleases() );
         repo.setSnapshots( managedRepository.isSnapshots() );
         return managedRepositoryAdmin.updateManagedRepository( repo, managedRepository.isStageRepoNeeded(),
-                                                               getAuditInformation() );
+                                                               getAuditInformation(), managedRepository.isResetStats()
);
     }
 
 



Mime
View raw message