private static String getInstallationDirective(String requirementId, ManifestElement[] correspondingBundleHeader) { for (ManifestElement manifestElement : correspondingBundleHeader) { String[] packages = manifestElement.getValueComponents(); for (String pckg : packages) { if (requirementId.equals(pckg)) { return manifestElement.getDirective(INSTALLATION_DIRECTIVE); } } } // TODO this case indicates an internal error -> return assertion error status return null; }
private static String getInstallationDirective(String requirementId, ManifestElement[] correspondingBundleHeader) { for (ManifestElement manifestElement : correspondingBundleHeader) { String[] packages = manifestElement.getValueComponents(); for (String pckg : packages) { if (requirementId.equals(pckg)) { return manifestElement.getDirective(INSTALLATION_DIRECTIVE); } } } // TODO this case indicates an internal error -> return assertion error status return null; }
private static String getInstallationDirective(String requirementId, ManifestElement[] correspondingBundleHeader) { for (ManifestElement manifestElement : correspondingBundleHeader) { String[] packages = manifestElement.getValueComponents(); for (String pckg : packages) { if (requirementId.equals(pckg)) { return manifestElement.getDirective(INSTALLATION_DIRECTIVE); } } } // TODO this case indicates an internal error -> return assertion error status return null; }
private static void getProvideCapabilities(ModuleRevisionBuilder builder, ManifestElement[] provideElements, boolean checkSystemCapabilities) throws BundleException { if (provideElements == null) return; for (ManifestElement provideElement : provideElements) { String[] namespaces = provideElement.getValueComponents(); Map<String, Object> attributes = getAttributes(provideElement); Map<String, String> directives = getDirectives(provideElement); for (String namespace : namespaces) { if (PROHIBITED_CAPABILITIES.contains(namespace) || (checkSystemCapabilities && SYSTEM_CAPABILITIES.contains(namespace))) { throw new BundleException("A bundle is not allowed to define a capability in the " + namespace + " name space.", BundleException.MANIFEST_ERROR); //$NON-NLS-1$ //$NON-NLS-2$ } builder.addCapability(namespace, directives, attributes); } } }
private static void getProvideCapabilities(ModuleRevisionBuilder builder, ManifestElement[] provideElements, boolean checkSystemCapabilities) throws BundleException { if (provideElements == null) return; for (ManifestElement provideElement : provideElements) { String[] namespaces = provideElement.getValueComponents(); Map<String, Object> attributes = getAttributes(provideElement); Map<String, String> directives = getDirectives(provideElement); for (String namespace : namespaces) { if (PROHIBITED_CAPABILITIES.contains(namespace) || (checkSystemCapabilities && SYSTEM_CAPABILITIES.contains(namespace))) { throw new BundleException("A bundle is not allowed to define a capability in the " + namespace + " name space.", BundleException.MANIFEST_ERROR); //$NON-NLS-1$ //$NON-NLS-2$ } builder.addCapability(namespace, directives, attributes); } } }
private static void getProvideCapabilities(ModuleRevisionBuilder builder, ManifestElement[] provideElements, boolean checkSystemCapabilities) throws BundleException { if (provideElements == null) return; for (ManifestElement provideElement : provideElements) { String[] namespaces = provideElement.getValueComponents(); Map<String, Object> attributes = getAttributes(provideElement); Map<String, String> directives = getDirectives(provideElement); for (String namespace : namespaces) { if (PROHIBITED_CAPABILITIES.contains(namespace) || (checkSystemCapabilities && SYSTEM_CAPABILITIES.contains(namespace))) { throw new BundleException("A bundle is not allowed to define a capability in the " + namespace + " name space.", BundleException.MANIFEST_ERROR); //$NON-NLS-1$ //$NON-NLS-2$ } builder.addCapability(namespace, directives, attributes); } } }
private static void getRequireCapabilities(ModuleRevisionBuilder builder, ManifestElement[] requireElements) { if (requireElements == null) return; for (ManifestElement requireElement : requireElements) { String[] namespaces = requireElement.getValueComponents(); Map<String, Object> attributes = getAttributes(requireElement); Map<String, String> directives = getDirectives(requireElement); for (String namespace : namespaces) { builder.addRequirement(namespace, directives, attributes); } } }
private static void getProvideCapabilities(ModuleRevisionBuilder builder, ManifestElement[] provideElements, boolean chechSystemCapabilities) throws BundleException { if (provideElements == null) return; for (ManifestElement provideElement : provideElements) { String[] namespaces = provideElement.getValueComponents(); Map<String, Object> attributes = getAttributes(provideElement); Map<String, String> directives = getDirectives(provideElement); for (String namespace : namespaces) { if (PROHIBITED_CAPABILITIES.contains(namespace) || (chechSystemCapabilities && SYSTEM_CAPABILITIES.contains(namespace))) { throw new BundleException("A bundle is not allowed to define a capability in the " + namespace + " name space.", BundleException.MANIFEST_ERROR); //$NON-NLS-1$ //$NON-NLS-2$ } builder.addCapability(namespace, directives, attributes); } } }
private static void getProvideCapabilities(ModuleRevisionBuilder builder, ManifestElement[] provideElements, boolean checkSystemCapabilities) throws BundleException { if (provideElements == null) return; for (ManifestElement provideElement : provideElements) { String[] namespaces = provideElement.getValueComponents(); Map<String, Object> attributes = getAttributes(provideElement); Map<String, String> directives = getDirectives(provideElement); for (String namespace : namespaces) { if (PROHIBITED_CAPABILITIES.contains(namespace) || (checkSystemCapabilities && SYSTEM_CAPABILITIES.contains(namespace))) { throw new BundleException("A bundle is not allowed to define a capability in the " + namespace + " name space.", BundleException.MANIFEST_ERROR); //$NON-NLS-1$ //$NON-NLS-2$ } builder.addCapability(namespace, directives, attributes); } } }
private static void getRequireCapabilities(ModuleRevisionBuilder builder, ManifestElement[] requireElements) throws BundleException { if (requireElements == null) return; for (ManifestElement requireElement : requireElements) { String[] namespaces = requireElement.getValueComponents(); Map<String, Object> attributes = getAttributes(requireElement); Map<String, String> directives = getDirectives(requireElement); for (String namespace : namespaces) { builder.addRequirement(namespace, directives, attributes); } } }
private static void getRequireCapabilities(ModuleRevisionBuilder builder, ManifestElement[] requireElements) throws BundleException { if (requireElements == null) return; for (ManifestElement requireElement : requireElements) { String[] namespaces = requireElement.getValueComponents(); Map<String, Object> attributes = getAttributes(requireElement); Map<String, String> directives = getDirectives(requireElement); for (String namespace : namespaces) { builder.addRequirement(namespace, directives, attributes); } } }
private static void getRequireCapabilities(ModuleRevisionBuilder builder, ManifestElement[] requireElements) throws BundleException { if (requireElements == null) return; for (ManifestElement requireElement : requireElements) { String[] namespaces = requireElement.getValueComponents(); Map<String, Object> attributes = getAttributes(requireElement); Map<String, String> directives = getDirectives(requireElement); for (String namespace : namespaces) { builder.addRequirement(namespace, directives, attributes); } } }
private static void getRequireCapabilities(ModuleRevisionBuilder builder, ManifestElement[] requireElements) { if (requireElements == null) return; for (ManifestElement requireElement : requireElements) { String[] namespaces = requireElement.getValueComponents(); Map<String, Object> attributes = getAttributes(requireElement); Map<String, String> directives = getDirectives(requireElement); for (String namespace : namespaces) { builder.addRequirement(namespace, directives, attributes); } } }
private static void getRequireCapabilities(ModuleRevisionBuilder builder, ManifestElement[] requireElements) throws BundleException { if (requireElements == null) return; for (ManifestElement requireElement : requireElements) { String[] namespaces = requireElement.getValueComponents(); Map<String, Object> attributes = getAttributes(requireElement); Map<String, String> directives = getDirectives(requireElement); for (String namespace : namespaces) { builder.addRequirement(namespace, directives, attributes); } } }
private void addImpliedImportPackagePermissions(ManifestElement[] importElements) { ProtectionDomain wovenDomain = ((Generation) ((ModuleRevision) getBundleWiring().getRevision()).getRevisionInfo()).getDomain(); if (wovenDomain != null) { // security is enabled; add the permissions for (ManifestElement clause : importElements) for (String pkg : clause.getValueComponents()) ((BundlePermissions) wovenDomain.getPermissions()).addWovenPermission(new PackagePermission(pkg, PackagePermission.IMPORT)); } }
private void addImpliedImportPackagePermissions(ManifestElement[] importElements) { ProtectionDomain wovenDomain = ((Generation) ((ModuleRevision) getBundleWiring().getRevision()).getRevisionInfo()).getDomain(); if (wovenDomain != null) { // security is enabled; add the permissions for (ManifestElement clause : importElements) for (String pkg : clause.getValueComponents()) ((BundlePermissions) wovenDomain.getPermissions()).addWovenPermission(new PackagePermission(pkg, PackagePermission.IMPORT)); } }
private void addImpliedImportPackagePermissions(ManifestElement[] importElements) { ProtectionDomain wovenDomain = ((Generation) ((ModuleRevision) getBundleWiring().getRevision()).getRevisionInfo()).getDomain(); if (wovenDomain != null) { // security is enabled; add the permissions for (ManifestElement clause : importElements) for (String pkg : clause.getValueComponents()) ((BundlePermissions) wovenDomain.getPermissions()).addWovenPermission(new PackagePermission(pkg, PackagePermission.IMPORT)); } }
private void addImpliedImportPackagePermissions(ManifestElement[] importElements) { ProtectionDomain wovenDomain = ((Generation) ((ModuleRevision) getBundleWiring().getRevision()).getRevisionInfo()).getDomain(); if (wovenDomain != null) { // security is enabled; add the permissions for (ManifestElement clause : importElements) for (String pkg : clause.getValueComponents()) ((BundlePermissions) wovenDomain.getPermissions()).addWovenPermission(new PackagePermission(pkg, PackagePermission.IMPORT)); } }
private void addImpliedImportPackagePermissions(ManifestElement[] importElements) { ProtectionDomain wovenDomain = ((Generation) ((ModuleRevision) getBundleWiring().getRevision()).getRevisionInfo()).getDomain(); if (wovenDomain != null) { // security is enabled; add the permissions for (ManifestElement clause : importElements) for (String pkg : clause.getValueComponents()) ((BundlePermissions) wovenDomain.getPermissions()).addWovenPermission(new PackagePermission(pkg, PackagePermission.IMPORT)); } }
private void addImpliedImportPackagePermissions(ManifestElement[] importElements) { ProtectionDomain wovenDomain = ((Generation) ((ModuleRevision) getBundleWiring().getRevision()).getRevisionInfo()).getDomain(); if (wovenDomain != null) { // security is enabled; add the permissions for (ManifestElement clause : importElements) for (String pkg : clause.getValueComponents()) ((BundlePermissions) wovenDomain.getPermissions()).addWovenPermission(new PackagePermission(pkg, PackagePermission.IMPORT)); } }