archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r886037 [2/2] - in /archiva/branches/MRM-1025: ./ archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ archiva-modules/archiva-base/archiva-consumers/archiva-da...
Date Wed, 02 Dec 2009 02:33:07 GMT
Modified: archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/AbstractArchivaDatabaseTestCase.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/AbstractArchivaDatabaseTestCase.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/AbstractArchivaDatabaseTestCase.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/AbstractArchivaDatabaseTestCase.java Wed Dec  2 02:33:02 2009
@@ -29,8 +29,6 @@
 import javax.jdo.PersistenceManagerFactory;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.maven.archiva.database.updater.DatabaseUnprocessedArtifactConsumer;
-import org.apache.maven.archiva.database.updater.TestDatabaseUnprocessedConsumer;
 import org.apache.maven.archiva.model.ArtifactReference;
 import org.apache.maven.archiva.model.VersionedReference;
 import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
@@ -128,16 +126,6 @@
         this.dao = (ArchivaDAO) lookup( ArchivaDAO.class.getName(), "jdo" );
     }
 
-    protected TestDatabaseUnprocessedConsumer lookupTestUnprocessedConsumer()
-        throws Exception
-    {
-        TestDatabaseUnprocessedConsumer consumer = (TestDatabaseUnprocessedConsumer) lookup(
-                                                                                             DatabaseUnprocessedArtifactConsumer.class,
-                                                                                             "test-db-unprocessed" );
-        assertNotNull( "Test Database Unprocessed Consumer should not be null.", consumer );
-        return consumer;
-    }
-
     protected Date toDate( String txt )
         throws Exception
     {

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAOTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAOTest.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAOTest.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAOTest.java Wed Dec  2 02:33:02 2009
@@ -32,7 +32,6 @@
     public void testSubDAOs()
     {
         assertNotNull( "Artifact DAO", dao.getArtifactDAO() );
-        assertNotNull( "Project Model DAO", dao.getProjectModelDAO() );
         assertNotNull( "Repository Problem DAO", dao.getRepositoryProblemDAO() );
     }
 }

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/resources/META-INF/plexus/components.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/resources/META-INF/plexus/components.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/resources/META-INF/plexus/components.xml Wed Dec  2 02:33:02 2009
@@ -14,12 +14,6 @@
         </otherProperties>
       </configuration>
     </component>
-    
-    <component>
-      <role>org.apache.maven.archiva.database.updater.DatabaseUnprocessedArtifactConsumer</role>
-      <role-hint>test-db-unprocessed</role-hint>
-      <implementation>org.apache.maven.archiva.database.updater.TestDatabaseUnprocessedConsumer</implementation>
-    </component>
   </components>
 </component-set>
 

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/pom.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/pom.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/pom.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/pom.xml Wed Dec  2 02:33:02 2009
@@ -31,7 +31,6 @@
   <modules>
     <module>archiva-scheduler-api</module>
     <module>archiva-scheduler-indexing</module>
-    <module>archiva-scheduler-database</module>
     <module>archiva-scheduler-repository</module>
   </modules>
-</project>
\ No newline at end of file
+</project>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/pom.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/pom.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/pom.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/pom.xml Wed Dec  2 02:33:02 2009
@@ -39,10 +39,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
-      <artifactId>archiva-scheduler-database</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-indexer</artifactId>
     </dependency>
     <dependency>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/DeleteArtifactAction.java Wed Dec  2 02:33:02 2009
@@ -40,7 +40,6 @@
 import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.database.ArtifactDAO;
 import org.apache.maven.archiva.database.constraints.ArtifactVersionsConstraint;
-import org.apache.maven.archiva.database.updater.DatabaseConsumers;
 import org.apache.maven.archiva.model.ArchivaArtifact;
 import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
 import org.apache.maven.archiva.model.VersionedReference;
@@ -115,11 +114,6 @@
      */
     private ArtifactDAO artifactDAO;
 
-    /**
-     * @plexus.requirement 
-     */
-    private DatabaseConsumers databaseConsumers;
-
     /** @plexus.requirement role="org.apache.maven.archiva.repository.events.RepositoryListener" */
     private List<RepositoryListener> listeners;
 

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java Wed Dec  2 02:33:02 2009
@@ -19,8 +19,6 @@
  * under the License.
  */
 
-import org.apache.archiva.scheduler.database.DatabaseArchivaTaskScheduler;
-import org.apache.archiva.scheduler.database.DatabaseTask;
 import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler;
 import org.apache.archiva.scheduler.repository.RepositoryTask;
 import org.apache.commons.lang.StringUtils;
@@ -46,11 +44,6 @@
      */
     private RepositoryArchivaTaskScheduler repositoryTaskScheduler;
 
-    /**
-     * @plexus.requirement role="org.apache.archiva.scheduler.ArchivaTaskScheduler" role-hint="database"
-     */
-    private DatabaseArchivaTaskScheduler databaseTaskScheduler;
-
     private String repoid;
     
     private boolean scanAll;
