Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 1 | package aQute.bnd.osgi; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 2 | |
| 3 | import java.nio.charset.*; |
| 4 | import java.util.*; |
| 5 | import java.util.regex.*; |
| 6 | |
| 7 | public interface Constants { |
| 8 | /* |
| 9 | * Defined in OSGi |
| 10 | */ |
| 11 | /** |
| 12 | * @syntax Bundle-ActivationPolicy ::= policy ( ’;’ directive )* policy ::= |
| 13 | * ’lazy’ |
| 14 | */ |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 15 | String BND_ADDXMLTOTEST = "Bnd-AddXMLToTest"; |
| 16 | String BUNDLE_ACTIVATIONPOLICY = "Bundle-ActivationPolicy"; |
| 17 | String BUNDLE_ACTIVATOR = "Bundle-Activator"; |
| 18 | String BUNDLE_BLUEPRINT = "Bundle-Copyright"; |
| 19 | String BUNDLE_CATEGORY = "Bundle-Category"; |
| 20 | String BUNDLE_CLASSPATH = "Bundle-ClassPath"; |
| 21 | String BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress"; |
| 22 | String BUNDLE_COPYRIGHT = "Bundle-Copyright"; |
| 23 | String BUNDLE_DESCRIPTION = "Bundle-Description"; |
| 24 | String BUNDLE_DOCURL = "Bundle-DocURL"; |
| 25 | String BUNDLE_ICON = "Bundle-Icon"; |
| 26 | String BUNDLE_LICENSE = "Bundle-License"; |
| 27 | String BUNDLE_LOCALIZATION = "Bundle-Localization"; |
| 28 | String BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion"; |
| 29 | String BUNDLE_NAME = "Bundle-Name"; |
| 30 | String BUNDLE_NATIVECODE = "Bundle-NativeCode"; |
| 31 | String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment"; |
| 32 | String BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName"; |
| 33 | String BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation"; |
| 34 | String BUNDLE_VENDOR = "Bundle-Vendor"; |
| 35 | String BUNDLE_VERSION = "Bundle-Version"; |
| 36 | String DYNAMICIMPORT_PACKAGE = "DynamicImport-Package"; |
| 37 | String EXPORT_PACKAGE = "Export-Package"; |
| 38 | String EXPORT_SERVICE = "Export-Service"; |
| 39 | String FRAGMENT_HOST = "Fragment-Host"; |
| 40 | String IMPORT_PACKAGE = "Import-Package"; |
| 41 | String IMPORT_SERVICE = "Import-Service"; |
| 42 | String PROVIDE_CAPABILITY = "Provide-Capability"; |
| 43 | String REQUIRE_BUNDLE = "Require-Bundle"; |
| 44 | String REQUIRE_CAPABILITY = "Require-Capability"; |
| 45 | String SERVICE_COMPONENT = "Service-Component"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 46 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 47 | String PRIVATE_PACKAGE = "Private-Package"; |
| 48 | String IGNORE_PACKAGE = "Ignore-Package"; |
| 49 | String INCLUDE_RESOURCE = "Include-Resource"; |
| 50 | String CONDITIONAL_PACKAGE = "Conditional-Package"; |
| 51 | String BND_LASTMODIFIED = "Bnd-LastModified"; |
| 52 | String CREATED_BY = "Created-By"; |
| 53 | String TOOL = "Tool"; |
| 54 | String TESTCASES = "Test-Cases"; |
Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 55 | /** |
| 56 | * @deprecated Use {@link Constants#TESTCASES}. |
| 57 | */ |
| 58 | @Deprecated |
| 59 | String TESTSUITES = "Test-Suites"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 60 | String SIGNATURE_TEST = "-signaturetest"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 61 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 62 | String headers[] = { |
| 63 | BUNDLE_ACTIVATOR, BUNDLE_CONTACTADDRESS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DOCURL, |
| 64 | BUNDLE_LOCALIZATION, BUNDLE_NATIVECODE, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_LICENSE, BUNDLE_CLASSPATH, |
| 65 | SERVICE_COMPONENT, EXPORT_PACKAGE, IMPORT_PACKAGE, BUNDLE_LOCALIZATION, BUNDLE_MANIFESTVERSION, |
| 66 | BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SYMBOLICNAME, BUNDLE_VERSION, |
| 67 | FRAGMENT_HOST, PRIVATE_PACKAGE, IGNORE_PACKAGE, INCLUDE_RESOURCE, REQUIRE_BUNDLE, IMPORT_SERVICE, |
| 68 | EXPORT_SERVICE, CONDITIONAL_PACKAGE, BND_LASTMODIFIED, TESTCASES, SIGNATURE_TEST, REQUIRE_CAPABILITY, |
Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 69 | PROVIDE_CAPABILITY, BUNDLE_ICON |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 70 | }; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 71 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 72 | String BUILDPATH = "-buildpath"; |
| 73 | String BUILDPACKAGES = "-buildpackages"; |
| 74 | String BUMPPOLICY = "-bumppolicy"; |
| 75 | String CONDUIT = "-conduit"; |
| 76 | String COMPILER_SOURCE = "-source"; |
| 77 | String COMPILER_TARGET = "-target"; |
| 78 | String DEPENDSON = "-dependson"; |
| 79 | String DEPLOY = "-deploy"; |
| 80 | String DEPLOYREPO = "-deployrepo"; |
| 81 | String DIGESTS = "-digests"; |
| 82 | String DSANNOTATIONS = "-dsannotations"; |
| 83 | String DONOTCOPY = "-donotcopy"; |
| 84 | String DEBUG = "-debug"; |
Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 85 | String EXPERIMENTS = "-experiments"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 86 | String EXPORT_CONTENTS = "-exportcontents"; |
| 87 | String FAIL_OK = "-failok"; |
| 88 | String INCLUDE = "-include"; |
| 89 | String INCLUDERESOURCE = "-includeresource"; |
| 90 | String MAKE = "-make"; |
| 91 | String METATYPE = "-metatype"; |
| 92 | String MANIFEST = "-manifest"; |
| 93 | String SAVEMANIFEST = "-savemanifest"; |
| 94 | String NAMESECTION = "-namesection"; |
| 95 | String NODEFAULTVERSION = "-nodefaultversion"; |
| 96 | String NOEXTRAHEADERS = "-noextraheaders"; |
| 97 | String NOMANIFEST = "-nomanifest"; |
| 98 | String NOUSES = "-nouses"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 99 | String NOBUNDLES = "-nobundles"; |
| 100 | String PEDANTIC = "-pedantic"; |
| 101 | String PLUGIN = "-plugin"; |
| 102 | String PLUGINPATH = "-pluginpath"; |
| 103 | String POM = "-pom"; |
| 104 | String RELEASEREPO = "-releaserepo"; |
| 105 | String REMOVEHEADERS = "-removeheaders"; |
| 106 | String RESOURCEONLY = "-resourceonly"; |
| 107 | String SOURCES = "-sources"; |
| 108 | String SOURCEPATH = "-sourcepath"; |
| 109 | String SUB = "-sub"; |
| 110 | String RUNPROPERTIES = "-runproperties"; |
| 111 | String RUNSYSTEMPACKAGES = "-runsystempackages"; |
| 112 | String RUNBUNDLES = "-runbundles"; |
Stuart McCulloch | d482610 | 2012-06-26 16:34:24 +0000 | [diff] [blame] | 113 | String RUNREPOS = "-runrepos"; |
Stuart McCulloch | 7adbc95 | 2012-07-12 22:12:58 +0000 | [diff] [blame] | 114 | |
| 115 | /** |
Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 116 | * @deprecated This is for support of the legacy OBR requirement format, use |
| 117 | * {@link #RUNREQUIRES} for new format. |
Stuart McCulloch | 7adbc95 | 2012-07-12 22:12:58 +0000 | [diff] [blame] | 118 | */ |
| 119 | @Deprecated |
| 120 | String RUNREQUIRE = "-runrequire"; |
Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 121 | |
Stuart McCulloch | 7adbc95 | 2012-07-12 22:12:58 +0000 | [diff] [blame] | 122 | String RUNREQUIRES = "-runrequires"; |
Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 123 | |
Stuart McCulloch | 7adbc95 | 2012-07-12 22:12:58 +0000 | [diff] [blame] | 124 | String RUNEE = "-runee"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 125 | String RUNPATH = "-runpath"; |
| 126 | String RUNSTORAGE = "-runstorage"; |
| 127 | String RUNBUILDS = "-runbuilds"; |
| 128 | String RUNPATH_MAIN_DIRECTIVE = "main:"; |
| 129 | String RUNPATH_LAUNCHER_DIRECTIVE = "launcher:"; |
| 130 | String RUNVM = "-runvm"; |
| 131 | String RUNTRACE = "-runtrace"; |
| 132 | String RUNFRAMEWORK = "-runframework"; |
| 133 | String RUNTIMEOUT = "-runtimeout"; |
| 134 | String SNAPSHOT = "-snapshot"; |
| 135 | String RUNFRAMEWORK_SERVICES = "services"; |
| 136 | String RUNFRAMEWORK_NONE = "none"; |
| 137 | String REPORTNEWER = "-reportnewer"; |
| 138 | String SIGN = "-sign"; |
| 139 | String TESTPACKAGES = "-testpackages"; |
| 140 | String TESTREPORT = "-testreport"; |
| 141 | String TESTPATH = "-testpath"; |
| 142 | String TESTCONTINUOUS = "-testcontinuous"; |
| 143 | String UNDERTEST = "-undertest"; |
| 144 | String VERBOSE = "-verbose"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 145 | String PROVIDER_POLICY = "-provider-policy"; |
| 146 | String CONSUMER_POLICY = "-consumer-policy"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 147 | String WAB = "-wab"; |
| 148 | String WABLIB = "-wablib"; |
| 149 | String REQUIRE_BND = "-require-bnd"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 150 | |
| 151 | // Deprecated |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 152 | String CLASSPATH = "-classpath"; |
| 153 | String OUTPUT = "-output"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 154 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 155 | String options[] = { |
| 156 | BUILDPATH, BUMPPOLICY, CONDUIT, CLASSPATH, CONSUMER_POLICY, DEPENDSON, DONOTCOPY, EXPORT_CONTENTS, FAIL_OK, |
| 157 | INCLUDE, INCLUDERESOURCE, MAKE, MANIFEST, NOEXTRAHEADERS, NOUSES, NOBUNDLES, PEDANTIC, PLUGIN, POM, |
| 158 | PROVIDER_POLICY, REMOVEHEADERS, RESOURCEONLY, SOURCES, SOURCEPATH, SOURCES, SOURCEPATH, SUB, RUNBUNDLES, |
| 159 | RUNPATH, RUNSYSTEMPACKAGES, RUNPROPERTIES, REPORTNEWER, UNDERTEST, TESTPATH, TESTPACKAGES, TESTREPORT, |
| 160 | VERBOSE, NOMANIFEST, DEPLOYREPO, RELEASEREPO, SAVEMANIFEST, RUNVM, WAB, WABLIB, RUNFRAMEWORK, RUNTRACE, |
Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 161 | TESTCONTINUOUS, SNAPSHOT, NAMESECTION, DIGESTS, DSANNOTATIONS, EXPERIMENTS |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 162 | }; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 163 | |
| 164 | // Ignore bundle specific headers. These bundles do not make |
| 165 | // a lot of sense to inherit |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 166 | String[] BUNDLE_SPECIFIC_HEADERS = new String[] { |
| 167 | INCLUDE_RESOURCE, BUNDLE_ACTIVATOR, BUNDLE_CLASSPATH, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_SYMBOLICNAME, |
| 168 | IMPORT_PACKAGE, EXPORT_PACKAGE, DYNAMICIMPORT_PACKAGE, FRAGMENT_HOST, REQUIRE_BUNDLE, PRIVATE_PACKAGE, |
| 169 | EXPORT_CONTENTS, TESTCASES, NOMANIFEST, SIGNATURE_TEST, WAB, WABLIB, REQUIRE_CAPABILITY, |
| 170 | PROVIDE_CAPABILITY, DSANNOTATIONS, SERVICE_COMPONENT |
| 171 | }; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 172 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 173 | char DUPLICATE_MARKER = '~'; |
| 174 | String SPECIFICATION_VERSION = "specification-version"; |
| 175 | String SPLIT_PACKAGE_DIRECTIVE = "-split-package:"; |
| 176 | String IMPORT_DIRECTIVE = "-import:"; |
| 177 | String NO_IMPORT_DIRECTIVE = "-noimport:"; |
| 178 | String REMOVE_ATTRIBUTE_DIRECTIVE = "-remove-attribute:"; |
| 179 | String LIB_DIRECTIVE = "lib:"; |
| 180 | String NOANNOTATIONS = "-noannotations"; |
| 181 | String COMMAND_DIRECTIVE = "command:"; |
| 182 | String USES_DIRECTIVE = "uses:"; |
| 183 | String MANDATORY_DIRECTIVE = "mandatory:"; |
| 184 | String INCLUDE_DIRECTIVE = "include:"; |
| 185 | String PROVIDE_DIRECTIVE = "provide:"; |
| 186 | String EXCLUDE_DIRECTIVE = "exclude:"; |
| 187 | String PRESENCE_DIRECTIVE = "presence:"; |
| 188 | String PRIVATE_DIRECTIVE = "private:"; |
| 189 | String SINGLETON_DIRECTIVE = "singleton:"; |
| 190 | String EXTENSION_DIRECTIVE = "extension:"; |
| 191 | String VISIBILITY_DIRECTIVE = "visibility:"; |
| 192 | String FRAGMENT_ATTACHMENT_DIRECTIVE = "fragment-attachment:"; |
| 193 | String RESOLUTION_DIRECTIVE = "resolution:"; |
| 194 | String PATH_DIRECTIVE = "path:"; |
| 195 | String SIZE_ATTRIBUTE = "size"; |
| 196 | String LINK_ATTRIBUTE = "link"; |
Stuart McCulloch | 61c61eb | 2012-07-24 21:37:47 +0000 | [diff] [blame] | 197 | String LITERAL_ATTRIBUTE = "literal"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 198 | String NAME_ATTRIBUTE = "name"; |
| 199 | String DESCRIPTION_ATTRIBUTE = "description"; |
| 200 | String OSNAME_ATTRIBUTE = "osname"; |
| 201 | String OSVERSION_ATTRIBUTE = "osversion"; |
| 202 | String PROCESSOR_ATTRIBUTE = "processor"; |
| 203 | String LANGUAGE_ATTRIBUTE = "language"; |
| 204 | String SELECTION_FILTER_ATTRIBUTE = "selection-filter"; |
| 205 | String BLUEPRINT_WAIT_FOR_DEPENDENCIES_ATTRIBUTE = "blueprint.wait-for-dependencies"; |
| 206 | String BLUEPRINT_TIMEOUT_ATTRIBUTE = "blueprint.timeout"; |
| 207 | String VERSION_ATTRIBUTE = "version"; |
| 208 | String BUNDLE_SYMBOLIC_NAME_ATTRIBUTE = "bundle-symbolic-name"; |
| 209 | String BUNDLE_VERSION_ATTRIBUTE = "bundle-version"; |
| 210 | String FROM_DIRECTIVE = "from:"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 211 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 212 | String KEYSTORE_LOCATION_DIRECTIVE = "keystore:"; |
| 213 | String KEYSTORE_PROVIDER_DIRECTIVE = "provider:"; |
| 214 | String KEYSTORE_PASSWORD_DIRECTIVE = "password:"; |
| 215 | String SIGN_PASSWORD_DIRECTIVE = "sign-password:"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 216 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 217 | String NONE = "none"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 218 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 219 | String directives[] = { |
| 220 | SPLIT_PACKAGE_DIRECTIVE, NO_IMPORT_DIRECTIVE, IMPORT_DIRECTIVE, RESOLUTION_DIRECTIVE, INCLUDE_DIRECTIVE, |
| 221 | USES_DIRECTIVE, EXCLUDE_DIRECTIVE, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, |
| 222 | KEYSTORE_PASSWORD_DIRECTIVE, SIGN_PASSWORD_DIRECTIVE, COMMAND_DIRECTIVE, NOANNOTATIONS, LIB_DIRECTIVE, |
Stuart McCulloch | 61c61eb | 2012-07-24 21:37:47 +0000 | [diff] [blame] | 223 | RUNPATH_LAUNCHER_DIRECTIVE, FROM_DIRECTIVE, PRIVATE_DIRECTIVE, LITERAL_ATTRIBUTE |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 224 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 225 | // TODO |
| 226 | }; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 227 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 228 | String USES_USES = "<<USES>>"; |
| 229 | String CURRENT_USES = "@uses"; |
| 230 | String IMPORT_REFERENCE = "reference"; |
| 231 | String IMPORT_PRIVATE = "private"; |
| 232 | String[] importDirectives = { |
| 233 | IMPORT_REFERENCE, IMPORT_PRIVATE |
| 234 | }; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 235 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 236 | static final Pattern VALID_PROPERTY_TYPES = Pattern |
| 237 | .compile("(String|Long|Double|Float|Integer|Byte|Character|Boolean|Short)"); |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 238 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 239 | String DEFAULT_BND_EXTENSION = ".bnd"; |
| 240 | String DEFAULT_JAR_EXTENSION = ".jar"; |
| 241 | String DEFAULT_BAR_EXTENSION = ".bar"; |
| 242 | String DEFAULT_BNDRUN_EXTENSION = ".bndrun"; |
| 243 | String[] METAPACKAGES = { |
| 244 | "META-INF", "OSGI-INF", "OSGI-OPT" |
| 245 | }; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 246 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 247 | String CURRENT_VERSION = "@"; |
| 248 | String CURRENT_PACKAGE = "@package"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 249 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 250 | String BUILDFILES = "buildfiles"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 251 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 252 | String EMPTY_HEADER = "<<EMPTY>>"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 253 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 254 | String EMBEDDED_REPO = "/embedded-repo.jar"; |
| 255 | String LAUNCHER_PLUGIN = "Launcher-Plugin"; |
| 256 | String TESTER_PLUGIN = "Tester-Plugin"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 257 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 258 | String DEFAULT_LAUNCHER_BSN = "biz.aQute.launcher"; |
| 259 | String DEFAULT_TESTER_BSN = "biz.aQute.junit"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 260 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 261 | String DEFAULT_DO_NOT_COPY = "CVS|\\.svn|\\.git|\\.DS_Store"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 262 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 263 | Charset DEFAULT_CHARSET = Charset.forName("UTF8"); |
| 264 | String VERSION_FILTER = "version"; |
| 265 | String PROVIDER_TYPE_DIRECTIVE = "x-provider-type:"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 266 | /** |
| 267 | * Component constants |
| 268 | */ |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 269 | public final static String NAMESPACE_STEM = "http://www.osgi.org/xmlns/scr"; |
| 270 | public final static String JIDENTIFIER = "<<identifier>>"; |
| 271 | public final static String COMPONENT_NAME = "name:"; |
| 272 | public final static String COMPONENT_FACTORY = "factory:"; |
| 273 | public final static String COMPONENT_SERVICEFACTORY = "servicefactory:"; |
| 274 | public final static String COMPONENT_IMMEDIATE = "immediate:"; |
| 275 | public final static String COMPONENT_ENABLED = "enabled:"; |
| 276 | public final static String COMPONENT_DYNAMIC = "dynamic:"; |
| 277 | public final static String COMPONENT_MULTIPLE = "multiple:"; |
Stuart McCulloch | 4b9de8e | 2012-07-22 00:19:13 +0000 | [diff] [blame] | 278 | public final static String COMPONENT_GREEDY = "greedy:"; |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 279 | public final static String COMPONENT_PROVIDE = "provide:"; |
| 280 | public final static String COMPONENT_OPTIONAL = "optional:"; |
| 281 | public final static String COMPONENT_PROPERTIES = "properties:"; |
| 282 | public final static String COMPONENT_IMPLEMENTATION = "implementation:"; |
| 283 | public final static String COMPONENT_DESIGNATE = "designate:"; |
| 284 | public final static String COMPONENT_DESIGNATEFACTORY = "designateFactory:"; |
| 285 | public final static String COMPONENT_DESCRIPTORS = ".descriptors:"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 286 | |
| 287 | // v1.1.0 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 288 | public final static String COMPONENT_VERSION = "version:"; |
| 289 | public final static String COMPONENT_CONFIGURATION_POLICY = "configuration-policy:"; |
| 290 | public final static String COMPONENT_MODIFIED = "modified:"; |
| 291 | public final static String COMPONENT_ACTIVATE = "activate:"; |
| 292 | public final static String COMPONENT_DEACTIVATE = "deactivate:"; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 293 | |
Stuart McCulloch | 61c61eb | 2012-07-24 21:37:47 +0000 | [diff] [blame] | 294 | public final static String COMPONENT_NAMESPACE = "xmlns:"; |
Stuart McCulloch | 4b9de8e | 2012-07-22 00:19:13 +0000 | [diff] [blame] | 295 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 296 | final static Map<String,String> EMPTY = Collections.emptyMap(); |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 297 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 298 | public final static String[] componentDirectives = new String[] { |
| 299 | COMPONENT_FACTORY, COMPONENT_IMMEDIATE, COMPONENT_ENABLED, COMPONENT_DYNAMIC, COMPONENT_MULTIPLE, |
| 300 | COMPONENT_PROVIDE, COMPONENT_OPTIONAL, COMPONENT_PROPERTIES, COMPONENT_IMPLEMENTATION, |
| 301 | COMPONENT_SERVICEFACTORY, COMPONENT_VERSION, COMPONENT_CONFIGURATION_POLICY, COMPONENT_MODIFIED, |
| 302 | COMPONENT_ACTIVATE, COMPONENT_DEACTIVATE, COMPONENT_NAME, COMPONENT_DESCRIPTORS, COMPONENT_DESIGNATE, |
Stuart McCulloch | 4b9de8e | 2012-07-22 00:19:13 +0000 | [diff] [blame] | 303 | COMPONENT_DESIGNATEFACTORY, COMPONENT_GREEDY, COMPONENT_NAMESPACE |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 304 | }; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 305 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 306 | public final static Set<String> SET_COMPONENT_DIRECTIVES = new HashSet<String>( |
| 307 | Arrays.asList(componentDirectives)); |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 308 | |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 309 | public final static Set<String> SET_COMPONENT_DIRECTIVES_1_1 = // |
| 310 | new HashSet<String>(Arrays.asList( |
| 311 | COMPONENT_VERSION, |
| 312 | COMPONENT_CONFIGURATION_POLICY, |
| 313 | COMPONENT_MODIFIED, |
| 314 | COMPONENT_ACTIVATE, |
| 315 | COMPONENT_DEACTIVATE)); |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 316 | |
Stuart McCulloch | 61c61eb | 2012-07-24 21:37:47 +0000 | [diff] [blame] | 317 | public final static Set<String> SET_COMPONENT_DIRECTIVES_1_2 = new HashSet<String>( |
| 318 | Arrays.asList(COMPONENT_GREEDY)); |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 319 | } |