/** * @return Config. */ @Configuration public Option[] bundleDelegatingConfig() { List<Option> options = new ArrayList<>(Arrays.asList(baseConfig())); // Add bundles we require. options.add( streamBundle(bundle() .add(BasicIgniteTestActivator.class) .add(TestOsgiFlags.class) .add(TestOsgiFlagsImpl.class) .set(Constants.BUNDLE_SYMBOLICNAME, BasicIgniteTestActivator.class.getSimpleName()) .set(Constants.BUNDLE_ACTIVATOR, BasicIgniteTestActivator.class.getName()) .set(Constants.EXPORT_PACKAGE, "org.apache.ignite.osgi.activators") .set(Constants.DYNAMICIMPORT_PACKAGE, "*") .build(withBnd()))); // Uncomment this if you'd like to debug inside the container. // options.add(KarafDistributionOption.debugConfiguration()); return CoreOptions.options(options.toArray(new Option[0])); }
/** * Creates a composite option of {@link ProvisionOption}s. This is handy when bundles are built * on the fly via TinyBundles. * * @param streams * provision sources * * @return composite option of provision options * * @throws IllegalArgumentException * - If a problem occured while flushing streams */ public static Option provision(final InputStream... streams) { validateNotNull(streams, "streams"); final UrlProvisionOption[] options = new UrlProvisionOption[streams.length]; int i = 0; for (InputStream stream : streams) { options[i++] = streamBundle(stream); } return provision(options); }
/** * Creates a composite option of {@link ProvisionOption}s. This is handy when bundles are built * on the fly via TinyBundles. * * @param streams * provision sources * * @return composite option of provision options * * @throws IllegalArgumentException * - If a problem occured while flushing streams */ public static Option provision(final InputStream... streams) { validateNotNull(streams, "streams"); final UrlProvisionOption[] options = new UrlProvisionOption[streams.length]; int i = 0; for (InputStream stream : streams) { options[i++] = streamBundle(stream); } return provision(options); }
public static Option projectToOption(ProjectParser context, ProvisionControl<?> control) throws IOException { byte[] byteArray = projectToByteArray(context); UrlProvisionOption bundle = CoreOptions.streamBundle(new ByteArrayInputStream(byteArray)); if (control != null) { bundle.startLevel(control.getStartLevel()); bundle.start(control.shouldStart()); bundle.update(control.shouldUpdate()); } return bundle; }
bundle.set(Constants.BUNDLE_ACTIVATOR, ConfigurationOptionActivator.class.getName()); bundle.set(Constants.BUNDLE_MANIFESTVERSION, "2"); return CoreOptions.streamBundle(bundle.build()).startLevel(1).start(true).update(false);
bundle.set(Constants.BUNDLE_ACTIVATOR, ConfigurationOptionActivator.class.getName()); bundle.set(Constants.BUNDLE_MANIFESTVERSION, "2"); return CoreOptions.streamBundle(bundle.build()).startLevel(1).start(true).update(false);