@@ -89,32 +82,6 @@
         return SUCCESS;
     }
 
-    public String updateDatabase()
-    {
-        log.info( "Queueing database task on request from user interface" );
-        DatabaseTask task = new DatabaseTask();
-
-        if ( databaseTaskScheduler.isProcessingDatabaseTask() )
-        {
-            addActionError( "Database task was already queued." );
-        }
-        else
-        {
-            try
-            {
-                databaseTaskScheduler.queueTask( task );
-                addActionMessage( "Your request to update the database has been queued." );
-            }
-            catch ( TaskQueueException e )
-            {
-                addActionError( "Unable to queue your request to update the database: " + e.getMessage() );
-            }
-        }
-
-        // Return to the database screen.
-        return SUCCESS;
-    }
-
     @Override
     public void addActionMessage( String aMessage )
     {

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java Wed Dec  2 02:33:02 2009
@@ -19,12 +19,15 @@
  * under the License.
  */
 
-import com.opensymphony.xwork2.Preparable;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
 
+import com.opensymphony.xwork2.Preparable;
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.configuration.Configuration;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
-
+import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
 import org.apache.maven.archiva.database.ArchivaDAO;
 import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.database.Constraint;
@@ -32,18 +35,10 @@
 import org.apache.maven.archiva.database.constraints.ArtifactsByRepositoryConstraint;
 import org.apache.maven.archiva.database.constraints.RepositoryContentStatisticsByRepositoryConstraint;
 import org.apache.maven.archiva.model.ArchivaArtifact;
-import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.model.RepositoryContentStatistics;
 import org.apache.maven.archiva.repository.audit.AuditEvent;
-
-import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
-
 import org.codehaus.plexus.redback.role.RoleManagerException;
 
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
 /**
  * DeleteManagedRepositoryAction
  * 
@@ -182,11 +177,6 @@
             {
                 archivaDAO.getArtifactDAO().deleteArtifact( artifact );
 
-                ArchivaProjectModel projectModel =
-                    archivaDAO.getProjectModelDAO().getProjectModel( artifact.getGroupId(), artifact.getArtifactId(),
-                                                                     artifact.getVersion() );
-
-                archivaDAO.getProjectModelDAO().deleteProjectModel( projectModel );
             }
             catch ( ObjectNotFoundException oe )
             {

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java Wed Dec  2 02:33:02 2009
@@ -23,7 +23,6 @@
 import javax.servlet.ServletContextListener;
 
 import org.apache.archiva.scheduler.ArchivaTaskScheduler;
-import org.apache.archiva.scheduler.database.DatabaseArchivaTaskScheduler;
 import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler;
 import org.apache.maven.archiva.common.ArchivaException;
 import org.codehaus.plexus.spring.PlexusToSpringUtils;
@@ -48,21 +47,14 @@
 
         SecuritySynchronization securitySync =
             (SecuritySynchronization) wac.getBean( PlexusToSpringUtils.buildSpringId( SecuritySynchronization.class ) );
-        ResolverFactoryInit resolverFactory =
-            (ResolverFactoryInit) wac.getBean( PlexusToSpringUtils.buildSpringId( ResolverFactoryInit.class ) );
-        DatabaseArchivaTaskScheduler databaseTaskScheduler = (DatabaseArchivaTaskScheduler) wac.getBean(
-            PlexusToSpringUtils.buildSpringId( ArchivaTaskScheduler.class, "database" ) );
         RepositoryArchivaTaskScheduler repositoryTaskScheduler = (RepositoryArchivaTaskScheduler) wac.getBean(
             PlexusToSpringUtils.buildSpringId( ArchivaTaskScheduler.class, "repository" ) );
-        wac.getBean( PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "database-update" ) );
         wac.getBean( PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "repository-scanning" ) );
         wac.getBean( PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "indexing" ) );
 
         try
         {
             securitySync.startup();
-            resolverFactory.startup();
-            databaseTaskScheduler.startup();
             repositoryTaskScheduler.startup();
             Banner.display();
         }

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml Wed Dec  2 02:33:02 2009
@@ -440,19 +440,6 @@
       </result>
     </action>
 
-    <!-- .\ DATABASE \.________________________________________________ -->
-
-    <action name="database" class="databaseAction" method="input">
-      <result name="input">/WEB-INF/jsp/admin/database.jsp</result>
-      <result name="success" type="redirect-action">
-        <param name="actionName">database</param>
-      </result>
-    </action>
-
-    <action name="updateDatabase" class="schedulerAction" method="updateDatabase">
-      <result type="redirect-action">database</result>
-    </action>
-
     <!-- .\ CONFIGURATION \.___________________________________________ -->
 
     <action name="configureAppearance" class="organisationInfo">

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml Wed Dec  2 02:33:02 2009
@@ -51,10 +51,8 @@
   <bean name="administrationService" lazy-init="true" scope="singleton" class="org.apache.archiva.web.xmlrpc.services.AdministrationServiceImpl">
     <constructor-arg ref="archivaConfiguration"/>
     <constructor-arg ref="repositoryContentConsumers"/>
-    <constructor-arg ref="databaseConsumers"/>
     <constructor-arg ref="repositoryContentFactory"/>
     <constructor-arg ref="artifactDAO#jdo"/>
-    <constructor-arg ref="archivaTaskScheduler#database"/>
     <constructor-arg ref="archivaTaskScheduler#repository"/>
     <constructor-arg>
       <bean class="org.apache.maven.archiva.repository.events.RepositoryListenerFactoryBean" />

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp Wed Dec  2 02:33:02 2009
@@ -24,8 +24,8 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
-<%@ page import="org.apache.maven.archiva.web.startup.ArchivaVersion" %>
 <%@ page import="java.util.Calendar" %>
+<%@ page import="org.apache.maven.archiva.web.startup.ArchivaVersion" %>
 
 <html>
 <head>
@@ -141,9 +141,6 @@
         <li class="none">
           <my:currentWWUrl action="repositoryScanning" namespace="/admin">Repository Scanning</my:currentWWUrl>
         </li>
-        <li class="none">
-          <my:currentWWUrl action="database" namespace="/admin">Database</my:currentWWUrl>
-        </li>
           <%-- TODO: future options here.
                * Repository Syncing Connectors. (rsync, ftp, scp, etc...)
                * Web Services (enable / disable), role based?

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoryArchivaDAOStub.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoryArchivaDAOStub.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoryArchivaDAOStub.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoryArchivaDAOStub.java Wed Dec  2 02:33:02 2009
@@ -24,7 +24,6 @@
 
 import org.apache.maven.archiva.database.ArchivaDAO;
 import org.apache.maven.archiva.database.ArtifactDAO;
-import org.apache.maven.archiva.database.ProjectModelDAO;
 import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO;
 import org.apache.maven.archiva.database.RepositoryProblemDAO;
 import org.apache.maven.archiva.database.SimpleConstraint;
@@ -41,11 +40,6 @@
     /**
      * @plexus.requirement role-hint="jdo"
      */
-    private ProjectModelDAO projectModelDAO;
-
-    /**
-     * @plexus.requirement role-hint="jdo"
-     */
     private ArtifactDAO artifactDAO;
 
     /**
@@ -68,11 +62,6 @@
         return artifactDAO;
     }
 
-    public ProjectModelDAO getProjectModelDAO()
-    {
-        return projectModelDAO;
-    }
-
     public RepositoryProblemDAO getRepositoryProblemDAO()
     {
         throw new UnsupportedOperationException( "query not implemented for stub" );

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java Wed Dec  2 02:33:02 2009
@@ -8,7 +8,6 @@
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.database.ArchivaDAO;
 import org.apache.maven.archiva.database.ArtifactDAO;
-import org.apache.maven.archiva.database.ProjectModelDAO;
 import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO;
 import org.apache.maven.archiva.database.RepositoryProblemDAO;
 import org.apache.maven.archiva.database.SimpleConstraint;
@@ -48,8 +47,6 @@
 
     private ArtifactDAO artifactDao;
 
-    private ProjectModelDAO projectDao;
-
     private List<String> versions;
 
     private List<String> groups;
@@ -95,11 +92,6 @@
         return artifactDao;
     }
 
-    public ProjectModelDAO getProjectModelDAO()
-    {
-        return projectDao;
-    }
-
     public RepositoryProblemDAO getRepositoryProblemDAO()
     {
         throw new UnsupportedOperationException( "method not implemented for stub" );
@@ -115,11 +107,6 @@
         this.artifactDao = artifactDao;
     }
 
-    public void setProjectDao( ProjectModelDAO projectDao )
-    {
-        this.projectDao = projectDao;
-    }
-
     public void setVersions( List<String> versions )
     {
         this.versions = versions;

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java Wed Dec  2 02:33:02 2009
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 import com.opensymphony.xwork2.Action;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.Configuration;
@@ -27,21 +32,15 @@
 import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
 import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
 import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration;
-import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.plexus.redback.role.RoleManagerException;
-import org.codehaus.redback.integration.interceptor.SecureActionBundle;
-import org.codehaus.redback.integration.interceptor.SecureActionException;
 import org.codehaus.plexus.registry.RegistryException;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
+import org.codehaus.redback.integration.interceptor.SecureActionBundle;
+import org.codehaus.redback.integration.interceptor.SecureActionException;
 import org.easymock.MockControl;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
 /**
  * DeleteManagedRepositoryActionTest 
  *
@@ -319,14 +318,4 @@
         roleManager.removeTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID );
         roleManagerControl.replay();
     }
-    
-    protected ArchivaProjectModel createProjectModel( String groupId, String artifactId, String version )
-    {
-        ArchivaProjectModel projectModel = new ArchivaProjectModel();
-        projectModel.setGroupId( groupId );
-        projectModel.setArtifactId( artifactId );
-        projectModel.setVersion( version );
-
-        return projectModel;
-    }   
 }

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/DeleteArtifactActionTest.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/DeleteArtifactActionTest.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/DeleteArtifactActionTest.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/DeleteArtifactActionTest.xml Wed Dec  2 02:33:02 2009
@@ -36,11 +36,6 @@
       <implementation>org.apache.maven.archiva.web.action.admin.repositories.RepositoryProblemDAOStub</implementation>
     </component>
     <component>
-      <role>org.apache.maven.archiva.database.ProjectModelDAO</role>
-      <role-hint>jdo</role-hint>
-      <implementation>org.apache.maven.archiva.web.action.admin.repositories.ProjectModelDAOStub</implementation>
-    </component>
-    <component>
       <role>org.apache.maven.archiva.database.ArtifactDAO</role>
       <role-hint>jdo</role-hint>
       <implementation>org.apache.maven.archiva.web.action.admin.repositories.ArtifactDAOStub</implementation>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml Wed Dec  2 02:33:02 2009
@@ -61,11 +61,6 @@
           <field-name>artifactDAO</field-name>
         </requirement>
         <requirement>
-          <role>org.apache.maven.archiva.database.ProjectModelDAO</role>
-          <role-hint>jdo</role-hint>
-          <field-name>projectModelDAO</field-name>
-        </requirement>
-        <requirement>
           <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role>
           <role-hint>jdo</role-hint>
           <field-name>repoContentStatisticsDAO</field-name>
@@ -78,11 +73,6 @@
       <implementation>org.apache.maven.archiva.web.action.admin.repositories.ArtifactDAOStub</implementation>
     </component>        
     <component>
-      <role>org.apache.maven.archiva.database.ProjectModelDAO</role>
-      <role-hint>jdo</role-hint>
-      <implementation>org.apache.maven.archiva.web.action.admin.repositories.ProjectModelDAOStub</implementation>
-    </component>   
-    <component>
       <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role>
       <role-hint>jdo</role-hint>
       <implementation>org.apache.maven.archiva.web.action.admin.repositories.RepositoryContentStatisticsDAOStub</implementation>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml Wed Dec  2 02:33:02 2009
@@ -48,11 +48,6 @@
       		<field-name>artifactDAO</field-name>
       	</requirement>
       	<requirement>
-      		<role>org.apache.maven.archiva.database.ProjectModelDAO</role>
-      		<role-hint>jdo</role-hint>
-      		<field-name>projectModelDAO</field-name>
-      	</requirement>
-      	<requirement>
       		<role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role>
       		<role-hint>jdo</role-hint>
       		<field-name>repoContentStatisticsDAO</field-name>
@@ -65,11 +60,6 @@
       <implementation>org.apache.maven.archiva.web.action.admin.repositories.ArtifactDAOStub</implementation>
     </component>        
     <component>
-      <role>org.apache.maven.archiva.database.ProjectModelDAO</role>
-      <role-hint>jdo</role-hint>
-      <implementation>org.apache.maven.archiva.web.action.admin.repositories.ProjectModelDAOStub</implementation>
-    </component>   
-    <component>
       <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role>
       <role-hint>jdo</role-hint>
       <implementation>org.apache.maven.archiva.web.action.admin.repositories.RepositoryContentStatisticsDAOStub</implementation>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java Wed Dec  2 02:33:02 2009
@@ -21,11 +21,10 @@
 
 import java.util.List;
 
+import com.atlassian.xmlrpc.ServiceObject;
 import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
 import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
 
-import com.atlassian.xmlrpc.ServiceObject;
-
 @ServiceObject( "AdministrationService" )
 public interface AdministrationService
 {    
@@ -37,30 +36,6 @@
      * @throws Exception
      */
     public Boolean executeRepositoryScanner( String repoId ) throws Exception;
-   
-    /**
-     * Executes the database scanner.
-     * 
-     * @return
-     * @throws Exception
-     */
-    public Boolean executeDatabaseScanner() throws Exception;
-
-    /**
-     * Gets all available database consumers.
-     * @return
-     */
-    public List<String> getAllDatabaseConsumers();
-   
-    /**
-     * Configures (enable or disable) database consumer.
-     * 
-     * @param consumerId id of the database consumer
-     * @param enable flag whether to enable or disable the specified consumer
-     * @return
-     * @throws Exception
-     */
-    public Boolean configureDatabaseConsumer( String consumerId, boolean enable ) throws Exception;
 
     /**
      * Gets all available repository consumers.

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java Wed Dec  2 02:33:02 2009
@@ -22,15 +22,14 @@
 import java.net.URL;
 import java.util.List;
 
-import org.apache.archiva.web.xmlrpc.api.AdministrationService;
-import org.apache.archiva.web.xmlrpc.api.PingService;
-import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
-import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
-
 import com.atlassian.xmlrpc.AuthenticationInfo;
 import com.atlassian.xmlrpc.Binder;
 import com.atlassian.xmlrpc.BindingException;
 import com.atlassian.xmlrpc.DefaultBinder;
+import org.apache.archiva.web.xmlrpc.api.AdministrationService;
+import org.apache.archiva.web.xmlrpc.api.PingService;
+import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
+import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
 
 /**
  * TestClient
@@ -92,28 +91,14 @@
                 System.out.println( consumer );
             }
             
-            System.out.println( "\n******** Database Consumers ********" );
-            List<String> dbConsumers = adminService.getAllDatabaseConsumers();
-            for( String consumer : dbConsumers )
-            {
-                System.out.println( consumer );
-            }
-            
             Boolean success = adminService.configureRepositoryConsumer( "internal", "repository-purge", true );
             System.out.println( "\nConfigured repo consumer 'repository-purge' : " +
                 ( (Boolean) success ).booleanValue() );
             
-            success = adminService.configureDatabaseConsumer( "update-db-bytecode-stats", false );
-            System.out.println( "\nConfigured db consumer 'update-db-bytecode-stats' : " +
-                ( (Boolean) success ).booleanValue() );
-            
             success = adminService.executeRepositoryScanner( "internal" );
             System.out.println( "\nExecuted repo scanner of repository 'internal' : " +
                 ( (Boolean) success ).booleanValue() );
             
-            success = adminService.executeDatabaseScanner();
-            System.out.println( "\nExecuted database scanner : " + ( (Boolean) success ).booleanValue() );
-           
             /* delete artifact */
             /* 
              * NOTE: before enabling & invoking deleteArtifact, make sure that the repository and artifact exists first!

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml Wed Dec  2 02:33:02 2009
@@ -60,10 +60,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
-      <artifactId>archiva-scheduler-database</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-security</artifactId>
     </dependency>
     <dependency>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java Wed Dec  2 02:33:02 2009
@@ -24,8 +24,6 @@
 import java.util.List;
 
 import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
-import org.apache.archiva.scheduler.database.DatabaseArchivaTaskScheduler;
-import org.apache.archiva.scheduler.database.DatabaseTask;
 import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler;
 import org.apache.archiva.scheduler.repository.RepositoryTask;
 import org.apache.archiva.web.xmlrpc.api.AdministrationService;
@@ -33,7 +31,6 @@
 import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.Configuration;
-import org.apache.maven.archiva.configuration.DatabaseScanningConfiguration;
 import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
@@ -43,8 +40,6 @@
 import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.database.ArtifactDAO;
 import org.apache.maven.archiva.database.constraints.ArtifactVersionsConstraint;
-import org.apache.maven.archiva.database.updater.DatabaseConsumers;
-import org.apache.maven.archiva.database.updater.DatabaseUnprocessedArtifactConsumer;
 import org.apache.maven.archiva.model.ArchivaArtifact;
 import org.apache.maven.archiva.model.VersionedReference;
 import org.apache.maven.archiva.repository.ContentNotFoundException;
@@ -71,70 +66,28 @@
 
     private RepositoryContentConsumers repoConsumersUtil;
 
-    private DatabaseConsumers dbConsumersUtil;
-
     private RepositoryContentFactory repoFactory;
 
     private ArtifactDAO artifactDAO;
 
-    private DatabaseArchivaTaskScheduler databaseTaskScheduler;
-
     private RepositoryArchivaTaskScheduler repositoryTaskScheduler;
 
     private Collection<RepositoryListener> listeners;
 
     public AdministrationServiceImpl( ArchivaConfiguration archivaConfig, RepositoryContentConsumers repoConsumersUtil,
-                                      DatabaseConsumers dbConsumersUtil, RepositoryContentFactory repoFactory,
-                                      ArtifactDAO artifactDAO, DatabaseArchivaTaskScheduler databaseTaskScheduler,
+                                      RepositoryContentFactory repoFactory, ArtifactDAO artifactDAO,
                                       RepositoryArchivaTaskScheduler repositoryTaskScheduler,
                                       Collection<RepositoryListener> listeners )
     {
         this.archivaConfiguration = archivaConfig;
         this.repoConsumersUtil = repoConsumersUtil;
-        this.dbConsumersUtil = dbConsumersUtil;
         this.repoFactory = repoFactory;
         this.artifactDAO = artifactDAO;
-        this.databaseTaskScheduler = databaseTaskScheduler;
         this.repositoryTaskScheduler = repositoryTaskScheduler;
         this.listeners = listeners;
     }
 
     /**
-     * @see AdministrationService#configureDatabaseConsumer(String, boolean)
-     */
-    public Boolean configureDatabaseConsumer( String consumerId, boolean enable ) throws Exception
-    {
-        List<DatabaseUnprocessedArtifactConsumer> unprocessedConsumers =
-            dbConsumersUtil.getAvailableUnprocessedConsumers();
-
-        boolean found = false;
-
-        for( DatabaseUnprocessedArtifactConsumer consumer : unprocessedConsumers )
-        {
-            if( consumer.getId().equals( consumerId ) )
-            {
-                found = true;
-                break;
-            }
-        }
-
-        if( !found )
-        {
-            throw new Exception( "Invalid database consumer." );
-        }
-
-        Configuration config = archivaConfiguration.getConfiguration();
-        DatabaseScanningConfiguration dbScanningConfig = config.getDatabaseScanning();
-
-        dbScanningConfig.addUnprocessedConsumer( consumerId );
-
-        config.setDatabaseScanning( dbScanningConfig );
-        saveConfiguration( config );
-
-        return new Boolean( true );
-    }
-
-    /**
      * @see AdministrationService#configureRepositoryConsumer(String, String, boolean)
      */
     public Boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable )
