1 package org.apache.maven.archiva.database.updater;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import java.util.ArrayList;
23 import java.util.List;
25 import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
26 import org.apache.maven.archiva.consumers.ConsumerException;
27 import org.apache.maven.archiva.model.ArchivaArtifact;
28 import org.slf4j.Logger;
29 import org.slf4j.LoggerFactory;
32 * TestDatabaseUnprocessedConsumer
36 public class TestDatabaseUnprocessedConsumer
37 extends AbstractMonitoredConsumer
38 implements DatabaseUnprocessedArtifactConsumer
40 private Logger log = LoggerFactory.getLogger( TestDatabaseUnprocessedConsumer.class );
42 private int countBegin = 0;
44 private int countComplete = 0;
46 private int countProcessed = 0;
48 public void resetCount()
55 public void beginScan()
60 public void completeScan()
65 public List getIncludedTypes()
67 List types = new ArrayList();
73 public void processArchivaArtifact( ArchivaArtifact artifact )
74 throws ConsumerException
76 log.info( "Processing Artifact: " + artifact );
80 public String getDescription()
82 return "Test Consumer for Database Unprocessed";
87 return "test-db-unprocessed";
90 public boolean isPermanent()
95 public int getCountBegin()
100 public int getCountComplete()
102 return countComplete;
105 public int getCountProcessed()
107 return countProcessed;