This project has retired. For details please refer to its Attic page.
RepositoryRegistry xref
View Javadoc
1   package org.apache.archiva.repository;
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.archiva.configuration.ArchivaConfiguration;
23  import org.apache.archiva.configuration.Configuration;
24  import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
25  import org.apache.archiva.configuration.RemoteRepositoryConfiguration;
26  import org.apache.archiva.configuration.RepositoryGroupConfiguration;
27  import org.apache.archiva.event.EventSource;
28  import org.apache.archiva.indexer.ArchivaIndexManager;
29  import org.apache.archiva.indexer.IndexUpdateFailedException;
30  
31  import java.util.Collection;
32  
33  /**
34   *  Registry for repositories. This is the central entry point for repositories. It provides methods for
35   *  retrieving, adding and removing repositories.
36   *  <p>
37   *  The modification methods addXX and removeXX persist the changes immediately to the configuration. If the
38   *  configuration save fails the changes are rolled back.
39   *  <p>
40   * @author Martin Stockhammer <martin_s@apache.org>
41   */
42  public interface RepositoryRegistry extends EventSource
43  {
44      void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration );
45  
46      ArchivaIndexManager getIndexManager( RepositoryType type );
47  
48      Collection<Repository> getRepositories( );
49  
50      Collection<ManagedRepository> getManagedRepositories( );
51  
52      Collection<RemoteRepository> getRemoteRepositories( );
53  
54      Collection<RepositoryGroup> getRepositoryGroups( );
55  
56      Repository getRepository( String repoId );
57  
58      ManagedRepository getManagedRepository( String repoId );
59  
60      RemoteRepository getRemoteRepository( String repoId );
61  
62      RepositoryGroup getRepositoryGroup( String groupId );
63  
64      ManagedRepositoryapache/archiva/repository/ManagedRepository.html#ManagedRepository">ManagedRepository putRepository( ManagedRepository managedRepository ) throws RepositoryException;
65  
66      ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration ) throws RepositoryException;
67  
68      ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration, Configuration configuration ) throws RepositoryException;
69  
70      RepositoryGroupche/archiva/repository/RepositoryGroup.html#RepositoryGroup">RepositoryGroup putRepositoryGroup( RepositoryGroup repositoryGroup ) throws RepositoryException;
71  
72      RepositoryGroup putRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration ) throws RepositoryException;
73  
74      RepositoryGroup putRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration, Configuration configuration ) throws RepositoryException;
75  
76      RemoteRepository/apache/archiva/repository/RemoteRepository.html#RemoteRepository">RemoteRepository putRepository( RemoteRepository remoteRepository, Configuration configuration ) throws RepositoryException;
77  
78      RemoteRepository/apache/archiva/repository/RemoteRepository.html#RemoteRepository">RemoteRepository putRepository( RemoteRepository remoteRepository ) throws RepositoryException;
79  
80      RemoteRepository putRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration ) throws RepositoryException;
81  
82      RemoteRepository putRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration, Configuration configuration ) throws RepositoryException;
83  
84      void removeRepository( String repoId ) throws RepositoryException;
85  
86      void removeRepository( Repository repo ) throws RepositoryException;
87  
88      void removeRepository( ManagedRepository managedRepository ) throws RepositoryException;
89  
90      void removeRepository( ManagedRepository managedRepository, Configuration configuration ) throws RepositoryException;
91  
92      void removeRepositoryGroup( RepositoryGroup repositoryGroup ) throws RepositoryException;
93  
94      void removeRepositoryGroup( RepositoryGroup repositoryGroup, Configuration configuration ) throws RepositoryException;
95  
96      void removeRepository( RemoteRepository remoteRepository ) throws RepositoryException;
97  
98      void removeRepository( RemoteRepository remoteRepository, Configuration configuration ) throws RepositoryException;
99  
100     void reload( );
101 
102     void resetIndexingContext( Repository repository ) throws IndexUpdateFailedException;
103 
104     ManagedRepository/../org/apache/archiva/repository/ManagedRepository.html#ManagedRepository">ManagedRepository clone( ManagedRepository repo, String newId ) throws RepositoryException;
105 
106     <T extends Repository> Repository clone( T repo, String newId ) throws RepositoryException;
107 
108     RemoteRepository./../org/apache/archiva/repository/RemoteRepository.html#RemoteRepository">RemoteRepository clone( RemoteRepository repo, String newId ) throws RepositoryException;
109 }