This project has retired. For details please refer to its Attic page.
RepositoryCapabilities 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  
23  import java.util.Set;
24  
25  /**
26   * Describe the capabilities a repository implementation supports.
27   */
28  public interface RepositoryCapabilities {
29  
30      /**
31       * Returns true, if this repository has a mechanism for indexes
32       * @return true, if this repository is indexable, otherwise false.
33       */
34      default boolean isIndexable() {
35          return true;
36      }
37  
38      /**
39       * Returns true, if this repository type is storing its artifacts on the filesystem.
40       * @return true, if this is a file based repository, otherwise false.
41       */
42      default boolean isFileBased() {
43          return true;
44      }
45  
46      /**
47       * Returns true, if this repository allows to block redeployments to prevent overriding
48       * released artifacts
49       * @return true, if this repo can block redeployments, otherwise false.
50       */
51      default boolean canBlockRedeployments() {
52          return true;
53      }
54  
55      /**
56       * Returns true, if the artifacts can be scanned for metadata retrieval or maintenance tasks
57       * @return true, if this repository can be scanned regularily, otherwise false.
58       */
59      default boolean isScannable() {
60          return true;
61      }
62  
63      /**
64       * Returns true, if this repository can use failover repository urls
65       * @return true, if there is a failover mechanism for repository access, otherwise false.
66       */
67      default boolean allowsFailover() {
68          return false;
69      }
70  
71      /**
72       * Returns the release schemes this repository type can handle
73       */
74      Set<ReleaseScheme> supportedReleaseSchemes();
75  
76      /**
77       * Returns the layouts this repository type can provide
78       * @return The list of layouts supported by this repository.
79       */
80      Set<String> supportedLayouts();
81  
82      /**
83       * Returns additional capabilities, that this repository type implements.
84       * @return A list of custom capabilities.
85       */
86      Set<String> customCapabilities();
87  
88      /**
89       * Returns the supported features this repository type supports. This method returns
90       * string that corresponds to fully qualified class names.
91       * We use string representation to allow implementations provide their own feature
92       * implementations if necessary and to avoid class errors.
93       *
94       * @return The list of supported features as string values.
95       */
96      Set<String> supportedFeatures();
97  
98  
99  }