1 package org.apache.archiva.rss.stubs;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.archiva.database.ArchivaDatabaseException;
23 import org.apache.maven.archiva.database.ArtifactDAO;
24 import org.apache.maven.archiva.database.Constraint;
25 import org.apache.maven.archiva.database.DeclarativeConstraint;
26 import org.apache.maven.archiva.database.ObjectNotFoundException;
27 import org.apache.maven.archiva.model.ArchivaArtifact;
28
29 import java.util.List;
30
31
32
33
34
35
36 public class ArtifactDAOStub
37 implements ArtifactDAO
38 {
39 private List<ArchivaArtifact> artifacts;
40
41 public ArchivaArtifact createArtifact( String groupId, String artifactId, String version, String classifier,
42 String type, String repositoryId )
43 {
44
45 return null;
46 }
47
48 public void deleteArtifact( ArchivaArtifact artifact )
49 throws ArchivaDatabaseException
50 {
51
52
53 }
54
55 public long countArtifacts( DeclarativeConstraint constraint )
56 {
57 return artifacts.size();
58 }
59
60 public ArchivaArtifact getArtifact( String groupId, String artifactId, String version, String classifier,
61 String type, String repositoryId )
62 throws ObjectNotFoundException, ArchivaDatabaseException
63 {
64
65 return null;
66 }
67
68 public List<ArchivaArtifact> queryArtifacts( Constraint constraint )
69 throws ObjectNotFoundException, ArchivaDatabaseException
70 {
71 return artifacts;
72 }
73
74 public ArchivaArtifact saveArtifact( ArchivaArtifact artifact )
75 throws ArchivaDatabaseException
76 {
77
78 return null;
79 }
80
81 public void setArtifacts( List<ArchivaArtifact> artifacts )
82 {
83 this.artifacts = artifacts;
84 }
85 }