archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r702347 [3/4] - in /archiva/branches/MRM-124: ./ archiva-docs/src/site/apt/userguide/ archiva-jetty/ archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/ archiva-modules/archiva-base/archiva-consumers/archiva-core-consumer...
Date Tue, 07 Oct 2008 05:12:37 GMT
Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java Mon Oct  6 22:12:33 2008
@@ -1,5 +1,5 @@
 package org.apache.maven.archiva.web.action;
-
+	
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -23,10 +23,12 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
-import com.opensymphony.xwork.ActionContext;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
+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.Constraint;
 import org.apache.maven.archiva.database.constraints.ArtifactsByChecksumConstraint;
@@ -42,6 +44,9 @@
 import org.apache.maven.archiva.security.UserRepositories;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
+import com.opensymphony.xwork.ActionContext;
+import com.opensymphony.xwork.Preparable;
+
 /**
  * Search all indexed fields by the given criteria.
  *
@@ -49,10 +54,16 @@
  */
 public class SearchAction
     extends PlexusActionSupport
-{           
+    implements Preparable
+{
     /**
      * Query string.
      */
+
+    private ArchivaConfiguration archivaConfiguration;
+
+    private Map<String, ManagedRepositoryConfiguration> managedRepositories;
+
     private String q;
 
     /**
@@ -75,6 +86,11 @@
      */
     private UserRepositories userRepositories;
     
+    /**
+     * @plexus.requirement
+     */
+    private ArchivaXworkUser archivaXworkUser;
+    
     private static final String RESULTS = "results";
 
     private static final String ARTIFACT = "artifact";
@@ -85,27 +101,132 @@
     
     private int totalPages;
     
-    private boolean searchResultsOnly; 
+    private boolean searchResultsOnly;
     
     private String completeQueryString;
     
     private static final String COMPLETE_QUERY_STRING_SEPARATOR = ";";
-    
+
     private static final String BYTECODE_KEYWORD = "bytecode:";
 
+    private List<String> managedRepositoryList;
+
+    private String groupId;
+
+    private String artifactId;
+
+    private String version;
+
+    private String className;
+
+    private int rowCount = 30;
+
+    private String repositoryId;
+
+    private boolean fromFilterSearch;
+
+    private boolean filterSearch = false;
+
+    private boolean fromResultsPage;
+
+    private int num;
+
+    public boolean isFromResultsPage()
+    {
+        return fromResultsPage;
+    }
+
+    public void setFromResultsPage( boolean fromResultsPage )
+    {
+        this.fromResultsPage = fromResultsPage;
+    }
+
+    public boolean isFromFilterSearch()
+    {
+        return fromFilterSearch;
+    }
+
+    public void setFromFilterSearch( boolean fromFilterSearch )
+    {
+        this.fromFilterSearch = fromFilterSearch;
+    }
+
+    public void prepare()
+    {
+        managedRepositoryList = new ArrayList<String>();
+        managedRepositoryList = getObservableRepos();
+
+        if ( managedRepositoryList.size() > 0 )
+        {
+            managedRepositoryList.add( "all" );
+        }
+    }
+
+    // advanced search MRM-90 -- filtered search
+    public String filteredSearch()
+        throws MalformedURLException, RepositoryIndexException, RepositoryIndexSearchException
+    {
+        fromFilterSearch = true;
+
+        if ( CollectionUtils.isEmpty( managedRepositoryList ) )
+        {
+            return GlobalResults.ACCESS_TO_NO_REPOS;
+        }
+
+        SearchResultLimits limits = new SearchResultLimits( currentPage );
+
+        limits.setPageSize( rowCount );
+        List<String> selectedRepos = new ArrayList<String>();
+
+        if ( repositoryId.equals( "all" ) )
+        {
+            selectedRepos = getObservableRepos();
+        }
+        else
+        {
+            selectedRepos.add( repositoryId );
+        }
+
+        if ( CollectionUtils.isEmpty( selectedRepos ) )
+        {
+            return GlobalResults.ACCESS_TO_NO_REPOS;
+        }
+
+        results =
+            crossRepoSearch.executeFilteredSearch( getPrincipal(), selectedRepos, groupId, artifactId, version,
+                                                   className, limits );
+
+        if ( results.isEmpty() )
+        {
+            addActionError( "No results found" );
+            return INPUT;
+        }
+
+        totalPages = results.getTotalHits() / limits.getPageSize();
+
+        if ( ( results.getTotalHits() % limits.getPageSize() ) != 0 )
+        {
+            totalPages = totalPages + 1;
+        }
+
+        return SUCCESS;
+    }
+
     public String quickSearch()
         throws MalformedURLException, RepositoryIndexException, RepositoryIndexSearchException
     {
         /* TODO: give action message if indexing is in progress.
          * This should be based off a count of 'unprocessed' artifacts.
-         * This (yet to be written) routine could tell the user that X (unprocessed) artifacts are not yet 
+         * This (yet to be written) routine could tell the user that X (unprocessed) artifacts are not yet
          * present in the full text search.
          */
 
         assert q != null && q.length() != 0;
-        
+
+        fromFilterSearch = false;
+
         SearchResultLimits limits = new SearchResultLimits( currentPage );
-        
+
         List<String> selectedRepos = getObservableRepos();
         if ( CollectionUtils.isEmpty( selectedRepos ) )
         {
@@ -113,13 +234,13 @@
         }
 
         if( isBytecodeSearch( q ) )
-        {   
+        {
             results = crossRepoSearch.searchForBytecode( getPrincipal(), selectedRepos, removeKeyword( q ), limits );
         }
         else
         {
             if( searchResultsOnly && !completeQueryString.equals( "" ) )
-            { 
+            {
                 results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits, parseCompleteQueryString() );
             }
             else
@@ -128,33 +249,33 @@
                 results = crossRepoSearch.searchForTerm( getPrincipal(), selectedRepos, q, limits );
             }
         }
-        
+
         if ( results.isEmpty() )
         {
             addActionError( "No results found" );
             return INPUT;
         }
-        
+
         totalPages = results.getTotalHits() / limits.getPageSize();
-        
+
         if( (results.getTotalHits() % limits.getPageSize()) != 0 )
         {
             totalPages = totalPages + 1;
         }
         // TODO: filter / combine the artifacts by version? (is that even possible with non-artifact hits?)
 
-        /* I don't think that we should, as I expect us to utilize the 'score' system in lucene in 
+        /* I don't think that we should, as I expect us to utilize the 'score' system in lucene in
          * the future to return relevant links better.
          * I expect the lucene scoring system to take multiple hits on different areas of a single document
-         * to result in a higher score. 
+         * to result in a higher score.
          *   - Joakim
          */
-        
+
         if( !isEqualToPreviousSearchTerm( q ) )
         {
             buildCompleteQueryString( q );
         }
-        
+
         return SUCCESS;
     }
 
@@ -180,10 +301,10 @@
 
         if ( databaseResults.size() == 1 )
         {
-            // 1 hit? return it's information directly!            
+            // 1 hit? return it's information directly!
             return ARTIFACT;
         }
-        
+
         return RESULTS;
     }
 
@@ -192,12 +313,12 @@
     {
         return INPUT;
     }
-    
+
     private String getPrincipal()
     {
-        return ArchivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
+        return archivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
     }
-    
+
     private List<String> getObservableRepos()
     {
         try
@@ -222,44 +343,44 @@
 
     private void buildCompleteQueryString( String searchTerm )
     {
-        if( searchTerm.indexOf( COMPLETE_QUERY_STRING_SEPARATOR ) != -1 )
+        if ( searchTerm.indexOf( COMPLETE_QUERY_STRING_SEPARATOR ) != -1 )
         {
             searchTerm = StringUtils.remove( searchTerm, COMPLETE_QUERY_STRING_SEPARATOR );
         }
-        
-        if( completeQueryString == null || "".equals( completeQueryString ) )
+
+        if ( completeQueryString == null || "".equals( completeQueryString ) )
         {
             completeQueryString = searchTerm;
         }
         else
-        {            
+        {
             completeQueryString = completeQueryString + COMPLETE_QUERY_STRING_SEPARATOR + searchTerm;
         }
     }
-    
+
     private List<String> parseCompleteQueryString()
     {
-        List<String> parsedCompleteQueryString = new ArrayList<String>();        
+        List<String> parsedCompleteQueryString = new ArrayList<String>();
         String[] parsed = StringUtils.split( completeQueryString, COMPLETE_QUERY_STRING_SEPARATOR );
         CollectionUtils.addAll( parsedCompleteQueryString, parsed );
-        
+
         return parsedCompleteQueryString;
     }
-    
+
     private boolean isEqualToPreviousSearchTerm( String searchTerm )
     {
-        if( !"".equals( completeQueryString ) )
+        if ( !"".equals( completeQueryString ) )
         {
             String[] parsed = StringUtils.split( completeQueryString, COMPLETE_QUERY_STRING_SEPARATOR );
-            if( StringUtils.equalsIgnoreCase( searchTerm, parsed[ parsed.length - 1 ] ) )
+            if ( StringUtils.equalsIgnoreCase( searchTerm, parsed[parsed.length - 1] ) )
             {
                 return true;
             }
         }
-        
+
         return false;
     }
-    
+
     public String getQ()
     {
         return q;
@@ -279,12 +400,12 @@
     {
         return databaseResults;
     }
-    
+
     public void setCurrentPage( int page )
     {
         this.currentPage = page;
     }
-    
+
     public int getCurrentPage()
     {
         return currentPage;
@@ -318,23 +439,123 @@
     public void setCompleteQueryString( String completeQueryString )
     {
         this.completeQueryString = completeQueryString;
-    }    
-    
+    }
+
     private boolean isBytecodeSearch( String queryString )
     {
-        if( queryString.startsWith( BYTECODE_KEYWORD ) )
+        if ( queryString.startsWith( BYTECODE_KEYWORD ) )
         {
-            return true;            
+            return true;
         }
-        
+
         return false;
     }
-    
+
     private String removeKeyword( String queryString )
-    {  
+    {
         String qString = StringUtils.uncapitalize( queryString );
-        qString= StringUtils.remove( queryString, BYTECODE_KEYWORD );
-        
+        qString = StringUtils.remove( queryString, BYTECODE_KEYWORD );
+
         return qString;
     }
+
+    public ArchivaConfiguration getArchivaConfiguration()
+    {
+        return archivaConfiguration;
+    }
+
+    public void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration )
+    {
+        this.archivaConfiguration = archivaConfiguration;
+    }
+
+    public Map<String, ManagedRepositoryConfiguration> getManagedRepositories()
+    {
+        return getArchivaConfiguration().getConfiguration().getManagedRepositoriesAsMap();
+    }
+
+    public void setManagedRepositories( Map<String, ManagedRepositoryConfiguration> managedRepositories )
+    {
+        this.managedRepositories = managedRepositories;
+    }
+
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion( String version )
+    {
+        this.version = version;
+    }
+
+    public int getRowCount()
+    {
+        return rowCount;
+    }
+
+    public void setRowCount( int rowCount )
+    {
+        this.rowCount = rowCount;
+    }
+
+    public boolean isFilterSearch()
+    {
+        return filterSearch;
+    }
+
+    public void setFilterSearch( boolean filterSearch )
+    {
+        this.filterSearch = filterSearch;
+    }
+
+    public String getRepositoryId()
+    {
+        return repositoryId;
+    }
+
+    public void setRepositoryId( String repositoryId )
+    {
+        this.repositoryId = repositoryId;
+    }
+
+    public List<String> getManagedRepositoryList()
+    {
+        return managedRepositoryList;
+    }
+
+    public void setManagedRepositoryList( List<String> managedRepositoryList )
+    {
+        this.managedRepositoryList = managedRepositoryList;
+    }
+
+    public String getClassName()
+    {
+        return className;
+    }
+
+    public void setClassName( String className )
+    {
+        this.className = className;
+    }
 }

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java Mon Oct  6 22:12:33 2008
@@ -59,6 +59,11 @@
      * @plexus.requirement
      */
     private UserRepositories userRepositories;
+    
+    /**
+     * @plexus.requirement
+     */
+    private ArchivaXworkUser archivaXworkUser;
 
     /* .\ Input Parameters \.________________________________________ */
 
@@ -179,7 +184,7 @@
 
     private String getPrincipal()
     {
-        return ArchivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
+        return archivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
     }
 
     private List<String> getObservableRepos()

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java Mon Oct  6 22:12:33 2008
@@ -86,6 +86,11 @@
       * @plexus.requirement
       */
      private RepositoryContentConsumers consumers;
+     
+     /**
+      * @plexus.requirement
+      */
+     private ArchivaXworkUser archivaXworkUser;
     
     /**
      * The groupId of the artifact to be deployed.
@@ -456,7 +461,7 @@
 
     private String getPrincipal()
     {
-        return ArchivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
+        return archivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
     }
 
     private void copyFile( File sourceFile, File targetPath, String targetFilename )

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsAction.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsAction.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsAction.java Mon Oct  6 22:12:33 2008
@@ -44,6 +44,11 @@
     private Map<String, AbstractRepositoryConfiguration> repoMap;
 
     /**
+     * boolean to indicate that remote repo is present. Used for Add Link
+     */
+    private boolean remoteRepoExists=false;
+    
+    /**
      * Map of Proxy Connectors.
      */
     private Map<String, List<ProxyConnectorConfiguration>> proxyConnectorMap;
@@ -57,6 +62,8 @@
         repoMap.putAll( config.getManagedRepositoriesAsMap() );
 
         proxyConnectorMap = createProxyConnectorMap();
+        
+        remoteRepoExists=config.getRemoteRepositories().size()>0;
     }
 
     public Map<String, AbstractRepositoryConfiguration> getRepoMap()
@@ -68,4 +75,9 @@
     {
         return proxyConnectorMap;
     }
+
+	public boolean getRemoteRepoExists()
+    {
+        return remoteRepoExists;
+    }
 }

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java Mon Oct  6 22:12:33 2008
@@ -69,7 +69,7 @@
         }
         if ( !file.exists() || !file.isDirectory() )
         {
-            throw new IOException( "unable to add repository - can not create the root directory: " + file );
+            throw new IOException( "Unable to add repository - no write access, can not create the root directory: " + file );
         }
 
         configuration.addManagedRepository( repository );

