View Javadoc

1   package org.apache.archiva.rss.stubs;
2   
3   /*
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
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
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
19   * under the License.
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   * ArtifactDAO stub.
33   * 
34   * @version * 
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          // TODO Auto-generated method stub
45          return null;
46      }
47  
48      public void deleteArtifact( ArchivaArtifact artifact )
49          throws ArchivaDatabaseException
50      {
51          // TODO Auto-generated method stub
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          // TODO Auto-generated method stub
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          // TODO Auto-generated method stub
78          return null;
79      }
80  
81      public void setArtifacts( List<ArchivaArtifact> artifacts )
82      {
83          this.artifacts = artifacts;
84      }
85  }