archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r981136 - in /archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main: java/org/apache/maven/archiva/web/action/ webapp/WEB-INF/jsp/
Date Sun, 01 Aug 2010 04:03:01 GMT
Author: oching
Date: Sun Aug  1 04:03:00 2010
New Revision: 981136

URL: http://svn.apache.org/viewvc?rev=981136&view=rev
Log:
[MRM-980] fixed variable names in action and label/messages in jsp 

Modified:
    archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java
    archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeAction.jsp
    archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeActionResults.jsp
    archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeExcludeConflicts.jsp

Modified: archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java?rev=981136&r1=981135&r2=981136&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java
(original)
+++ archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/MergeAction.java
Sun Aug  1 04:03:00 2010
@@ -64,7 +64,7 @@ public class MergeAction
 
     private String repoid;
 
-    private String targetRepoId;
+    private String sourceRepoId;
 
     private final String action = "merge";
 
@@ -78,9 +78,9 @@ public class MergeAction
 
     public String getConflicts()
     {
-        targetRepoId = repoid + "-stage";
+        sourceRepoId = repoid + "-stage";
         Configuration config = configuration.getConfiguration();
-        ManagedRepositoryConfiguration targetRepoConfig = config.findManagedRepositoryById(
targetRepoId );
+        ManagedRepositoryConfiguration targetRepoConfig = config.findManagedRepositoryById(
sourceRepoId );
 
         if ( targetRepoConfig != null )
         {
@@ -98,18 +98,22 @@ public class MergeAction
     {
         try
         {
-            List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts(
targetRepoId );
-            repositoryMerger.merge( targetRepoId, repoid );
-            triggerAuditEvent( targetRepoId, "file-eshan", AuditEvent.MERGING_REPOSITORIES
);
+            List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts(
sourceRepoId );
+            repositoryMerger.merge( sourceRepoId, repoid );
+            triggerAuditEvent( sourceRepoId, "file-eshan", AuditEvent.MERGING_REPOSITORIES
);
 
             for ( ArtifactMetadata metadata : sourceArtifacts )
             {
                 triggerAuditEvent( repoid, metadata.getId(), AuditEvent.MERGING_REPOSITORIES
);
             }
+
+            addActionMessage( "Repository '" + sourceRepoId + "' successfully merged to '"
+ repoid + "'." );
+            
             return SUCCESS;
         }
         catch ( Exception ex )
         {
+            addActionError( "Error occurred while merging the repositories." );
             return ERROR;
         }
     }
@@ -118,21 +122,24 @@ public class MergeAction
     {
         try
         {
-            List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts(
targetRepoId );
+            List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts(
sourceRepoId );
             sourceArtifacts.removeAll( conflictSourceArtifacts );
             Filter<ArtifactMetadata> artifactsWithOutConflicts =
                 new IncludesFilter<ArtifactMetadata>( sourceArtifacts );
-            repositoryMerger.merge( targetRepoId, repoid, artifactsWithOutConflicts );
+            repositoryMerger.merge( sourceRepoId, repoid, artifactsWithOutConflicts );
 
             for ( ArtifactMetadata metadata : sourceArtifacts )
             {
                 triggerAuditEvent( repoid, metadata.getId(), AuditEvent.MERGING_REPOSITORIES
);
             }
-            return SUCCESS;
 
+            addActionMessage( "Repository '" + sourceRepoId + "' successfully merged to '"
+ repoid + "'." );
+
+            return SUCCESS;
         }
         catch ( Exception ex )
         {
+            addActionError( "Error occurred while merging the repositories." );
             return ERROR;
         }
     }
@@ -140,16 +147,19 @@ public class MergeAction
     public String mergeWithOutConlficts()
     {
 
-        targetRepoId = repoid + "-stage";
+        sourceRepoId = repoid + "-stage";
 
         try
         {
-            conflictSourceArtifacts = repositoryMerger.getConflictsartifacts( targetRepoId,
repoid );
+            conflictSourceArtifacts = repositoryMerger.getConflictsartifacts( sourceRepoId,
repoid );
         }
         catch ( Exception e )
         {
+            addActionError( "Error occurred while merging the repositories." );
             return ERROR;
         }
+
+        addActionMessage( "Repository '" + sourceRepoId + "' successfully merged to '" +
repoid + "'." );
         
         return SUCCESS;
     }
@@ -167,20 +177,20 @@ public class MergeAction
     public void prepare()
         throws Exception
     {
-        targetRepoId = repoid + "-stage";
-        conflictSourceArtifacts = repositoryMerger.getConflictsartifacts( targetRepoId, repoid
);
+        sourceRepoId = repoid + "-stage";
+        conflictSourceArtifacts = repositoryMerger.getConflictsartifacts( sourceRepoId, repoid
);
         this.repository = new ManagedRepositoryConfiguration();
         setConflictSourceArtifactsToBeDisplayed( conflictSourceArtifacts );
     }
 
-    public String getTargetRepoId()
+    public String getSourceRepoId()
     {
-        return targetRepoId;
+        return sourceRepoId;
     }
 
-    public void setTargetRepoId( String targetRepoId )
+    public void setSourceRepoId( String sourceRepoId )
     {
-        this.targetRepoId = targetRepoId;
+        this.sourceRepoId = sourceRepoId;
     }
 
     public String getRepoid()
@@ -212,7 +222,7 @@ public class MergeAction
         throws Exception
     {
         this.conflictSourceArtifactsToBeDisplayed = new ArrayList<ArtifactMetadata>();
-       HashMap<String, ArtifactMetadata> map = new HashMap<String, ArtifactMetadata>();
+        HashMap<String, ArtifactMetadata> map = new HashMap<String, ArtifactMetadata>();
         for ( ArtifactMetadata metadata : conflictSourceArtifacts )
         {
                 String metadataId = metadata.getNamespace() + metadata.getProject() + metadata.getProjectVersion()
+ metadata.getVersion();
@@ -224,7 +234,6 @@ public class MergeAction
         {
             conflictSourceArtifactsToBeDisplayed.add( map.get(iterator.next() ));
         }
-
     }
 }
 

Modified: archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeAction.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeAction.jsp?rev=981136&r1=981135&r2=981136&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeAction.jsp
(original)
+++ archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeAction.jsp
Sun Aug  1 04:03:00 2010
@@ -25,12 +25,12 @@
 
 <html>
 <head>
-  <title>Merge Repositories</title>
+  <title>Admin: Merge Staging Repository</title>
   <s:head/>
 </head>
 
 <body>
-<h1>Merge Repositories</h1>
+<h1>Admin: Merge Staging Repository</h1>
 
 <div id="contentArea">
 

Modified: archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeActionResults.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeActionResults.jsp?rev=981136&r1=981135&r2=981136&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeActionResults.jsp
(original)
+++ archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeActionResults.jsp
Sun Aug  1 04:03:00 2010
@@ -25,18 +25,17 @@
 
 <html>
 <head>
-  <title>Merge Repositories</title>
+  <title>Admin: Merge Staging Repository</title>
   <s:head/>
 </head>
 
 <body>
-<h1>Merge Repositories</h1>
+<h1>Admin: Merge Staging Repository</h1>
 
 <div id="contentArea">
 
   <s:actionerror/>
   <s:actionmessage/>
-  <h1>successfully done the merging</h1>
 </div>
 
 </body>

Modified: archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeExcludeConflicts.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeExcludeConflicts.jsp?rev=981136&r1=981135&r2=981136&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeExcludeConflicts.jsp
(original)
+++ archiva/branches/archiva-MRM-980/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/mergeExcludeConflicts.jsp
Sun Aug  1 04:03:00 2010
@@ -44,7 +44,7 @@
         <s:form method="post" action="merge" namespace="/admin" validate="false" theme="simple">
           <s:hidden name="repoid"/>
           <div class="buttons">
-            <s:submit value="MergeAll" method="doMerge"/>
+            <s:submit value="Merge All" method="doMerge"/>
           </div>
         </s:form>
       </c:when>



Mime
View raw message