Modified: archiva/branches/MRM-124/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/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java Mon Oct  6 22:12:33 2008
@@ -21,25 +21,44 @@
 
 import com.opensymphony.webwork.interceptor.ServletRequestAware;
 import com.opensymphony.xwork.Preparable;
+
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.database.ArchivaDAO;
+import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.database.Constraint;
+import org.apache.maven.archiva.database.ObjectNotFoundException;
+import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO;
 import org.apache.maven.archiva.database.constraints.RangeConstraint;
+import org.apache.maven.archiva.database.constraints.RepositoryContentStatisticsByRepositoryConstraint;
 import org.apache.maven.archiva.database.constraints.RepositoryProblemByGroupIdConstraint;
 import org.apache.maven.archiva.database.constraints.RepositoryProblemByRepositoryIdConstraint;
 import org.apache.maven.archiva.database.constraints.RepositoryProblemConstraint;
 import org.apache.maven.archiva.database.constraints.UniqueFieldConstraint;
+import org.apache.maven.archiva.model.RepositoryContentStatistics;
 import org.apache.maven.archiva.model.RepositoryProblem;
 import org.apache.maven.archiva.model.RepositoryProblemReport;
+import org.apache.maven.archiva.reporting.ArchivaReportException;
+import org.apache.maven.archiva.reporting.DataLimits;
+import org.apache.maven.archiva.reporting.RepositoryStatistics;
+import org.apache.maven.archiva.reporting.RepositoryStatisticsReportGenerator;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.codehaus.plexus.redback.rbac.Resource;
 import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
 import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
 import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.servlet.http.HttpServletRequest;