@@ -260,24 +213,6 @@
     }
 
     /**
-     * @see AdministrationService#executeDatabaseScanner()
-     */
-    public Boolean executeDatabaseScanner() throws Exception
-    {
-        if ( databaseTaskScheduler.isProcessingDatabaseTask() )
-        {
-            return false;
-        }
-
-        log.info( "Queueing database task on request from administration service" );
-        DatabaseTask task = new DatabaseTask();
-
-        databaseTaskScheduler.queueTask( task );
-
-        return new Boolean( true );
-    }
-
-    /**
      * @see AdministrationService#executeRepositoryScanner(String)
      */
     public Boolean executeRepositoryScanner( String repoId ) throws Exception
@@ -302,23 +237,6 @@
     }
 
     /**
-     * @see AdministrationService#getAllDatabaseConsumers()
-     */
-    public List<String> getAllDatabaseConsumers()
-    {
-        List<String> consumers = new ArrayList<String>();
-
-        List<DatabaseUnprocessedArtifactConsumer> unprocessedConsumers = dbConsumersUtil.getAvailableUnprocessedConsumers();
-
-        for( DatabaseUnprocessedArtifactConsumer consumer : unprocessedConsumers )
-        {
-            consumers.add( consumer.getId() );
-        }
-
-        return consumers;
-    }
-
-    /**
      * @see AdministrationService#getAllRepositoryConsumers()
      */
     public List<String> getAllRepositoryConsumers()

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java Wed Dec  2 02:33:02 2009
@@ -26,8 +26,6 @@
 import java.util.List;
 
 import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
