Debian Codegraph @

src/aQute/bnd/annotation/headers/BundleLicense.java

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 package aQute.bnd.annotation.headers;
2
3 import java.lang.annotation.Documented;
4 import java.lang.annotation.ElementType;
5 import java.lang.annotation.Retention;
6 import java.lang.annotation.RetentionPolicy;
7 import java.lang.annotation.Target;
8
9 /**
10 * The {@code Bundle-License} header provides an optional machine readable form
11 * of license information. The purpose of this header is to automate some of the
12 * license processing required by many organizations like for example license
13 * acceptance before a bundle is used. The header is structured to provide the
14 * use of unique license naming to merge acceptance requests, as well as links
15 * to human readable information about the included licenses. This header is
16 * purely informational for management agents and must not be processed by the
17 * OSGi Framework.
18 * <p>
19 * The syntax for this header is as follows:
20 *
21 * <pre>
22 * Bundle-License ::= ’&lt;&lt;EXTERNAL&gt;&gt;’ | ( license ( ’,’ license ) * )
23 * license ::= name ( ’;’ license-attr )
24 * license-attr ::= description | link
25 * description ::= ’description’ ’=’ string
26 * link ::= ’link’ ’=’ &lt;url&gt;
27 * </pre>
28 *
29 * This header has the following attributes:
30 * <ul>
31 * <li>{@code name} – Provides a globally unique name for this license,
32 * preferably world wide, but it should at least be unique with respect to the
33 * other clauses. The magic name {@code <<EXTERNAL>>} is used to indicate that
34 * this artifact does not contain any license information but that licensing
35 * information is provided in some other way. This is also the default contents
36 * of this header. Clients of this bundle can assume that licenses with the same
37 * name refer to the same license. This can for example be used to minimize the
38 * click through licenses. This name should be one of the identifiers defined by
39 * <a href="https://spdx.org/licenses/">Software Package Data Exchange (SPDX)
40 * License List</a>. Clients of this bundle can assume that licenses with the
41 * same identifier refer to the same license. This can for example be used to
42 * minimize the click through licenses. Alternatively, this name should be the
43 * canonical URL of the license, it must not be localized by the translator.
44 * This URL does not have to exist but must not be used for later versions of
45 * the license. It is recommended to use URLs from
46 * <a href="http://opensource.org/">Open Source Initiative</a>. Other licenses
47 * should use the following structure, but this is not mandated:
48 *
49 * <pre>
50 * http://&lt;domain-name&gt;/licenses/&lt;license-name&gt;-&lt;version&gt;.&lt;extension&gt;
51 * </pre>
52 *
53 * <li>{@code description} – (optional) Provide the description of the license.
54 * This is a short description that is usable in a list box on a UI to select
55 * more information about the license.
56 * <li>{@code link} – (optional) Provides a URL to a page that defines or
57 * explains the license. If this link is absent, the name field is used for this
58 * purpose. The URL is relative to the root of the bundle. That is, it is
59 * possible to refer to a file inside the bundle.
60 * </ul>
61 * If the {@code Bundle-License} statement is absent, then this does not mean
62 * that the bundle is not licensed. Licensing could be handled outside the
63 * bundle and the {@code <<EXTERNAL>>} form should be assumed. This header is
64 * informational and may not have any legal bearing. Consult a lawyer before
65 * using this header to automate licensing processing.
66 * <p>
67 * A number of license annotations have been predefined. For example:
68 * {@link aQute.bnd.annotation.licenses.Apache_2_0 Apache_2_0},
69 * {@link aQute.bnd.annotation.licenses.BSD_2_Clause BSD_2_Clause},
70 * {@link aQute.bnd.annotation.licenses.BSD_3_Clause BSD_3_Clause},
71 * {@link aQute.bnd.annotation.licenses.CDDL_1_0 CDDL_1_0},
72 * {@link aQute.bnd.annotation.licenses.EPL_1_0 EPL_1_0} ,
73 * {@link aQute.bnd.annotation.licenses.EPL_2_0 EPL_2_0} ,
74 * {@link aQute.bnd.annotation.licenses.GPL_2_0 GPL_2_0},
75 * {@link aQute.bnd.annotation.licenses.GPL_3_0 GPL_3_0},
76 * {@link aQute.bnd.annotation.licenses.LGPL_2_1 LGPL_2_1},
77 * {@link aQute.bnd.annotation.licenses.MIT MIT}, and
78 * {@link aQute.bnd.annotation.licenses.MPL_2_0 MPL_2_0}.
79 */
80 @Documented
81 @Retention(RetentionPolicy.CLASS)
82 @Target({
83 ElementType.PACKAGE, ElementType.TYPE
84 })
85 public @interface BundleLicense {
86 /**
87 * The name of the license, should refer to
88 * <a href="https://spdx.org/licenses/">Software Package Data Exchange
89 * (SPDX) License List</a>
90 */
91 String name();
92
93 /**
94 * A short description of the license
95 */
96 String description() default "";
97
98 /**
99 * A URI to the license text. This maybe relative, in that case it is from
100 * the corresponding bundle.
101 */
102 String link() default "";
103 }