View Javadoc
1   package org.apache.archiva.mock;
2   /*
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   */
20  
21  import org.apache.archiva.admin.model.AuditInformation;
22  import org.apache.archiva.admin.model.RepositoryAdminException;
23  import org.apache.archiva.admin.model.beans.RemoteRepository;
24  import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin;
25  import org.apache.archiva.configuration.ArchivaConfiguration;
26  import org.apache.maven.index.context.IndexingContext;
27  
28  import java.util.List;
29  import java.util.Map;
30  
31  /**
32   * @author Olivier Lamy
33   */
34  public class MockRemoteRepositoryAdmin
35      implements RemoteRepositoryAdmin
36  {
37      private ArchivaConfiguration archivaConfiguration;
38  
39      @Override
40      public List<RemoteRepository> getRemoteRepositories()
41          throws RepositoryAdminException
42      {
43          return null;  //To change body of implemented methods use File | Settings | File Templates.
44      }
45  
46      @Override
47      public RemoteRepository getRemoteRepository( String repositoryId )
48          throws RepositoryAdminException
49      {
50          return null;  //To change body of implemented methods use File | Settings | File Templates.
51      }
52  
53      @Override
54      public Boolean deleteRemoteRepository( String repositoryId, AuditInformation auditInformation )
55          throws RepositoryAdminException
56      {
57          return null;  //To change body of implemented methods use File | Settings | File Templates.
58      }
59  
60      @Override
61      public Boolean addRemoteRepository( RemoteRepository remoteRepository, AuditInformation auditInformation )
62          throws RepositoryAdminException
63      {
64          return null;  //To change body of implemented methods use File | Settings | File Templates.
65      }
66  
67      @Override
68      public Boolean updateRemoteRepository( RemoteRepository remoteRepository, AuditInformation auditInformation )
69          throws RepositoryAdminException
70      {
71          return null;  //To change body of implemented methods use File | Settings | File Templates.
72      }
73  
74      @Override
75      public Map<String, RemoteRepository> getRemoteRepositoriesAsMap()
76          throws RepositoryAdminException
77      {
78          return null;  //To change body of implemented methods use File | Settings | File Templates.
79      }
80  
81      public ArchivaConfiguration getArchivaConfiguration()
82      {
83          return archivaConfiguration;
84      }
85  
86      public void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration )
87      {
88          this.archivaConfiguration = archivaConfiguration;
89      }
90  
91      @Override
92      public IndexingContext createIndexContext( RemoteRepository repository )
93          throws RepositoryAdminException
94      {
95          return null;
96      }
97  }