-import org.apache.archiva.scheduler.database.DatabaseArchivaTaskScheduler;
-import org.apache.archiva.scheduler.database.DatabaseTask;
 import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler;
 import org.apache.archiva.scheduler.repository.RepositoryTask;
 import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
@@ -36,7 +34,6 @@
 import org.apache.commons.io.filefilter.FileFilterUtils;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.Configuration;
-import org.apache.maven.archiva.configuration.DatabaseScanningConfiguration;
 import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
@@ -44,8 +41,6 @@
 import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
 import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
 import org.apache.maven.archiva.database.ArtifactDAO;
-import org.apache.maven.archiva.database.updater.DatabaseConsumers;
-import org.apache.maven.archiva.database.updater.DatabaseUnprocessedArtifactConsumer;
 import org.apache.maven.archiva.model.ArchivaArtifact;
 import org.apache.maven.archiva.model.ArchivaArtifactModel;
 import org.apache.maven.archiva.model.ArtifactReference;
@@ -83,8 +78,6 @@
     
     private RepositoryArchivaTaskScheduler repositoryTaskScheduler;
     
-    private DatabaseArchivaTaskScheduler databaseTaskScheduler;
-
     // repository consumers
     private MockControl repoConsumerUtilsControl;
     
@@ -102,18 +95,7 @@
 
     private InvalidRepositoryContentConsumer checkMetadataConsumer;
     
