This project has retired. For details please refer to its Attic page.
RepositoryConnector xref
View Javadoc
1   package org.apache.archiva.repository.connector;
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.repository.ManagedRepository;
23  import org.apache.archiva.repository.RemoteRepository;
24  
25  import java.util.List;
26  
27  /**
28   *
29   * A RepositoryConnector maps a managed repository to a remote repository.
30   *
31   *
32   */
33  public interface RepositoryConnector
34  {
35      /**
36       * Returns the local repository that is connected to the remote.
37       * @return The local managed repository.
38       */
39      ManagedRepository getSourceRepository();
40  
41      /**
42       * Returns the remote repository that is connected to the local.
43       * @return The remote repository.
44       */
45      RemoteRepository getTargetRepository();
46  
47      /**
48       * Returns a list of paths that are not fetched from the remote repository.
49       * @return A list of paths.
50       */
51      List<String> getBlacklist();
52  
53      /**
54       * Returns a list of paths that are fetched from the remote repository, even if a
55       * parent path is in the blacklist.
56       *
57       * @return The list of paths.
58       */
59      List<String> getWhitelist();
60  
61      /**
62       * Returns true, if this connector is enabled, otherwise false.
63       * @return True, if enabled.
64       */
65      boolean isEnabled();
66  
67      /**
68       * Enables this connector, if it was disabled before, otherwise does nothing.
69       */
70      void enable();
71  
72      /**
73       * Disables this connector, if it was enabled before, otherwise does nothing.
74       */
75      void disable();
76  
77  }