archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r755266 [2/2] - in /archiva/trunk/archiva-modules: archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/ archiva-database/src/main/java/org/apache/maven/archiva/database/ archiva-database...
Date Tue, 17 Mar 2009 14:28:41 GMT
Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java?rev=755266&r1=755265&r2=755266&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java
Tue Mar 17 14:28:40 2009
@@ -34,26 +34,27 @@
 import org.apache.archiva.indexer.search.SearchResults;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.maven.archiva.common.utils.VersionUtil;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.database.ArchivaDAO;
 import org.apache.maven.archiva.database.ArtifactDAO;
 import org.apache.maven.archiva.database.Constraint;
 import org.apache.maven.archiva.database.constraints.ArtifactsByChecksumConstraint;
+import org.apache.maven.archiva.database.constraints.UniqueVersionConstraint;
+import org.apache.maven.archiva.model.ArchivaArtifact;
 import org.apache.maven.archiva.security.AccessDeniedException;
 import org.apache.maven.archiva.security.ArchivaSecurityException;
 import org.apache.maven.archiva.security.ArchivaXworkUser;
 import org.apache.maven.archiva.security.PrincipalNotFoundException;
 import org.apache.maven.archiva.security.UserRepositories;
-
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.Preparable;
-import org.apache.maven.archiva.common.utils.VersionUtil;
-import org.apache.maven.archiva.database.constraints.UniqueVersionConstraint;
 import org.apache.struts2.ServletActionContext;
 import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.Preparable;
+
 /**
  * Search all indexed fields by the given criteria.
  *
@@ -69,8 +70,6 @@
 
     private ArchivaConfiguration archivaConfiguration;
 
-    private Map<String, ManagedRepositoryConfiguration> managedRepositories;
-
     private String q;
 
     /**
@@ -97,7 +96,7 @@
 
     private static final String ARTIFACT = "artifact";
 
-    private List databaseResults;
+    private List<ArchivaArtifact> databaseResults;
     
     private int currentPage = 0;
     
@@ -262,6 +261,7 @@
         return SUCCESS;
     }
 
+    @SuppressWarnings("unchecked")
     public String quickSearch()
         throws MalformedURLException
     {
@@ -335,8 +335,8 @@
         for ( SearchResultHit resultHit : results.getHits() )
         {
             final List<String> versions =
-                dao.query( new UniqueVersionConstraint( getObservableRepos(), resultHit.getGroupId(),
-                                                        resultHit.getArtifactId() ) );
+                (List<String>) dao.query( new UniqueVersionConstraint( getObservableRepos(),
resultHit.getGroupId(),
+                                                    resultHit.getArtifactId() ) );
             if ( versions != null && !versions.isEmpty() )
             {
                 resultHit.setVersion( null );
@@ -400,6 +400,7 @@
         return INPUT;
     }
 
+    @SuppressWarnings("unchecked")
     private String getPrincipal()
     {
         return archivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession()
);
@@ -481,7 +482,7 @@
         return results;
     }
 
-    public List getDatabaseResults()
+    public List<ArchivaArtifact> getDatabaseResults()
     {
         return databaseResults;
     }
@@ -543,7 +544,6 @@
 
     public void setManagedRepositories( Map<String, ManagedRepositoryConfiguration>
managedRepositories )
     {
-        this.managedRepositories = managedRepositories;
     }
 
     public String getGroupId()

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java?rev=755266&r1=755265&r2=755266&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java
Tue Mar 17 14:28:40 2009
@@ -94,6 +94,7 @@
         return bundle;
     }
 
+    @SuppressWarnings("unchecked")
     public void prepare()
     {
         Configuration config = archivaConfiguration.getConfiguration();
@@ -109,7 +110,7 @@
         for ( ManagedRepositoryConfiguration repo : managedRepositories )
         {
             List<RepositoryContentStatistics> results =
-                dao.query( new MostRecentRepositoryScanStatistics( repo.getId() ) );
+                (List<RepositoryContentStatistics>) dao.query( new MostRecentRepositoryScanStatistics(
repo.getId() ) );
             if ( !results.isEmpty() )
             {
                 repositoryStatistics.put( repo.getId(), results.get( 0 ) );

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java?rev=755266&r1=755265&r2=755266&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java
Tue Mar 17 14:28:40 2009
@@ -152,12 +152,13 @@
     
     private InputStream inputStream;
     
+    @SuppressWarnings("unchecked")
     public void prepare()
     {
         repositoryIds = new ArrayList<String>();
         repositoryIds.add( ALL_REPOSITORIES ); // comes first to be first in the list
-        repositoryIds.addAll(
-            dao.query( new UniqueFieldConstraint( RepositoryProblem.class.getName(), "repositoryId"
) ) );
+        repositoryIds.addAll( (List<String>) dao.query( new UniqueFieldConstraint(
RepositoryProblem.class.getName(),
+                                                                                   "repositoryId"
) ) );
         
         availableRepositories = new ArrayList<String>();
      
@@ -449,7 +450,7 @@
         {   
             try
             {                
-                List contentStats = repoContentStatsDao.queryRepositoryContentStatistics(

+                List<RepositoryContentStatistics> contentStats = repoContentStatsDao.queryRepositoryContentStatistics(

                          new RepositoryContentStatisticsByRepositoryConstraint( repo, startDateInDF,
endDateInDF ) );
 
                 if ( contentStats == null || contentStats.isEmpty() )



Mime
View raw message