+
+import java.text.ParseException;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Collection;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
@@ -51,10 +70,17 @@
     extends PlexusActionSupport
     implements SecureAction, ServletRequestAware, Preparable
 {
+    private Logger log = LoggerFactory.getLogger( GenerateReportAction.class );
+    
     /**
      * @plexus.requirement role-hint="jdo"
      */
     protected ArchivaDAO dao;
+    
+    /**
+     * @plexus.requirement
+     */
+    private ArchivaConfiguration archivaConfiguration;
 
     protected Constraint constraint;
 
@@ -90,13 +116,50 @@
     
     protected Map<String, List<RepositoryProblemReport>> repositoriesMap = 
     		new TreeMap<String, List<RepositoryProblemReport>>();
-
+    
+    // for statistics report
+    /**
+     * @plexus.requirement role-hint="simple"
+     */
+    private RepositoryStatisticsReportGenerator generator;
+    
+    private List<String> selectedRepositories = new ArrayList<String>();
+    
+    private List<String> availableRepositories;  
+    
+    private String startDate;
+    
+    private String endDate;
+    
+    private int reposSize;
+    
+    private String selectedRepo;
+    
+    private List<RepositoryStatistics> repositoryStatistics = new ArrayList<RepositoryStatistics>();
+    
+    private DataLimits limits = new DataLimits();
+    
+    private String[] datePatterns = new String[] { "MM/dd/yy", "MM/dd/yyyy", "MMMMM/dd/yyyy", "MMMMM/dd/yy", 
+        "dd MMMMM yyyy", "dd/MM/yy", "dd/MM/yyyy", "yyyy/MM/dd" };
+    
     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" ) ) );
+        
+        availableRepositories = new ArrayList<String>();
+     
+        // remove selected repositories in the option for the statistics report
+        availableRepositories.addAll( archivaConfiguration.getConfiguration().getManagedRepositoriesAsMap().keySet() );        
+        for( String repo : selectedRepositories )
+        {
+            if( availableRepositories.contains( repo ) )
+            {
+                availableRepositories.remove( repo );
+            }
+        }
     }
 
     public Collection<String> getRepositoryIds()
@@ -104,9 +167,202 @@
         return repositoryIds;
     }
 
+    /**
+     * Generate the statistics report.
+     * 
+     * check whether single repo report or comparison report
+     * 1. if it is a single repository, get all the statistics for the repository on the specified date
+     *    - if no date is specified, get only the latest 
+     *          (total page = 1 --> no pagination since only the most recent stats will be displayed)
+     *    - otherwise, get everything within the date range (total pages = repo stats / rows per page)
+     *       - required params: repository, startDate, endDate
+     *       
+     * 2. if multiple repositories, get the latest statistics on each repository on the specified date
+     *    - if no date is specified, use the current date endDate
+     *       - required params: repositories, endDate
+     *    - total pages = repositories / rows per page
+     * 
+     * @return
+     */
+    public String generateStatistics()
+    {   
+        if( rowCount < 10 )
+        {
+            addFieldError( "rowCount", "Row count must be larger than 10." );
+            return INPUT;
+        }
+        reposSize = selectedRepositories.size();
+        Date startDateInDateFormat = null;
+        Date endDateInDateFormat = null;
+        
+        if( startDate == null || "".equals( startDate ) )
+        {
+            startDateInDateFormat = getDefaultStartDate();
+        }
+        else
+        {
+            try
+            {
+                startDateInDateFormat = DateUtils.parseDate( startDate, datePatterns );
+            }
+            catch ( ParseException e )
+            {
+                addFieldError( "startDate", "Invalid date format.");
+                return INPUT;
+            }
+        }
+        
+        if( endDate == null || "".equals( endDate ) )
+        {
+            endDateInDateFormat = getDefaultEndDate();
+        }
+        else
+        {
+            try
+            {
+                endDateInDateFormat = DateUtils.parseDate( endDate, datePatterns );                
+            }
+            catch ( ParseException e )
+            {
+                addFieldError( "endDate", "Invalid date format.");
+                return INPUT;
+            }
+        }
+        
+        try
+        {
+            RepositoryContentStatisticsDAO repoContentStatsDao = dao.getRepositoryContentStatisticsDAO();            
+            if( selectedRepositories.size() > 1 )
+            {
+                limits.setTotalCount( selectedRepositories.size() );            
+                limits.setCurrentPage( 1 );
+                limits.setPerPageCount( 1 );
+                limits.setCountOfPages( 1 );
+                
+                // multiple repos
+                for( String repo : selectedRepositories )
+                {  
+                    try
+                    {
+                        List contentStats = repoContentStatsDao.queryRepositoryContentStatistics( 
+                           new RepositoryContentStatisticsByRepositoryConstraint( repo, startDateInDateFormat, endDateInDateFormat ) );
+                        
+                        if( contentStats == null || contentStats.isEmpty() )
+                        {
+                            log.info( "No statistics available for repository '" + repo + "'." );
+                            // TODO set repo's stats to 0
+                            
+                            continue;
+                        }                        
+                        repositoryStatistics.addAll( generator.generateReport( contentStats, repo, startDateInDateFormat, endDateInDateFormat, limits ) );
+                    }
+                    catch ( ObjectNotFoundException oe )
+                    {
+                        log.error( "No statistics available for repository '" + repo + "'." );
+                        // TODO set repo's stats to 0
+                    }
+                    catch ( ArchivaDatabaseException ae )
+                    {
+                        log.error( "Error encountered while querying statistics of repository '" + repo + "'." );
+                        // TODO set repo's stats to 0
+                    }
+                }
+            }
+            else if ( selectedRepositories.size() == 1 )
+            {   
+                limits.setCurrentPage( getPage() );
+                limits.setPerPageCount( getRowCount() );
+                
+                selectedRepo = selectedRepositories.get( 0 );
+                try
+                {
+                    List<RepositoryContentStatistics> contentStats = repoContentStatsDao.queryRepositoryContentStatistics( 
+                           new RepositoryContentStatisticsByRepositoryConstraint( selectedRepo, startDateInDateFormat, endDateInDateFormat ) );
+                    
+                    if( contentStats == null || contentStats.isEmpty() )
+                    {   
+                        addActionError( "No statistics available for repository. Repository might not have been scanned." );
+                        return ERROR;
+                    }   
+                    
+                    limits.setTotalCount( contentStats.size() );                    
+                    int extraPage = ( limits.getTotalCount() % limits.getPerPageCount() ) != 0 ? 1 : 0;
+                    int totalPages = ( limits.getTotalCount() / limits.getPerPageCount() ) + extraPage;                    
+                    limits.setCountOfPages( totalPages );
+                    
+                    repositoryStatistics = generator.generateReport( contentStats, selectedRepo, startDateInDateFormat, endDateInDateFormat, limits );
+                }
+                catch ( ObjectNotFoundException oe )
+                {
+                    addActionError( oe.getMessage() );
+                    return ERROR;
+                }
+                catch ( ArchivaDatabaseException de )
+                {
+                    addActionError( de.getMessage() );
+                    return ERROR;
+                }
+            }
+            else
+            {
+                addFieldError( "availableRepositories", "Please select a repository (or repositories) from the list." );
+                return INPUT;
+            } 
+            
+            if( repositoryStatistics.isEmpty() )
+            {
+                return BLANK;
+            }
+            
+            if( startDate.equals( getDefaultStartDate() ) )
+            {
+                startDate = null;
+            }
+            else
+            {   
+                startDate = DateFormatUtils.format( startDateInDateFormat, "MM/dd/yyyy" );                
+            }
+            
+            endDate = DateFormatUtils.format( endDateInDateFormat, "MM/dd/yyyy" );
+        }
+        catch ( ArchivaReportException e )
+        {
+            addActionError( "Error encountered while generating report :: " + e.getMessage() );
+            return ERROR;
+        }
+        
+        return SUCCESS;
+    }
+    
+    private Date getDefaultStartDate()
+    {
+        Calendar cal = Calendar.getInstance();
+        cal.clear();
+        cal.set( 1900, 1, 1, 0, 0, 0 );
+        
+        return cal.getTime();
+    }
+    
+    private Date getDefaultEndDate()
+    {
+        return Calendar.getInstance().getTime();
+    }
+    
     public String execute()
         throws Exception
-    {
+    {   
+        if( repositoryId == null )
+        {
+            addFieldError( "repositoryId", "You must provide a repository id.");            
+            return INPUT;
+        }
+        
+        if( rowCount < 10 )
+        {
+            addFieldError( "rowCount", "Row count must be larger than 10." );
+            return INPUT;
+        }
+        
         List<RepositoryProblem> problemArtifacts =
             dao.getRepositoryProblemDAO().queryRepositoryProblems( configureConstraint() );
 
@@ -156,7 +412,7 @@
             return SUCCESS;
         }
     }
