Search in sources :

Example 51 with BundleDescription

use of org.eclipse.osgi.service.resolver.BundleDescription in project rt.equinox.framework by eclipse.

the class TestDynamic_003 method create_bundle_3.

// end of method
public BundleDescription create_bundle_3(StateObjectFactory sof) {
    java.util.Dictionary dictionary_3 = new java.util.Properties();
    BundleDescription bundle = null;
    dictionary_3.put("Bundle-ManifestVersion", "2");
    dictionary_3.put("Bundle-SymbolicName", "C");
    dictionary_3.put("Export-Package", "p; q; r; uses:=\"p,q,r\"");
    try {
        bundle = sof.createBundleDescription(dictionary_3, "bundle_3", 3);
    } catch (BundleException be) {
        fail(be.getMessage());
    }
    return bundle;
}
Also used : BundleDescription(org.eclipse.osgi.service.resolver.BundleDescription) BundleException(org.osgi.framework.BundleException)

Example 52 with BundleDescription

use of org.eclipse.osgi.service.resolver.BundleDescription in project rt.equinox.framework by eclipse.

the class TestDynamic_005 method create_bundle_3.

// end of method
public BundleDescription create_bundle_3(StateObjectFactory sof) {
    java.util.Dictionary dictionary_3 = new java.util.Properties();
    BundleDescription bundle = null;
    dictionary_3.put("Bundle-ManifestVersion", "2");
    dictionary_3.put("Bundle-SymbolicName", "C");
    dictionary_3.put("Export-Package", "q");
    try {
        bundle = sof.createBundleDescription(dictionary_3, "bundle_3", 3);
    } catch (BundleException be) {
        fail(be.getMessage());
    }
    return bundle;
}
Also used : BundleDescription(org.eclipse.osgi.service.resolver.BundleDescription) BundleException(org.osgi.framework.BundleException)

Example 53 with BundleDescription

use of org.eclipse.osgi.service.resolver.BundleDescription in project rt.equinox.framework by eclipse.

the class TestDynamic_005 method create_bundle_1.

// end method
public BundleDescription create_bundle_1(StateObjectFactory sof) {
    java.util.Dictionary dictionary_1 = new java.util.Properties();
    BundleDescription bundle = null;
    dictionary_1.put("Bundle-ManifestVersion", "2");
    dictionary_1.put("Bundle-SymbolicName", "A");
    dictionary_1.put("DynamicImport-Package", "*");
    try {
        bundle = sof.createBundleDescription(dictionary_1, "bundle_1", 1);
    } catch (BundleException be) {
        fail(be.getMessage());
    }
    return bundle;
}
Also used : BundleDescription(org.eclipse.osgi.service.resolver.BundleDescription) BundleException(org.osgi.framework.BundleException)

Example 54 with BundleDescription

use of org.eclipse.osgi.service.resolver.BundleDescription in project rt.equinox.framework by eclipse.

the class TestGenerated_001 method create_bundle_5.

// end of method
public BundleDescription create_bundle_5(StateObjectFactory sof) {
    java.util.Dictionary dictionary_5 = new java.util.Properties();
    BundleDescription bundle = null;
    dictionary_5.put("Bundle-ManifestVersion", "2");
    dictionary_5.put("Bundle-SymbolicName", "E");
    dictionary_5.put("Import-Package", "a1; version=7, a2; version=8, a3; version=5");
    try {
        bundle = sof.createBundleDescription(dictionary_5, "bundle_5", 5);
    } catch (BundleException be) {
        fail(be.getMessage());
    }
    return bundle;
}
Also used : BundleDescription(org.eclipse.osgi.service.resolver.BundleDescription) BundleException(org.osgi.framework.BundleException)

Example 55 with BundleDescription

use of org.eclipse.osgi.service.resolver.BundleDescription in project rt.equinox.framework by eclipse.

the class TestGenerated_001 method create_bundle_2.

// end of method
public BundleDescription create_bundle_2(StateObjectFactory sof) {
    java.util.Dictionary dictionary_2 = new java.util.Properties();
    BundleDescription bundle = null;
    dictionary_2.put("Bundle-ManifestVersion", "2");
    dictionary_2.put("Bundle-SymbolicName", "B");
    dictionary_2.put("Import-Package", "a1; version=\"[3, 3.9]\", a2; version=\"[8, 8.9]\", a3; version=0");
    try {
        bundle = sof.createBundleDescription(dictionary_2, "bundle_2", 2);
    } catch (BundleException be) {
        fail(be.getMessage());
    }
    return bundle;
}
Also used : BundleDescription(org.eclipse.osgi.service.resolver.BundleDescription) BundleException(org.osgi.framework.BundleException)

Aggregations

BundleDescription (org.eclipse.osgi.service.resolver.BundleDescription)202 BundleException (org.osgi.framework.BundleException)106 State (org.eclipse.osgi.service.resolver.State)87 Hashtable (java.util.Hashtable)70 Dictionary (java.util.Dictionary)28 ExportPackageDescription (org.eclipse.osgi.service.resolver.ExportPackageDescription)18 ArrayList (java.util.ArrayList)11 StateDelta (org.eclipse.osgi.service.resolver.StateDelta)11 BundleDelta (org.eclipse.osgi.service.resolver.BundleDelta)10 List (java.util.List)9 HashMap (java.util.HashMap)8 File (java.io.File)6 Map (java.util.Map)6 CaseInsensitiveDictionaryMap (org.eclipse.osgi.framework.util.CaseInsensitiveDictionaryMap)6 VersionConstraint (org.eclipse.osgi.service.resolver.VersionConstraint)6 Version (org.osgi.framework.Version)6 BundleWiring (org.osgi.framework.wiring.BundleWiring)5 BundleContext (org.osgi.framework.BundleContext)2 ResolverHook (org.osgi.framework.hooks.resolver.ResolverHook)2 Collection (java.util.Collection)1