Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 35f6c2aeff6ec65f478247792c78d68412d9581f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*******************************************************************************
 * Copyright (c) 2012, 2016 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.osgi.container.namespaces;

import org.osgi.framework.Constants;
import org.osgi.resource.Namespace;

/**
 * Equinox module data capability namespace.  This namespace is used
 * to store immutable data about a module revision.  This includes the following
 * <ul>
 *   <li>The activation policy as specified by the {@link Constants#BUNDLE_ACTIVATIONPOLICY
 *       Bundle-ActivationPolicy} header.</li>
 *   <li>The activator as specified by the {@link Constants#BUNDLE_ACTIVATOR Bundle-Activator}
 *       header.</li>
 *   <li>The class path as specified by the {@link Constants#BUNDLE_CLASSPATH Bundle-ClassPath}
 *       header.</li>
 *   <li>The bundle class loading policy.
 * </ul>
 * 
 * This capability is provided for informational purposes and 
 * should not be considered as effective by the resolver.
 * <p>
 * This class defines the names for the attributes and directives for this
 * namespace.  Capabilities in this namespace are not intended to be used to
 * match requirements and should not be considered as effective by a resolver.
 * 
 * @Immutable
 * @noinstantiate This class is not intended to be instantiated by clients.
 * @since 3.10
 */
public class EquinoxModuleDataNamespace extends Namespace {
	/**
	 * The Equinox specific header for specifying a list of buddy policies.
	 */
	public final static String BUDDY_POLICY_HEADER = "Eclipse-BuddyPolicy"; //$NON-NLS-1$

	/**
	 * The Equinox specific header for specifying a list of symbolic names to register as a buddy with.
	 */
	public final static String REGISTERED_BUDDY_HEADER = "Eclipse-RegisterBuddy"; //$NON-NLS-1$

	/**
	 * The Equinox specific header for specifying the lazy start policy
	 */
	public static final String LAZYSTART_HEADER = "Eclipse-LazyStart"; //$NON-NLS-1$

	/** An Eclipse-LazyStart header attribute used to specify exception classes for auto start */
	public static final String LAZYSTART_EXCEPTIONS_ATTRIBUTE = "exceptions"; //$NON-NLS-1$

	/** 
	 * The Equinox specific header for specifying the lazy start policy 
	 * @deprecated use {@link #LAZYSTART_HEADER}
	 */
	public static final String AUTOSTART_HEADER = "Eclipse-AutoStart"; //$NON-NLS-1$

	/**
	 * Namespace name for equinox module data.  Unlike typical name spaces
	 * this namespace is not intended to be used as an attribute.
	 */
	public static final String MODULE_DATA_NAMESPACE = "equinox.module.data"; //$NON-NLS-1$

	/**
	 * The directive value identifying a {@link #CAPABILITY_EFFECTIVE_DIRECTIVE
	 * capability} that is effective for information purposes.  Capabilities
	 * in this namespace must have an effective directive value of information.
	 * 
	 * @see #CAPABILITY_EFFECTIVE_DIRECTIVE
	 */
	public final static String EFFECTIVE_INFORMATION = "information"; //$NON-NLS-1$

	/**
	 * The capability attribute contains the {@link Constants#BUNDLE_ACTIVATIONPOLICY
	 * activation policy} for the providing module revision. The value of this
	 * attribute must be of type {@code String}.  When not specified then
	 * the module revision uses an eager activation policy.
	 */
	public final static String CAPABILITY_ACTIVATION_POLICY = "activation.policy"; //$NON-NLS-1$

	/**
	 * An {@link #CAPABILITY_ACTIVATION_POLICY activation policy} attribute value
	 * indicating the lazy activation policy is used.
	 */
	public final static String CAPABILITY_ACTIVATION_POLICY_LAZY = "lazy"; //$NON-NLS-1$

	/**
	 * When the {@link #CAPABILITY_ACTIVATION_POLICY_LAZY lazy} policy is used this 
	 * attribute contains the package names that must
	 * trigger the activation when a class is loaded of these packages.
	 * If the attribute is not defined then the default is all package names. 
	 * The value of this attribute must be of type {@code List<String>}.
	 */
	public final static String CAPABILITY_LAZY_INCLUDE_ATTRIBUTE = "lazy.include"; //$NON-NLS-1$

	/**
	 * When the {@link #CAPABILITY_ACTIVATION_POLICY_LAZY lazy} policy is used this 
	 * attribute contains the package names that must not
	 * trigger the activation when a class is loaded of these packages.
	 * If the attribute is not defined then the default is no package names. 
	 * The value of this attribute must be of type {@code List<String>}.
	 */
	public final static String CAPABILITY_LAZY_EXCLUDE_ATTRIBUTE = "lazy.exclude"; //$NON-NLS-1$

	/**
	 * The capability attribute contains the {@link Constants#BUNDLE_ACTIVATOR activator}
	 * for the providing module revision.  The value of this attribute must be of type
	 * {@code String}.  When not specified then the module revision has no activator.
	 */
	public final static String CAPABILITY_ACTIVATOR = "activator"; //$NON-NLS-1$

	/**
	 * The capability attribute contains the {@link Constants#BUNDLE_CLASSPATH class path}
	 * for the providing module revision.  The value of this attribute must be of type
	 * {@code List<String>}.  When not specified the module revision uses the default
	 * class path of '.'.
	 */
	public final static String CAPABILITY_CLASSPATH = "classpath"; //$NON-NLS-1$

	/**
	 * The capability attribute contains the list buddy loading policies
	 * for the providing module revision as specified in the Eclipse-BuddyPolicy header.  
	 * The value of this attribute must be of type
	 * {@code List<String>}.
	 */
	public final static String CAPABILITY_BUDDY_POLICY = "buddy.policy"; //$NON-NLS-1$

	/**
	 * The capability attribute contains the list of symbolic names the
	 * providing module revision is a registered buddy of as specified by 
	 * the Eclipse-BuddyPolicy header.  The value of this attribute must be of type
	 * {@code List<String>}.
	 */
	public final static String CAPABILITY_BUDDY_REGISTERED = "buddy.registered"; //$NON-NLS-1$
}

Back to the top