diff options
author | Thomas Watson | 2012-06-07 17:14:24 +0000 |
---|---|---|
committer | Thomas Watson | 2012-06-07 17:14:24 +0000 |
commit | 883f1251263debbff303100af87e8b5e5ce872ac (patch) | |
tree | cdf46f9a380638008904aa02422b6af19ab2d98d /bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleCollisionHook.java | |
parent | 499ac70cc96fd37279f31bb8b700f9c6b7778391 (diff) | |
download | rt.equinox.framework-883f1251263debbff303100af87e8b5e5ce872ac.tar.gz rt.equinox.framework-883f1251263debbff303100af87e8b5e5ce872ac.tar.xz rt.equinox.framework-883f1251263debbff303100af87e8b5e5ce872ac.zip |
Move the container impl to org.eclipse.osgi
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleCollisionHook.java')
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleCollisionHook.java | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleCollisionHook.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleCollisionHook.java new file mode 100644 index 000000000..94b562c9f --- /dev/null +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleCollisionHook.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2012 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.osgi.container; + +import java.util.Collection; + +/** + * Hook used to determine if a module revision being installed or updated will cause a collision + + */ +public interface ModuleCollisionHook { + + /** + * Specifies a module install operation is being performed. + */ + int INSTALLING = 1; + + /** + * Specifies a module update operation is being performed. + */ + int UPDATING = 2; + + /** + * Filter bundle collisions hook method. This method is called during the + * install or update operation. The operation type will be + * {@link #INSTALLING installing} or {@link #UPDATING updating}. Depending + * on the operation type the target module and the collision candidate + * collection are the following: + * <ul> + * <li> {@link #INSTALLING installing} - The target is the module associated + * which is performing the install operation. The + * collision candidate collection contains the existing modules installed + * which have a current revision with the same symbolic name and version as the + * module being installed. + * <li> {@link #UPDATING updating} - The target is the module being updated. + * The collision candidate collection contains the existing modules installed which have + * a current revision with the same symbolic name and version as the content the target + * module is being updated to. + * </ul> + * This method can filter the collection of collision candidates by removing + * potential collisions. For the specified operation to succeed, the + * collection of collision candidates must be empty when this method returns. + * + * @param operationType The operation type. Must be the value of + * {@link #INSTALLING installing} or {@link #UPDATING updating}. + * @param target The target module used to determine what collision + * candidates to filter. + * @param collisionCandidates The collection of collision candidates. + */ + void filterCollisions(int operationType, Module target, Collection<Module> collisionCandidates); +} |