-    // database consumers
-    private MockControl dbConsumersUtilControl;
-    
-    private DatabaseConsumers dbConsumersUtil;
-    
-    private MockControl unprocessedConsumersControl;
-    
-    private DatabaseUnprocessedArtifactConsumer processArtifactConsumer;
-    
-    private DatabaseUnprocessedArtifactConsumer processPomConsumer;
-    
-    // delete artifact    
+    // delete artifact
     private MockControl repoFactoryControl;
     
     private RepositoryContentFactory repositoryFactory;
@@ -139,9 +121,6 @@
         configControl = MockClassControl.createControl( Configuration.class );
         config = ( Configuration ) configControl.getMock();      
         
-        databaseTaskSchedulerControl = MockClassControl.createControl( DatabaseArchivaTaskScheduler.class );
-        databaseTaskScheduler = (DatabaseArchivaTaskScheduler) databaseTaskSchedulerControl.getMock();
-        
         repositoryTaskSchedulerControl = MockClassControl.createControl( RepositoryArchivaTaskScheduler.class );
         repositoryTaskScheduler = (RepositoryArchivaTaskScheduler) repositoryTaskSchedulerControl.getMock();
 
@@ -157,14 +136,6 @@
         checkPomConsumer = ( InvalidRepositoryContentConsumer ) invalidContentConsumerControl.getMock();
         checkMetadataConsumer = ( InvalidRepositoryContentConsumer ) invalidContentConsumerControl.getMock();
         