-
+    
     private static boolean isJasperPresent()
     {
         if ( jasperPresent == null )
@@ -207,6 +463,34 @@
 
         return constraint;
     }
+    
+    public SecureActionBundle getSecureActionBundle()
+        throws SecureActionException
+    {
+        SecureActionBundle bundle = new SecureActionBundle();
+    
+        bundle.setRequiresAuthentication( true );
+        bundle.addRequiredAuthorization( ArchivaRoleConstants.OPERATION_ACCESS_REPORT, Resource.GLOBAL );
+    
+        return bundle;
+    }
+    
+    private void addToList( RepositoryProblemReport repoProblemReport )
+    {
+        List<RepositoryProblemReport> problemsList = null;
+        
+        if ( repositoriesMap.containsKey( repoProblemReport.getRepositoryId() ) )
+        {
+            problemsList = ( List<RepositoryProblemReport> ) repositoriesMap.get( repoProblemReport.getRepositoryId() );
+        }
+        else
+        {
+            problemsList = new ArrayList<RepositoryProblemReport>();
+            repositoriesMap.put( repoProblemReport.getRepositoryId(), problemsList );
+        }
+        
+        problemsList.add( repoProblemReport );
+    }
 
     public void setServletRequest( HttpServletRequest request )
     {
@@ -283,31 +567,83 @@
     	return repositoriesMap;
     }
     
-    public SecureActionBundle getSecureActionBundle()
-        throws SecureActionException
+    public List<String> getSelectedRepositories()
     {
-        SecureActionBundle bundle = new SecureActionBundle();
+        return selectedRepositories;
+    }
 
-        bundle.setRequiresAuthentication( true );
-        bundle.addRequiredAuthorization( ArchivaRoleConstants.OPERATION_ACCESS_REPORT, Resource.GLOBAL );
+    public void setSelectedRepositories( List<String> selectedRepositories )
+    {
+        this.selectedRepositories = selectedRepositories;
+    }
 
-        return bundle;
+    public List<String> getAvailableRepositories()
+    {
+        return availableRepositories;
+    }
+
+    public void setAvailableRepositories( List<String> availableRepositories )
+    {
+        this.availableRepositories = availableRepositories;
+    }
+
+    public String getStartDate()
+    {
+        return startDate;
+    }
+
+    public void setStartDate( String startDate )
+    {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate()
+    {
+        return endDate;
+    }
+
+    public void setEndDate( String endDate )
+    {
+        this.endDate = endDate;
+    }
+
+    public List<RepositoryStatistics> getRepositoryStatistics()
+    {
+        return repositoryStatistics;
+    }
+
+    public void setRepositoryStatistics( List<RepositoryStatistics> repositoryStatistics )
+    {
+        this.repositoryStatistics = repositoryStatistics;
     }
     
-    private void addToList( RepositoryProblemReport repoProblemReport )
+    public int getReposSize()
+    {
+        return reposSize;
+    }
+
+    public void setReposSize( int reposSize )
+    {
+        this.reposSize = reposSize;
+    }
+
+    public String getSelectedRepo()
+    {
+        return selectedRepo;
+    }
+
+    public void setSelectedRepo( String selectedRepo )
+    {
+        this.selectedRepo = selectedRepo;
+    }
+
+    public DataLimits getLimits()
+    {
+        return limits;
+    }
+
+    public void setLimits( DataLimits limits )
     {
-    	List<RepositoryProblemReport> problemsList = null;
-    	
-    	if ( repositoriesMap.containsKey( repoProblemReport.getRepositoryId() ) )
-    	{
-    		problemsList = ( List<RepositoryProblemReport> ) repositoriesMap.get( repoProblemReport.getRepositoryId() );
-    	}
-    	else
-    	{
-    		problemsList = new ArrayList<RepositoryProblemReport>();
-    		repositoriesMap.put( repoProblemReport.getRepositoryId(), problemsList );
-    	}
-    	
-    	problemsList.add( repoProblemReport );
+        this.limits = limits;
     }
 }

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java Mon Oct  6 22:12:33 2008
@@ -35,10 +35,12 @@
 import org.apache.commons.codec.Decoder;
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.security.AccessDeniedException;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
 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.ServletAuthenticator;
 import org.apache.maven.archiva.security.UserRepositories;
@@ -89,6 +91,8 @@
     private ServletAuthenticator servletAuth;
 
     private HttpAuthenticator httpAuth;
+    
+    private ArchivaXworkUser archivaXworkUser;
 
     public void init( javax.servlet.ServletConfig servletConfig )
         throws ServletException
@@ -101,27 +105,39 @@
             (ServletAuthenticator) wac.getBean( PlexusToSpringUtils.buildSpringId( ServletAuthenticator.class.getName() ) );
         httpAuth =
             (HttpAuthenticator) wac.getBean( PlexusToSpringUtils.buildSpringId( HttpAuthenticator.ROLE, "basic" ) );
