1 package org.apache.maven.archiva.scheduled;
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.consumers.DatabaseUnprocessedArtifactConsumer;
28 import org.apache.maven.archiva.model.ArchivaArtifact;
29 import org.slf4j.Logger;
30 import org.slf4j.LoggerFactory;
33 * TestDatabaseUnprocessedConsumer
37 public class TestDatabaseUnprocessedConsumer
38 extends AbstractMonitoredConsumer
39 implements DatabaseUnprocessedArtifactConsumer
41 private Logger log = LoggerFactory.getLogger( TestDatabaseUnprocessedConsumer.class );
43 private int countBegin = 0;
45 private int countComplete = 0;
47 private int countProcessed = 0;
49 public void resetCount()
56 public void beginScan()
61 public void completeScan()
66 public List getIncludedTypes()
68 List types = new ArrayList();
74 public void processArchivaArtifact( ArchivaArtifact artifact )
75 throws ConsumerException
77 log.info( "Processing Artifact: " + artifact );
81 public String getDescription()
83 return "Test Consumer for Database Unprocessed";
88 return "test-db-unprocessed";
91 public boolean isPermanent()
96 public int getCountBegin()
101 public int getCountComplete()
103 return countComplete;
106 public int getCountProcessed()
108 return countProcessed;