-        // db consumers
-        dbConsumersUtilControl = MockClassControl.createControl( DatabaseConsumers.class );
-        dbConsumersUtil = ( DatabaseConsumers ) dbConsumersUtilControl.getMock();
-                
-        unprocessedConsumersControl = MockControl.createControl( DatabaseUnprocessedArtifactConsumer.class );
-        processArtifactConsumer = ( DatabaseUnprocessedArtifactConsumer ) unprocessedConsumersControl.getMock();
-        processPomConsumer = ( DatabaseUnprocessedArtifactConsumer ) unprocessedConsumersControl.getMock();
-        
         // delete artifact
         repoFactoryControl = MockClassControl.createControl( RepositoryContentFactory.class );
         repositoryFactory = ( RepositoryContentFactory ) repoFactoryControl.getMock();
@@ -176,137 +147,12 @@
         listener = (RepositoryListener) listenerControl.getMock();
         
         service =
-            new AdministrationServiceImpl( archivaConfig, repoConsumersUtil, dbConsumersUtil, repositoryFactory,
-                                           artifactDao, databaseTaskScheduler, repositoryTaskScheduler,
+            new AdministrationServiceImpl( archivaConfig, repoConsumersUtil, repositoryFactory,
+                                           artifactDao, repositoryTaskScheduler,
                                            Collections.singletonList( listener ) );
     }
   
