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