View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.index;
20  
21  /**
22   * OSGI ontology.
23   *
24   * @author Olivier Lamy
25   * @since 4.1.1
26   */
27  public interface OSGI {
28  
29      /**
30       * OSGI namespace
31       */
32      String OSGI_NAMESPACE = "urn:osgi#";
33  
34      Field SYMBOLIC_NAME = new Field(null, OSGI_NAMESPACE, "symbolicName", "Bundle Symbolic Name");
35  
36      Field VERSION = new Field(null, OSGI_NAMESPACE, "version", "Bundle Version");
37  
38      Field EXPORT_PACKAGE = new Field(null, OSGI_NAMESPACE, "exportPackage", "Bundle Export-Package");
39  
40      /**
41       * Export-Service has been deprecated since OSGI R4 (2005), and was never used by resolvers.  It is replaced by
42       * PROVIDE_CAPABILITY
43       *
44       * @deprecated
45       */
46      @Deprecated
47      Field EXPORT_SERVICE = new Field(null, OSGI_NAMESPACE, "exportService", "Bundle Export-Service");
48  
49      Field DESCRIPTION = new Field(null, OSGI_NAMESPACE, "bundleDescription", "Bundle-Description");
50  
51      Field NAME = new Field(null, OSGI_NAMESPACE, "bundleName", "Bundle-Name");
52  
53      Field LICENSE = new Field(null, OSGI_NAMESPACE, "bundleLicense", "Bundle-License");
54  
55      Field DOCURL = new Field(null, OSGI_NAMESPACE, "bundleDocUrl", "Bundle-DocURL");
56  
57      Field IMPORT_PACKAGE = new Field(null, OSGI_NAMESPACE, "importPackage", "Import-Package");
58  
59      Field REQUIRE_BUNDLE = new Field(null, OSGI_NAMESPACE, "requireBundle", "Require-Bundle");
60  
61      /**
62       * used by OSGI resolvers to determine which bundles / artifacts / environments, etc. can satisfy a given
63       * requirement. It replaces headers like Export-Service and Required Execution Environment, and uses the default
64       * OSGI header format
65       *
66       * @since 5.1.2
67       */
68      Field PROVIDE_CAPABILITY = new Field(null, OSGI_NAMESPACE, "provideCapability", "Bundle Provide-Capability");
69  
70      /**
71       * used by OSGI resolvers to indicate which services, features, etc are required by a given   .
72       * It replaces headers like Import-Service, and uses the default OSGI header format.
73       *
74       * @since 5.1.2
75       */
76      Field REQUIRE_CAPABILITY = new Field(null, OSGI_NAMESPACE, "requireCapability", "Bundle Require-Capability");
77  
78      /**
79       * used to hold the SHA256 checksum required as identifier for OSGI Content resources.
80       *
81       * @since 5.1.2
82       */
83      Field SHA256 = new Field(null, OSGI_NAMESPACE, "sha256", "SHA-256 checksum");
84  
85      /**
86       * used to hold the Fragment Host header  for an OSGI Fragment bundle.
87       *
88       * @since 5.1.2
89       */
90      Field FRAGMENT_HOST = new Field(null, OSGI_NAMESPACE, "fragmentHost", "Bundle Fragment-Host");
91  
92      /**
93       * used to hold the Fragment Host header  for an OSGI Fragment bundle.
94       *
95       * @since 5.1.2
96       */
97      Field BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT =
98              new Field(null, OSGI_NAMESPACE, "bree", "Bundle Required Execution Environment");
99  }