+        archivaXworkUser = (ArchivaXworkUser) wac.getBean( PlexusToSpringUtils.buildSpringId( ArchivaXworkUser.class ) );
     }
 
     public void doGet( HttpServletRequest req, HttpServletResponse res )
         throws ServletException, IOException
     {
-        String repoId = req.getParameter( "repoId" );
-        String groupId = req.getParameter( "groupId" );
-        String artifactId = req.getParameter( "artifactId" );
+        String repoId = null;
+        String groupId = null;
+        String artifactId = null;
+        
+        String url = StringUtils.removeEnd( req.getRequestURL().toString(), "/" );          
+        if( StringUtils.countMatches( StringUtils.substringAfter( url, "feeds/" ), "/" ) > 0 )
+        {
+            artifactId = StringUtils.substringAfterLast( url, "/" );
+            groupId = StringUtils.substringBeforeLast( StringUtils.substringAfter( url, "feeds/" ), "/");
+            groupId = StringUtils.replaceChars( groupId, '/', '.' );
+        }
+        else if( StringUtils.countMatches( StringUtils.substringAfter( url, "feeds/" ), "/" ) == 0 )
+        {
+            repoId = StringUtils.substringAfterLast( url, "/" );
+        }
+        else
+        {
+            res.sendError( HttpServletResponse.SC_BAD_REQUEST, "Invalid request url." );
+            return;
+        }        
         
         try
         {
             Map<String, String> map = new HashMap<String, String>();
             SyndFeed feed = null;
-        
-            if ( ( repoId == null ) && ( groupId == null && artifactId == null ) )
-            {
-                res.sendError( HttpServletResponse.SC_BAD_REQUEST, "Required fields not found in request." );
-                return;
-            }
-
-            if ( isAllowed( req ) )
+            
+            if ( isAllowed( req, repoId, groupId, artifactId ) )
             {
                 if ( repoId != null )
                 {
@@ -157,14 +173,14 @@
             }
             
             res.setContentType( MIME_TYPE );
-            
+                        
             if ( repoId != null )
-            {
-                feed.setLink( req.getRequestURL() + "?repoId=" + repoId );
+            {   
+                feed.setLink( req.getRequestURL().toString() );
             }
             else if ( ( groupId != null ) && ( artifactId != null ) )
             {
-                feed.setLink( req.getRequestURL() + "?groupId=" + groupId + "&artifactId=" + artifactId );
+                feed.setLink( req.getRequestURL().toString() );                
             }
 
             SyndFeedOutput output = new SyndFeedOutput();
@@ -218,20 +234,23 @@
      * Basic authentication.
      * 
      * @param req
+     * @param repositoryId TODO
+     * @param groupId TODO
+     * @param artifactId TODO
      * @return
      */
-    private boolean isAllowed( HttpServletRequest req )
+    private boolean isAllowed( HttpServletRequest req, String repositoryId, String groupId, String artifactId )
         throws UserNotFoundException, AccountLockedException, AuthenticationException, MustChangePasswordException,
         UnauthorizedException
     {
         String auth = req.getHeader( "Authorization" );
         List<String> repoIds = new ArrayList<String>();
 
-        if ( req.getParameter( "repoId" ) != null )
+        if ( repositoryId != null )
         {
-            repoIds.add( req.getParameter( "repoId" ) );
+            repoIds.add( repositoryId );
         }
-        else if ( req.getParameter( "artifactId" ) != null && req.getParameter( "groupId" ) != null )
+        else if ( artifactId != null && groupId != null )
         {
             if ( auth != null )
             {
@@ -254,7 +273,7 @@
 
                 if ( usernamePassword == null || usernamePassword.trim().equals( "" ) )
                 {
-                    repoIds = getObservableRepos( ArchivaRoleConstants.PRINCIPAL_GUEST );
+                    repoIds = getObservableRepos( archivaXworkUser.getGuest() );
                 }
                 else
                 {
@@ -264,7 +283,7 @@
             }
             else
             {
-                repoIds = getObservableRepos( ArchivaRoleConstants.PRINCIPAL_GUEST );
+                repoIds = getObservableRepos( archivaXworkUser.getGuest() );
             }
         }
         else

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java Mon Oct  6 22:12:33 2008
@@ -80,15 +80,7 @@
         StringBuffer baseUrl = new StringBuffer();
         
         baseUrl.append( request.getScheme() ).append( "://" );
-        baseUrl.append( request.getServerName() );
-        int portnum = request.getServerPort();
-
-        // Only add port if non-standard.
-        Integer defaultPortnum = (Integer) defaultSchemePortMap.get( request.getScheme() );
-        if ( ( defaultPortnum == null ) || ( defaultPortnum.intValue() != portnum ) )
-        {
-            baseUrl.append( ":" ).append( String.valueOf( portnum ) );
-        }
+        baseUrl.append( getServerName( request ) );
         baseUrl.append( request.getContextPath() );
 
         if ( StringUtils.isNotBlank( resource ) )
@@ -103,4 +95,23 @@
 
         return baseUrl.toString();
     }
+
+    private static String getServerName( HttpServletRequest request )
+    {
+        String name = request.getHeader( "X-Forwarded-Host" );
+        if ( name == null )
+        {
+            name = request.getServerName();
+            int portnum = request.getServerPort();
+
+            // Only add port if non-standard.
+            Integer defaultPortnum = (Integer) defaultSchemePortMap.get( request.getScheme() );
+            if ( ( defaultPortnum == null ) || ( defaultPortnum.intValue() != portnum ) )
+            {
+                name = name + ":" + String.valueOf( portnum );
+            }
+            return name;
+        }
+        return name;
+    }
 }

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j.xml?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j.xml (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j.xml Mon Oct  6 22:12:33 2008
@@ -37,7 +37,7 @@
     <appender-ref ref="auditlog" />
   </logger>
   
-  <logger name="org.codehaus.plexus.security">
+  <logger name="org.codehaus.plexus.redback">
     <level value="info"/>
     <appender-ref ref="rolling" />
   </logger>
@@ -122,4 +122,4 @@
     <priority value ="info" />
   </root>
 
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml Mon Oct  6 22:12:33 2008
@@ -143,6 +143,16 @@
     <action name="index" class="searchAction" method="input">
       <result name="input">/WEB-INF/jsp/quickSearch.jsp</result>
     </action>
+
+    <action name="advancedSearch" class="searchAction" method="input">
+      <result name="input">/WEB-INF/jsp/advancedSearch.jsp</result>
+    </action>
+
+    <action name="filteredSearch" class="searchAction" method="filteredSearch">
+      <result name="input">/WEB-INF/jsp/advancedSearch.jsp</result>
+      <result>/WEB-INF/jsp/results.jsp</result>
+      <result name="error">/WEB-INF/jsp/quickSearch.jsp</result>
+    </action>
 	
     <action name="quickSearch" class="searchAction" method="quickSearch">
       <result name="input">/WEB-INF/jsp/quickSearch.jsp</result>
@@ -501,6 +511,13 @@
       <result name="blank">/WEB-INF/jsp/reports/blankReport.jsp</result>
       <result>/WEB-INF/jsp/reports/basicReport.jsp</result>
     </action>
+    
+    <action name="generateStatisticsReport" class="generateReport" method="generateStatistics">
+      <result name="input">/WEB-INF/jsp/reports/pickReport.jsp</result>
+      <result name="blank">/WEB-INF/jsp/reports/blankReport.jsp</result>
+      <result>/WEB-INF/jsp/reports/statisticsReport.jsp</result>
+    </action>
+    
   </package>
 </xwork>
 

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml Mon Oct  6 22:12:33 2008
@@ -30,20 +30,4 @@
   <bean id="propertyPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
     <property name="location" value="classpath:application.properties" />
   </bean>
-
-
-  <bean name="testXmlRpcService" lazy-init="true" scope="singleton" class="org.apache.maven.archiva.web.xmlrpc.services.PingServiceImpl"/>
-
-  <bean name="xmlrpcServicesList" class="java.util.ArrayList">
-    <constructor-arg>
-        <ref bean="testXmlRpcService"/>
-    </constructor-arg>
-  </bean>
-
-  <bean name="xmlRpcAuthenticator" class="org.apache.maven.archiva.xmlrpc.security.XmlRpcAuthenticator">
-      <constructor-arg>
-         <ref bean="securitySystem"/>
-      </constructor-arg>
-  </bean>
-
 </beans>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp Mon Oct  6 22:12:33 2008
@@ -30,7 +30,7 @@
 <h1>Admin: Add Managed Repository</h1>
 
 <div id="contentArea">
-
+  <ww:actionerror/>
   <ww:actionmessage/>
   <ww:form method="post" action="addRepository!commit" namespace="/admin" validate="true">
     <ww:textfield name="repository.id" label="Identifier" size="10" required="true"/>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp Mon Oct  6 22:12:33 2008
@@ -46,14 +46,22 @@
 <ww:actionerror/>
 <ww:actionmessage/>
 
-<div style="float:right">
-  <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
-    <ww:url id="addProxyConnectorUrl" action="addProxyConnector"/>
-    <ww:a href="%{addProxyConnectorUrl}" cssClass="create">
-      <img src="<c:url value="/images/icons/create.png" />"/>
-      Add
-    </ww:a>
-  </redback:ifAnyAuthorized>
+<div style="float:right">  
+  <c:choose>
+	<c:when test="${remoteRepoExists}">
+	  <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
+	    <ww:url id="addProxyConnectorUrl" action="addProxyConnector"/>
+	    <ww:a href="%{addProxyConnectorUrl}" cssClass="create">
+	      <img src="<c:url value="/images/icons/create.png" />"/>
+	      Add
+	    </ww:a>
+	  </redback:ifAnyAuthorized>
+	</c:when>
+	<c:otherwise>
+		<img src="<c:url value="/images/icons/create.png" />"/>
+	      Add (Disabled. No remote repositories)
+	</c:otherwise>
+  </c:choose>    
 </div>
 
 <h2>Repository Proxy Connectors</h2>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp Mon Oct  6 22:12:33 2008
@@ -88,7 +88,7 @@
     </ww:a>
   </redback:ifAnyAuthorized>
   <c:url var="rssFeedIconUrl" value="/images/icons/rss-feed.png"/>
-  <a href="/archiva/rss/rss_feeds?repoId=${repository.id}">
+  <a href="/archiva/feeds/${repository.id}">
 	<img src="${rssFeedIconUrl}" />
   </a>
 </div>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositoryGroups.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositoryGroups.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositoryGroups.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositoryGroups.jsp Mon Oct  6 22:12:33 2008
@@ -152,6 +152,10 @@
 </c:forEach>
 </div> <%-- admin --%>
 
-</div> <%-- content area --%>
 </c:otherwise>
 </c:choose>
+</div> <%-- content area --%>
+
+</body>
+</html>
+

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp Mon Oct  6 22:12:33 2008
@@ -69,13 +69,14 @@
               <ww:param name="groupId" value="%{'${results.selectedGroupId}'}"/>
               <ww:param name="artifactId" value="%{'${artifactId}'}"/>
             </ww:url>
-          </c:set>          
+          </c:set>
+          <c:url var="rssUrl" value="/feeds/${groupId}/${artifactId}"/>
           <li>
           <a href="${url}">${artifactId}/</a>
-          <a href="/archiva/rss/rss_feeds?groupId=${groupId}&artifactId=${artifactId}">
-      		<img src="${rssFeedIconUrl}" />
-    	  </a>
-    	  </li>    
+          <a href="${rssUrl}">
+            <img src="${rssFeedIconUrl}" />
+          </a>
+          </li>
         </c:forEach>
       </ul>
     </div>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp Mon Oct  6 22:12:33 2008
@@ -115,6 +115,11 @@
             <my:currentWWUrl action="userlist" namespace="/security">User Management</my:currentWWUrl>
           </li>
         </redback:ifAuthorized>
+        <redback:ifAuthorized permission="archiva-manage-users">
+          <li class="none">
+            <my:currentWWUrl action="roles" namespace="/security">User Roles</my:currentWWUrl>
+          </li>
+        </redback:ifAuthorized>        
         <redback:ifAuthorized permission="archiva-manage-configuration">
           <li class="none">
             <my:currentWWUrl action="configureAppearance" namespace="/admin">Appearance</my:currentWWUrl>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf Mon Oct  6 22:12:33 2008
@@ -109,15 +109,28 @@
 </table>
 
 <c:if test="${model.packaging != 'pom'}">
-  <h2>POM Dependency Snippet</h2>
+  <h2>POM Snippet</h2>
+  <c:choose>
+    <c:when test="${model.packaging == 'maven-plugin'}">
+<pre class="pom">
+    &lt;plugin>
+      &lt;groupId>${model.groupId}&lt;/groupId>
+      &lt;artifactId>${model.artifactId}&lt;/artifactId>
+      &lt;version>${version}&lt;/version>
+    &lt;/plugin>
+</pre>
+    </c:when>
+    <c:otherwise>
 <pre class="pom">
     &lt;dependency>
       &lt;groupId>${model.groupId}&lt;/groupId>
-      &lt;artifactId>${model.artifactId}&lt;/artifactId>     
+      &lt;artifactId>${model.artifactId}&lt;/artifactId>
       &lt;version>${version}&lt;/version><c:if test="${model.packaging != 'jar'}">
       &lt;type>${model.packaging}&lt;/type></c:if>
     &lt;/dependency>
 </pre>
+    </c:otherwise>
+  </c:choose>
 </c:if>
 
 <c:if test="${!empty (model.url) || model.organization != null || !empty (model.licenses)

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp Mon Oct  6 22:12:33 2008
@@ -33,8 +33,34 @@
 <h1>Search</h1>
 
 <div id="contentArea">
-  <%@ include file="/WEB-INF/jsp/include/quickSearchForm.jspf" %>
+<div id="searchBox">
+  <ww:form method="get" action="quickSearch" validate="true">
+    <ww:textfield label="Search for" size="50" name="q"/>
+    <ww:hidden name="completeQueryString" value="${completeQueryString}"/>        
+    <ww:submit label="Go!"/>
+  </ww:form>
+
+  <script type="text/javascript">
+    document.getElementById("quickSearch_q").focus();
+  </script>
+
+  <ww:url id="filteredSearchUrl" action="advancedSearch"/>
+  <ww:a href="%{filteredSearchUrl}">
+    Advanced Search
+  </ww:a>
+
+  <p>
+    <ww:actionerror/>
+  </p>
 </div>
 
+  <p>
+    Enter your search terms. A variety of data will be searched for your keywords.<br/>
+    To search for Java classes, packages or methods, use the keyword <code>bytecode:</code>
+    before the term. For example: 
+    <code>bytecode:MyClass</code>, or:
+    <code>bytecode:myMethod</code>
+  </p>
+</div>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp Mon Oct  6 22:12:33 2008
@@ -27,13 +27,29 @@
 
 <body>
 <h1>Reports</h1>
-
+  
 <div id="contentArea">
 
-  <ww:form action="generateReport" namespace="/report" validate="true">
+  <h2>Repository Statistics</h2>
+  <ww:form action="generateStatisticsReport" namespace="/report" validate="true">   
+    
+    <ww:optiontransferselect label="Repositories To Be Compared" name="availableRepositories" 
+		list="availableRepositories" doubleName="selectedRepositories"
+		doubleList="selectedRepositories" size="8" doubleSize="8"/>
+		
+	<ww:datepicker label="Start Date" name="startDate" id="startDate"/>
+	<ww:datepicker label="End Date" name="endDate" id="endDate"/>
+	<ww:textfield label="Row Count" name="rowCount" />
+		    
+    <ww:submit value="View Statistics"/>
+  </ww:form>
+    
+  <h2>Repository Health</h2>
+  <ww:form namespace="/report" action="generateReport" validate="true">  
     <ww:textfield label="Row Count" name="rowCount" />
     <ww:textfield label="Group ID" name="groupId"/>
-    <ww:select label="Repository ID" name="repositoryId" list="repositoryIds"/>
+    <ww:select label="Repository ID" name="repositoryId" list="repositoryIds"/>    
+  
     <ww:submit value="Show Report"/>
   </ww:form>
 

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/results.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/results.jsp?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/results.jsp (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/results.jsp Mon Oct  6 22:12:33 2008
@@ -30,7 +30,12 @@
 
 <body>
 
-<h1>Search</h1>
+<c:if test="${fromFilterSearch == true}">
+  <h1>Advanced Search</h1>
+</c:if>
+<c:if test="${fromFilterSearch == false}">
+  <h1>Search</h1>
+</c:if> 
 
 <c:url var="imgNextPageUrl" value="/images/icon_next_page.gif"/>
 <c:url var="imgPrevPageUrl" value="/images/icon_prev_page.gif"/>
@@ -39,7 +44,44 @@
 
 <div id="contentArea">
   <div id="searchBox">
-    <%@ include file="/WEB-INF/jsp/include/quickSearchForm.jspf" %>
+
+    <c:if test="${fromFilterSearch == true}">
+      <ww:form method="get" action="filteredSearch" validate="true">
+        <ww:textfield label="Row Count" size="50" name="rowCount"/>
+        <ww:textfield label="Group Id" size="50" name="groupId"/>
+        <ww:textfield label="Artifact Id" size="50" name="artifactId"/>
+        <ww:textfield label="Version" size="50" name="version"/>
+        <ww:textfield label="Class / Package" size="50" name="className"/>
+        <ww:select name="repositoryId" label="Repository ID" list="managedRepositoryList"/>
+        <ww:hidden name="completeQueryString" value="${completeQueryString}"/>
+        <ww:hidden name="fromFilterSearch" value="${fromFilterSearch}"/>
+        <ww:submit label="Go!"/>
+      </ww:form>
+  
+      <ww:url id="indexUrl" action="index"/>
+      <ww:a href="%{indexUrl}">
+        Quick Search Page
+      </ww:a>
+      <script type="text/javascript">
+        document.getElementById("filteredSearch_groupId").focus();
+      </script>
+      </c:if>
+    <c:if test="${fromFilterSearch == false}">
+      <ww:form method="get" action="quickSearch" validate="true">
+        <ww:textfield label="Search for" size="50" name="q"/>
+        <ww:checkbox label="Search within results" name="searchResultsOnly"/>        
+        <ww:hidden name="completeQueryString" value="${completeQueryString}"/>        
+        <ww:submit label="Go!"/>
+      </ww:form> 
+      <script type="text/javascript">
+        document.getElementById("quickSearch_q").focus();
+      </script>
+    </c:if>
+
+  <p>
+    <ww:actionerror/>
+  </p>
+
   </div>
 
   <h1>Results</h1>
@@ -49,10 +91,10 @@
 
       <%-- search was made from the indices --%>
       <c:when test="${databaseResults == null}">
-        <c:set var="hitsNum">${fn:length(results.hits) + (currentPage * results.limits.pageSize)}</c:set>
+        <c:set var="hitsNum">${fn:length(results.hits) + (currentPage  * results.limits.pageSize)}</c:set>
         <c:choose>
           <c:when test="${results.totalHits > results.limits.pageSize}">
-            <p>Hits: ${(hitsNum - results.limits.pageSize) + 1} to ${hitsNum} of ${results.totalHits}</p>
+              <p>Hits: ${(hitsNum - results.limits.pageSize) + 1} to ${hitsNum} of ${results.totalHits}</p>
           </c:when>
           <c:otherwise>
             <p>Hits: 1 to ${hitsNum} of ${results.totalHits}</p>
@@ -67,18 +109,53 @@
       	  <%-- Pagination start --%>
       	    <p>                       
             <%-- Prev & Next icons --%>
-            <c:set var="prevPageUrl">
-              <ww:url action="quickSearch" namespace="/">
-                <ww:param name="q" value="%{'${q}'}"/>                
-                <ww:param name="currentPage" value="%{'${currentPage - 1}'}"/>
-              </ww:url>
-      	    </c:set>
-      	    <c:set var="nextPageUrl">
-              <ww:url action="quickSearch" namespace="/">
-                <ww:param name="q" value="%{'${q}'}"/>                
-                <ww:param name="currentPage" value="%{'${currentPage + 1}'}"/>
-              </ww:url>
-      	    </c:set>    
+              <c:if test="${fromFilterSearch == false}">
+               <c:set var="prevPageUrl">
+                 <ww:url action="quickSearch" namespace="/">
+                   <ww:param name="q" value="%{'${q}'}"/>                
+                   <ww:param name="currentPage" value="%{'${currentPage - 1}'}"/>
+                 </ww:url>
+       	      </c:set>
+       	      <c:set var="nextPageUrl">
+                 <ww:url action="quickSearch" namespace="/">
+                   <ww:param name="q" value="%{'${q}'}"/>                
+                   <ww:param name="currentPage" value="%{'${currentPage + 1}'}"/>
+                 </ww:url>
+       	      </c:set>    
+              </c:if>
+
+              <c:if test="${fromFilterSearch == true}">
+               <c:set var="prevPageUrl">
+                 <ww:url action="filteredSearch" namespace="/">
+                   <ww:param name="rowCount" value="%{'${rowCount}'}"/>  
+                   <ww:param name="groupId" value="%{'${groupId}'}"/>
+                   <ww:param name="artifactId" value="%{'${artifactId}'}"/>
+                   <ww:param name="version" value="%{'${version}'}"/>
+                   <ww:param name="className" value="%{'${className}'}"/>
+                   <ww:param name="repositoryId" value="%{'${repositoryId}'}"/>
+                   <ww:param name="filterSearch" value="%{'${filterSearch}'}"/>
+  		   <ww:param name="fromResultsPage" value="true"/>
+                   <ww:param name="currentPage" value="%{'${currentPage - 1}'}"/>
+ 		  <ww:param name="searchResultsOnly" value="%{'${searchResultsOnly}'}"/>
+ 		  <ww:param name="completeQueryString" value="%{'${completeQueryString}'}"/>
+                 </ww:url>
+       	      </c:set>
+       	      <c:set var="nextPageUrl">
+                <ww:url action="filteredSearch" namespace="/">
+                  <ww:param name="rowCount" value="%{'${rowCount}'}"/>  
+                  <ww:param name="groupId" value="%{'${groupId}'}"/>
+                  <ww:param name="artifactId" value="%{'${artifactId}'}"/>
+                  <ww:param name="version" value="%{'${version}'}"/>
+                  <ww:param name="className" value="%{'${className}'}"/>
+                  <ww:param name="repositoryId" value="%{'${repositoryId}'}"/>
+                  <ww:param name="filterSearch" value="%{'${filterSearch}'}"/>
+  		  <ww:param name="fromResultsPage" value="true"/>
+                  <ww:param name="currentPage" value="%{'${currentPage + 1}'}"/>
+ 		  <ww:param name="searchResultsOnly" value="%{'${searchResultsOnly}'}"/>
+		  <ww:param name="completeQueryString" value="%{'${completeQueryString}'}"/>
+                </ww:url>
+      	      </c:set>    
+             </c:if>
             
             <c:choose>
               <c:when test="${currentPage == 0}">                               
@@ -116,25 +193,53 @@
 			</c:choose>
 						
 			<c:forEach var="i" begin="${beginVal}" end="${endVal}">
-              <c:choose>                   			    
-				<c:when test="${i != currentPage}">
-				   <c:set var="specificPageUrl">
-		              <ww:url action="quickSearch" namespace="/">
-		                <ww:param name="q" value="%{'${q}'}"/>
-		                <ww:param name="currentPage" value="%{'${i}'}"/>
-		                <ww:param name="searchResultsOnly" value="%{'${searchResultsOnly}'}"/>
-		                <ww:param name="completeQueryString" value="%{'${completeQueryString}'}"/>
-		              </ww:url>
-		      	  </c:set>
-				  <a href="${specificPageUrl}">${i + 1}</a>
-				</c:when>
-				<c:otherwise>		
-					<b>${i + 1}</b>   
-				</c:otherwise>				  			    
-              </c:choose> 
+                          <c:if test="${fromFilterSearch == false}">
+                            <c:choose>                   			    
+		              <c:when test="${i != currentPage}">
+		                <c:set var="specificPageUrl">
+		                  <ww:url action="quickSearch" namespace="/">
+		                    <ww:param name="q" value="%{'${q}'}"/>
+		                    <ww:param name="currentPage" value="%{'${i}'}"/>
+		                    <ww:param name="searchResultsOnly" value="%{'${searchResultsOnly}'}"/>
+		                    <ww:param name="completeQueryString" value="%{'${completeQueryString}'}"/>  
+  		                  </ww:url>
+		      	        </c:set>
+			          <a href="${specificPageUrl}">${i + 1}</a>
+			      </c:when>
+			      <c:otherwise>		
+		       	        <b>${i + 1}</b>   
+		              </c:otherwise>				  			    
+                            </c:choose>
+                          </c:if>
+
+                          <c:if test="${fromFilterSearch == true}">
+                            <c:choose>                  			    
+		              <c:when test="${i != currentPage}">
+		                <c:set var="specificPageUrl">
+		                  <ww:url action="filteredSearch" namespace="/">
+                                    <ww:param name="rowCount" value="%{'${rowCount}'}"/>  
+                                    <ww:param name="groupId" value="%{'${groupId}'}"/>
+                                    <ww:param name="artifactId" value="%{'${artifactId}'}"/>
+                                    <ww:param name="version" value="%{'${version}'}"/>
+                                    <ww:param name="className" value="%{'${className}'}"/>
+                                    <ww:param name="repositoryId" value="%{'${repositoryId}'}"/>
+                                    <ww:param name="filterSearch" value="%{'${filterSearch}'}"/>
+		                    <ww:param name="fromResultsPage" value="true"/>
+		                    <ww:param name="currentPage" value="%{'${i}'}"/>
+		                    <ww:param name="searchResultsOnly" value="%{'${searchResultsOnly}'}"/>
+		                    <ww:param name="completeQueryString" value="%{'${completeQueryString}'}"/>
+		                  </ww:url>
+		      	        </c:set>
+				<a href="${specificPageUrl}">${i + 1}</a>
+			      </c:when>
+			      <c:otherwise>		
+		                <b>${i + 1}</b>   
+			      </c:otherwise>
+                            </c:choose>
+                          </c:if>
 			</c:forEach>
-				
-			<c:choose>
+			
+                        <c:choose>
 			  <c:when test="${currentPage == (totalPages - 1)}">
 			    <img src="${imgNextPageDisabledUrl}"/>
               </c:when>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml Mon Oct  6 22:12:33 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements.  See the NOTICE file
@@ -17,7 +17,10 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 
   <display-name>Apache Archiva</display-name>
 
@@ -82,20 +85,6 @@
     <!-- Loading this on startup so as to take advantage of configuration listeners -->
     <load-on-startup>1</load-on-startup>
   </servlet>
-
-  <servlet>
-    <servlet-name>XmlRpcServlet</servlet-name>
-    <servlet-class>com.atlassian.xmlrpc.spring.BinderSpringXmlRpcServlet</servlet-class>
-    <init-param>
-        <param-name>serviceListBeanName</param-name>
-        <param-value>xmlrpcServicesList</param-value>
-    </init-param>
-        <init-param>
-            <param-name>authHandlerBeanName</param-name>
-            <param-value>xmlRpcAuthenticator</param-value>
-        </init-param>
-        <load-on-startup>1</load-on-startup>
-  </servlet>
   
   <servlet>
     <servlet-name>RssFeedServlet</servlet-name>
@@ -104,7 +93,7 @@
   
   <servlet-mapping>
      <servlet-name>RssFeedServlet</servlet-name>
-     <url-pattern>/rss/rss_feeds</url-pattern>
+     <url-pattern>/feeds/*</url-pattern>
   </servlet-mapping>
   
   <servlet-mapping>
@@ -112,11 +101,6 @@
     <url-pattern>/repository/*</url-pattern>
   </servlet-mapping>
 
-  <servlet-mapping>
-    <servlet-name>XmlRpcServlet</servlet-name>
-    <url-pattern>/xmlrpc</url-pattern>
-  </servlet-mapping>
-
   <resource-ref>
     <res-ref-name>jdbc/users</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
@@ -135,4 +119,5 @@
     <res-auth>Container</res-auth>
     <res-sharing-scope>Shareable</res-sharing-scope>
   </resource-ref>
+
 </web-app>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/maven-theme.css
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/maven-theme.css?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/maven-theme.css (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/maven-theme.css Mon Oct  6 22:12:33 2008
@@ -33,7 +33,8 @@
 
 select {
     padding-left: 3px;
-	height: 1.4em;	
+	height: auto;
+	width: auto;	
 }
 
 input {

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva-splat-32.gif
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva-splat-32.gif?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
Binary files - no diff available.

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/rss/RssFeedServletTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/rss/RssFeedServletTest.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/rss/RssFeedServletTest.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/rss/RssFeedServletTest.java Mon Oct  6 22:12:33 2008
@@ -59,7 +59,7 @@
         throws Exception
     {
         RssFeedServlet servlet =
-            (RssFeedServlet) client.newInvocation( "http://localhost/rss/rss_feeds?repoId=test-repo" ).getServlet();
+            (RssFeedServlet) client.newInvocation( "http://localhost/feeds/test-repo" ).getServlet();
         assertNotNull( servlet );
     }
 
@@ -67,10 +67,10 @@
         throws Exception
     {
         RssFeedServlet servlet =
-            (RssFeedServlet) client.newInvocation( "http://localhost/rss/rss_feeds?repoId=test-repo" ).getServlet();
+            (RssFeedServlet) client.newInvocation( "http://localhost/feeds/test-repo" ).getServlet();
         assertNotNull( servlet );
 
-        WebRequest request = new GetMethodWebRequest( "http://localhost/rss/rss_feeds?repoId=test-repo" );
+        WebRequest request = new GetMethodWebRequest( "http://localhost/feeds/test-repo" );
         
         BASE64Encoder encoder = new BASE64Encoder();
         String userPass = "user1:password1";
@@ -88,10 +88,10 @@
     {
         RssFeedServlet servlet =
             (RssFeedServlet) client.newInvocation(
-                                                   "http://localhost/rss/rss_feeds?groupId=org.apache.archiva&artifactId=artifact-two" ).getServlet();
+                                                   "http://localhost/feeds/org/apache/archiva/artifact-two" ).getServlet();
         assertNotNull( servlet );
 
-        WebRequest request = new GetMethodWebRequest( "http://localhost/rss/rss_feeds?groupId=org.apache.archiva&artifactId=artifact-two" );
+        WebRequest request = new GetMethodWebRequest( "http://localhost/feeds/org/apache/archiva/artifact-two" );
         
         BASE64Encoder encoder = new BASE64Encoder();
         String userPass = "user1:password1";
@@ -109,12 +109,12 @@
     {
         RssFeedServlet servlet =
             (RssFeedServlet) client.newInvocation(
-                                                   "http://localhost/rss/rss_feeds?invalid_param=xxx" ).getServlet();
+                                                   "http://localhost/feeds?invalid_param=xxx" ).getServlet();
         assertNotNull( servlet );
 
         try
         {
-            WebResponse response = client.getResponse( "http://localhost/rss/rss_feeds?invalid_param=xxx" );
+            WebResponse response = client.getResponse( "http://localhost/feeds?invalid_param=xxx" );
         }
         catch ( HttpException he )
         {
@@ -127,11 +127,11 @@
     {
         RssFeedServlet servlet =
             (RssFeedServlet) client.newInvocation(
-                                                   "http://localhost/rss/rss_feeds?repoId=unauthorized-repo" ).getServlet();
+                                                   "http://localhost/feeds/unauthorized-repo" ).getServlet();
         assertNotNull( servlet );
     
         
-        WebRequest request = new GetMethodWebRequest( "http://localhost/rss/rss_feeds?repoId=unauthorized-repo" );
+        WebRequest request = new GetMethodWebRequest( "http://localhost/feeds/unauthorized-repo" );
         
         Encoder encoder = new Base64();
         String userPass = "unauthUser:unauthPass";
@@ -153,11 +153,11 @@
     {
         RssFeedServlet servlet =
             (RssFeedServlet) client.newInvocation(
-                                                   "http://localhost/rss/rss_feeds?repoId=unauthorized-repo" ).getServlet();
+                                                   "http://localhost/feeds/unauthorized-repo" ).getServlet();
         assertNotNull( servlet );
     
         
-        WebRequest request = new GetMethodWebRequest( "http://localhost/rss/rss_feeds?repoId=unauthorized-repo" );
+        WebRequest request = new GetMethodWebRequest( "http://localhost/feeds/unauthorized-repo" );
         
         BASE64Encoder encoder = new BASE64Encoder();
         String userPass = "user1:password1";

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml Mon Oct  6 22:12:33 2008
@@ -35,7 +35,7 @@
 
   <servlet-mapping>
   	<servlet-name>RssFeedServlet</servlet-name>
-	<url-pattern>/rss/*</url-pattern>
+	<url-pattern>/feeds/*</url-pattern>
   </servlet-mapping>
   
   <context-param>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/pom.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/pom.xml?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/pom.xml (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/pom.xml Mon Oct  6 22:12:33 2008
@@ -80,21 +80,21 @@
       <artifactId>maven-model</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.redback</groupId>
+      <groupId>org.codehaus.redback</groupId>
       <artifactId>redback-xwork-integration</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.redback</groupId>
+      <groupId>org.codehaus.redback</groupId>
       <artifactId>redback-keys-memory</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.redback</groupId>
+      <groupId>org.codehaus.redback</groupId>
       <artifactId>redback-rbac-memory</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.redback</groupId>
+      <groupId>org.codehaus.redback</groupId>
       <artifactId>redback-users-memory</artifactId>
       <scope>test</scope>
     </dependency>

Modified: archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java?rev=702347&r1=702346&r2=702347&view=diff
==============================================================================
--- archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java (original)
+++ archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResource.java Mon Oct  6 22:12:33 2008
@@ -97,17 +97,20 @@
     private final MimeTypes mimeTypes;
 
     private List<AuditListener> auditListeners;
+    
+    private ArchivaXworkUser archivaXworkUser;
 
     public ArchivaDavResource( String localResource, String logicalResource, ManagedRepositoryConfiguration repository,
                                DavSession session, ArchivaDavResourceLocator locator, DavResourceFactory factory,
                                MimeTypes mimeTypes, List<AuditListener> auditListeners,
-                               RepositoryContentConsumers consumers )
+                               RepositoryContentConsumers consumers, ArchivaXworkUser archivaXworkUser )
     {
         this.localResource = new File( localResource ); 
         this.logicalResource = logicalResource;
         this.locator = locator;
         this.factory = factory;
         this.session = session;
+        this.archivaXworkUser = archivaXworkUser;
         
         // TODO: push into locator as well as moving any references out of the resource factory
         this.repository = repository;
@@ -121,10 +124,10 @@
     public ArchivaDavResource( String localResource, String logicalResource, ManagedRepositoryConfiguration repository,
                                String remoteAddr, DavSession session, ArchivaDavResourceLocator locator,
                                DavResourceFactory factory, MimeTypes mimeTypes, List<AuditListener> auditListeners,
-                               RepositoryContentConsumers consumers )
+                               RepositoryContentConsumers consumers, ArchivaXworkUser archivaXworkUser )
     {
         this( localResource, logicalResource, repository, session, locator, factory, mimeTypes, auditListeners,
-              consumers );
+              consumers, archivaXworkUser );
 
         this.remoteAddr = remoteAddr;
     }
@@ -614,7 +617,7 @@
 
     private void triggerAuditEvent( String remoteIP, String repositoryId, String resource, String action )
     {
-        String activePrincipal = ArchivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
+        String activePrincipal = archivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
         AuditEvent event = new AuditEvent( repositoryId, activePrincipal, resource, action );
         event.setRemoteIP( remoteIP );
 



Mime
View raw message