-/* Tests for database consumers  */
-    
-    public void testGetAllDbConsumers()
-        throws Exception
-    {   
-        recordDbConsumers();
-        
-        dbConsumersUtilControl.replay();
-        unprocessedConsumersControl.replay();
-        
-        List<String> dbConsumers = service.getAllDatabaseConsumers();
-        
-        dbConsumersUtilControl.verify();
-        unprocessedConsumersControl.verify();
-        
-        assertNotNull( dbConsumers );
-        assertEquals( 2, dbConsumers.size() );
-        assertTrue( dbConsumers.contains( "process-artifact" ) );
-        assertTrue( dbConsumers.contains( "process-pom" ) );
-    }
-    
-    public void testConfigureValidDatabaseConsumer()
-        throws Exception
-    {
-        DatabaseScanningConfiguration dbScanning = new DatabaseScanningConfiguration();
-        dbScanning.addCleanupConsumer( "cleanup-index" );
-        dbScanning.addCleanupConsumer( "cleanup-database" );
-        dbScanning.addUnprocessedConsumer( "process-artifact" );
-        
-        recordDbConsumers();
-        
-        // test enable "process-pom" db consumer
-        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
-        configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
-        
-        config.setDatabaseScanning( dbScanning );
-        configControl.setMatcher( MockControl.ALWAYS_MATCHER );
-        configControl.setVoidCallable();
-        
-        archivaConfig.save( config );
-        archivaConfigControl.setVoidCallable();
-        
-        dbConsumersUtilControl.replay();
-        unprocessedConsumersControl.replay();
-        archivaConfigControl.replay();
-        configControl.replay();
-        
-        try
-        {
-            boolean success = service.configureDatabaseConsumer( "process-pom", true );
-            assertTrue( success );
-        }
-        catch ( Exception e )
-        {
-            fail( "An exception should not have been thrown." );
-        }
-        
-        dbConsumersUtilControl.verify();
-        unprocessedConsumersControl.verify();
-        archivaConfigControl.verify();
-        configControl.verify();
-                
-        // test disable "process-pom" db consumer        
-        dbConsumersUtilControl.reset();
-        unprocessedConsumersControl.reset();
-        archivaConfigControl.reset();
-        configControl.reset();
-                
-        dbScanning.addUnprocessedConsumer( "process-pom" );
-        
-        recordDbConsumers();
-        
-        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
-        configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
-        
-        config.setDatabaseScanning( dbScanning );
-        configControl.setMatcher( MockControl.ALWAYS_MATCHER );
-        configControl.setVoidCallable();
-        
-        archivaConfig.save( config );
-        archivaConfigControl.setVoidCallable();
-        
-        dbConsumersUtilControl.replay();
-        unprocessedConsumersControl.replay();
-        archivaConfigControl.replay();
-        configControl.replay();
-        
-        try
-        {
-            boolean success = service.configureDatabaseConsumer( "process-pom", false );
-            assertTrue( success );
-        }
-        catch ( Exception e )
-        {
-            fail( "An exception should not have been thrown." );
-        }
-        
-        dbConsumersUtilControl.verify();
-        unprocessedConsumersControl.verify();
-        archivaConfigControl.verify();
-        configControl.verify();
-    }
-    
-    public void testConfigureInvalidDatabaseConsumer()
-        throws Exception
-    {
-        recordDbConsumers();
-        
-        dbConsumersUtilControl.replay();
-        unprocessedConsumersControl.replay();
-        
-        try
-        {
-            service.configureDatabaseConsumer( "invalid-consumer", true );
-            fail( "An exception should have been thrown." );
-        }
-        catch ( Exception e )
-        {
-            assertEquals( "Invalid database consumer.", e.getMessage() );
-        }
-        
-        dbConsumersUtilControl.verify();
-        unprocessedConsumersControl.verify();
-    }
-        
-/* Tests for repository consumers  */
+    /* Tests for repository consumers  */
     
     public void testGetAllRepoConsumers()
         throws Exception
