1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.uruma.rcp.util;
17
18 import java.util.Dictionary;
19
20 import org.osgi.framework.Bundle;
21
22
23
24
25
26
27 public class BundleInfoUtil {
28
29
30
31 public static final String ACTIVATION_POLICY = "Bundle-ActivationPolicy";
32
33
34
35
36 public static final String ACTIVATOR = "Bundle-Activator";
37
38
39
40
41 public static final String CATEGORY = "Bundle-Category";
42
43
44
45
46 public static final String CLASSPATH = "Bundle-Classpath";
47
48
49
50
51 public static final String CONTACT_ADDRESS = "Bundle-ContactAddress";
52
53
54
55
56 public static final String COPYRIGHT = "Bundle-Copyright";
57
58
59
60
61 public static final String DESCRIPTION = "Bundle-Description";
62
63
64
65
66 public static final String DOC_URL = "Bundle-DocURL";
67
68
69
70
71 public static final String LOCALIZATION = "Bundle-Localization";
72
73
74
75
76 public static final String MANIFEST_VERSION = "Bundle-ManifestVersion";
77
78
79
80
81 public static final String NAME = "Bundle-Name";
82
83
84
85
86 public static final String NATIVE_CODE = "Bundle-NativeCore";
87
88
89
90
91 public static final String REQUIRED_EXECUTION_ENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
92
93
94
95
96 public static final String SYMBOLIC_NAME = "Bundle-SymbolicName";
97
98
99
100
101 public static final String UPDATE_LOCATION = "Bundle-UpdateLocation";
102
103
104
105
106 public static final String VENDOR = "Bundle-Vendor";
107
108
109
110
111 public static final String VERSION = "Bundle-Version";
112
113
114
115
116 public static final String DYNAMIC_IMPORT_PACKAGE = "DynamicImport-Package";
117
118
119
120
121 public static final String EXPORT_PACKAGE = "Export-Package";
122
123
124
125
126 public static final String EXPORT_SERVICE = "Export-Service";
127
128
129
130
131 public static final String FRAGMENT_HOST = "Fragment-Host";
132
133
134
135
136 public static final String IMPORT_PACKAGE = "Import-Package";
137
138
139
140
141 public static final String IMPORT_SERVICE = "Import-Service";
142
143
144
145
146 public static final String REQUIRE_BUNDLE = "Require-Bundle";
147
148 private BundleInfoUtil() {
149
150 }
151
152
153
154
155
156
157
158
159
160
161 @SuppressWarnings("unchecked")
162 public static String getHeader(final Bundle bundle, final String header) {
163 Dictionary headers = bundle.getHeaders();
164 if (headers != null) {
165 return (String) headers.get(header);
166 }
167 return null;
168 }
169 }