diff options
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java')
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java index 567c20b98..31cce058c 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainerAdaptor.java @@ -294,4 +294,27 @@ public abstract class ModuleContainerAdaptor { } }; } + + /** + * Allows a builder to be modified before it is used by the container. This gets + * call when a new module is {@link ModuleContainer#install(Module, String, ModuleRevisionBuilder, Object) installed} + * into the container or when an existing module is {@link ModuleContainer#update(Module, ModuleRevisionBuilder, Object) updated} + * with a new revision. The container does not call any methods on the builder before calling this method. + * @param operation The lifecycle operation event that is in progress using the supplied builder. + * This will be either {@link ModuleEvent#INSTALLED installed} or {@link ModuleEvent#UPDATED updated}. + * @param origin The module which originated the lifecycle operation. The origin may be {@code null} for + * {@link ModuleEvent#INSTALLED installed} operations. This is the module + * passed to the {@link ModuleContainer#install(Module, String, ModuleRevisionBuilder, Object) install} or + * {@link ModuleContainer#update(Module, ModuleRevisionBuilder, Object) update} method. + * @param builder the builder that will be used to create a new {@link ModuleRevision}. + * @param revisionInfo the revision info that will be used for the new revision, may be {@code null}. + * @return The modified builder or a completely new builder to be used by the bundle. A {@code null} value + * indicates the original builder should be used, which may have been modified by adding requirements or + * capabilities. + * @since 3.12 + */ + public ModuleRevisionBuilder adaptModuleRevisionBuilder(ModuleEvent operation, Module origin, ModuleRevisionBuilder builder, Object revisionInfo) { + // do nothing by default + return null; + } } |