@@ -707,43 +553,7 @@
         configControl.verify();
     }
     
-/* Tests for db scanning  */
-    
-    public void testExecuteDbScannerDbNotBeingScanned()
-        throws Exception
-    {
-        DatabaseTask task = new DatabaseTask();
-        
-        databaseTaskSchedulerControl.expectAndReturn( databaseTaskScheduler.isProcessingDatabaseTask(), false );
-                
-        databaseTaskScheduler.queueTask( task );
-        databaseTaskSchedulerControl.setMatcher( MockControl.ALWAYS_MATCHER );
-        databaseTaskSchedulerControl.setVoidCallable();
-        
-        databaseTaskSchedulerControl.replay();
-
-        boolean success = service.executeDatabaseScanner();
-        
-        databaseTaskSchedulerControl.verify();
-        
-        assertTrue( success );
-    }
-    
-    public void testExecuteDbScannerDbIsBeingScanned()
-        throws Exception
-    {        
-        databaseTaskSchedulerControl.expectAndReturn( databaseTaskScheduler.isProcessingDatabaseTask(), true );
-                
-        databaseTaskSchedulerControl.replay();
-
-        boolean success = service.executeDatabaseScanner();
-        
-        databaseTaskSchedulerControl.verify();        
-        
-        assertFalse( success );
-    }
-     
-/* Tests for querying repositories  */
+    /* Tests for querying repositories  */
     
     public void testGetAllManagedRepositories()
         throws Exception
@@ -859,19 +669,7 @@
         invalidContentConsumerControl.expectAndReturn( checkPomConsumer.getId(), "check-pom" );
         invalidContentConsumerControl.expectAndReturn( checkMetadataConsumer.getId(), "check-metadata" );
     }
-    
-    private void recordDbConsumers()
-    {
-        List<DatabaseUnprocessedArtifactConsumer> unprocessedConsumers =
-            new ArrayList<DatabaseUnprocessedArtifactConsumer>();
-        unprocessedConsumers.add( processArtifactConsumer );
-        unprocessedConsumers.add( processPomConsumer );
-        
-        dbConsumersUtilControl.expectAndReturn( dbConsumersUtil.getAvailableUnprocessedConsumers(), unprocessedConsumers );
-        unprocessedConsumersControl.expectAndReturn( processArtifactConsumer.getId(), "process-artifact" );
-        unprocessedConsumersControl.expectAndReturn( processPomConsumer.getId(), "process-pom" );
-    }    
-    
+
     private void recordInManagedLegacyRepoContent( MockControl fileTypesControl, FileTypes fileTypes,
                                                    MockControl pathParserControl, PathParser parser )
         throws LayoutException
@@ -936,4 +734,4 @@
         
         return aRef;
     }
-}
\ No newline at end of file
+}

Modified: archiva/branches/MRM-1025/pom.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/pom.xml?rev=886037&r1=886036&r2=886037&view=diff
==============================================================================
--- archiva/branches/MRM-1025/pom.xml (original)
+++ archiva/branches/MRM-1025/pom.xml Wed Dec  2 02:33:02 2009
@@ -350,11 +350,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.archiva</groupId>
-        <artifactId>archiva-dependency-graph</artifactId>
-        <version>1.3-SNAPSHOT</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.archiva</groupId>
         <artifactId>archiva-core-consumers</artifactId>
         <version>1.3-SNAPSHOT</version>
       </dependency>
@@ -420,11 +415,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.archiva</groupId>
-        <artifactId>archiva-scheduler-database</artifactId>
-        <version>1.3-SNAPSHOT</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.archiva</groupId>
         <artifactId>archiva-scheduler-indexing</artifactId>
         <version>1.3-SNAPSHOT</version>
       </dependency>



Mime
View raw message