4 package org.apache.maven.archiva.discoverer;
6 import org.apache.maven.archiva.common.consumers.Consumer;
7 import org.apache.maven.archiva.common.consumers.ConsumerException;
8 import org.apache.maven.archiva.common.utils.BaseFile;
9 import org.apache.maven.artifact.repository.ArtifactRepository;
11 import java.util.ArrayList;
12 import java.util.List;
14 public class MockConsumer
17 private List excludePatterns = new ArrayList();
19 private List includePatterns = new ArrayList();
21 private List filesProcessed = new ArrayList();
23 private int countFileProblems = 0;
25 public String getName()
27 return "MockConsumer (Testing Only)";
30 public boolean init( ArtifactRepository repository )
35 public void processFile( BaseFile file )
36 throws ConsumerException
38 filesProcessed.add( file );
41 public void processFileProblem( BaseFile file, String message )
46 public List getExcludePatterns()
48 return excludePatterns;
51 public void setExcludePatterns( List excludePatterns )
53 this.excludePatterns = excludePatterns;
56 public List getIncludePatterns()
58 return includePatterns;
61 public void setIncludePatterns( List includePatterns )
63 this.includePatterns = includePatterns;
66 public int getCountFileProblems()
68 return countFileProblems;
71 public List getFilesProcessed()
73 return filesProcessed;