Merge tag 'v2.3.28' into testing
[lgpl/argeo-commons.git] / org.argeo.init / src / org / argeo / api / a2 / ProvisioningSource.java
diff --git a/org.argeo.init/src/org/argeo/api/a2/ProvisioningSource.java b/org.argeo.init/src/org/argeo/api/a2/ProvisioningSource.java
new file mode 100644 (file)
index 0000000..ddba2a9
--- /dev/null
@@ -0,0 +1,21 @@
+package org.argeo.api.a2;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Version;
+
+/** Where components are retrieved from. */
+public interface ProvisioningSource {
+       /** List all contributions of this source. */
+       Iterable<A2Contribution> listContributions(Object filter);
+
+       /** Install a module in the OSGi runtime. */
+       Bundle install(BundleContext bc, A2Module module);
+
+       /** Update a module in the OSGi runtime. */
+       void update(Bundle bundle, A2Module module);
+
+       /** Finds the {@link A2Branch} related to this component and version. */
+       A2Branch findBranch(String componentId, Version version);
+
+}