[292678] p2 API declaration
diff --git a/plugins/org.eclipse.wst.server.discovery/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.server.discovery/META-INF/MANIFEST.MF
index 27b6616..611da77 100644
--- a/plugins/org.eclipse.wst.server.discovery/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.server.discovery/META-INF/MANIFEST.MF
@@ -5,16 +5,16 @@
 Bundle-SymbolicName: org.eclipse.wst.server.discovery;singleton:=true
 Bundle-Version: 1.0.100.qualifier
 Bundle-Activator: org.eclipse.wst.server.discovery.internal.Activator
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0, 4.0)",
- org.eclipse.ui;bundle-version="[3.5.0, 4.0)",
- org.eclipse.equinox.p2.core;bundle-version="[1.0.100, 2.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.0.100, 2.0)",
- org.eclipse.equinox.p2.engine;bundle-version="[1.0.100, 2.0)",
- org.eclipse.equinox.p2.metadata;bundle-version="[1.0.0, 2.0)",
- org.eclipse.equinox.p2.director;bundle-version="[1.0.100, 2.0)",
- org.eclipse.equinox.p2.updatesite;bundle-version="[1.0.100, 2.0)",
- org.eclipse.equinox.p2.ui;bundle-version="[1.0.100, 2.0)",
- org.eclipse.equinox.p2.repository;bundle-version="[1.0.0, 2.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0)",
+ org.eclipse.ui;bundle-version="[3.5.0,4.0)",
+ org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.director;bundle-version="[1.0.100,2.0)",
+ org.eclipse.equinox.p2.updatesite;bundle-version="[1.0.100,2.0)",
+ org.eclipse.equinox.p2.ui;bundle-version="[2.0.0,3.0)",
+ org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Export-Package: org.eclipse.wst.server.discovery,
diff --git a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/ExtensionWizard.java b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/ExtensionWizard.java
index 6fd43b5..96f7e8a 100644
--- a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/ExtensionWizard.java
+++ b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/ExtensionWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 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
@@ -13,9 +13,9 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AcceptLicensesWizardPage;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.ui.AcceptLicensesWizardPage;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.Wizard;
@@ -43,8 +43,8 @@
 
 	public void addPages() {
 		super.addPages();
-		Policy policy = new Policy();
-		licensePage = new AcceptLicensesWizardPage(policy, new IInstallableUnit[0], null);
+		ProvisioningUI ui = ProvisioningUI.getDefaultUI();
+		licensePage = new AcceptLicensesWizardPage(ui.getLicenseManager(), new IInstallableUnit[0], null);
 		licensePage.setWizard(this);
 		errorPage = new ErrorWizardPage();
 		errorPage.setWizard(this);
diff --git a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionInstallableUnitQuery.java b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionInstallableUnitQuery.java
index 1e8abaa..3c1236a 100644
--- a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionInstallableUnitQuery.java
+++ b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionInstallableUnitQuery.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 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
@@ -11,23 +11,17 @@
 package org.eclipse.wst.server.discovery.internal;
 
 import java.util.List;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.MatchQuery;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.MatchQuery;
-
-public class ExtensionInstallableUnitQuery extends MatchQuery {
+public class ExtensionInstallableUnitQuery extends MatchQuery<IInstallableUnit> {
 	private List<String> list;
 
 	public ExtensionInstallableUnitQuery(List<String> list) {
 		this.list = list;
 	}
 
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		IInstallableUnit candidate = (IInstallableUnit) object;
-		if (list.contains(candidate.getId()))
-			return true;
-		return false;
+	public boolean isMatch(IInstallableUnit candidate) {
+		return list.contains(candidate.getId());
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java
index 490589a..5da95c4 100644
--- a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java
+++ b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 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
@@ -12,21 +12,15 @@
 
 import java.io.InputStream;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.Query;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.wst.server.discovery.internal.model.Extension;
 import org.eclipse.wst.server.discovery.internal.model.ExtensionUpdateSite;
@@ -154,17 +148,16 @@
 		IProfileRegistry profileRegistry = (IProfileRegistry) getService(Activator.getDefault().getBundle().getBundleContext(), IProfileRegistry.class.getName());
 		IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF);
 		
-		Query query = InstallableUnitQuery.ANY;
+		IQuery<IInstallableUnit> query = InstallableUnitQuery.ANY;
 		//Query query = new InstallableUnitQuery("org.eclipse.wst.server.core.serverAdapter");
 		//List<String> list2 = new ArrayList();
 		//Query query = new ExtensionInstallableUnitQuery(list2);
-		Collector collector = new Collector();
-		profile.query(query, collector, monitor);
+		IQueryResult<IInstallableUnit> collector = profile.query(query, monitor);
 		
 		List<Extension> list = new ArrayList<Extension>();
-		Iterator iter = collector.iterator();
+		Iterator<IInstallableUnit> iter = collector.iterator();
 		while (iter.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) iter.next();
+			IInstallableUnit iu = iter.next();
 			if (!list.contains(iu))
 				list.add(new Extension(iu, null));
 		}
diff --git a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/PatternInstallableUnitQuery.java b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/PatternInstallableUnitQuery.java
index c211e5c..41e5c95 100644
--- a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/PatternInstallableUnitQuery.java
+++ b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/PatternInstallableUnitQuery.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 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
@@ -10,20 +10,17 @@
  *******************************************************************************/
 package org.eclipse.wst.server.discovery.internal;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.MatchQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.MatchQuery;
 
-public class PatternInstallableUnitQuery extends MatchQuery {
+public class PatternInstallableUnitQuery extends MatchQuery<IInstallableUnit> {
 	private String categoryId;
 
 	public PatternInstallableUnitQuery(String categoryId) {
 		this.categoryId = categoryId;
 	}
 
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		IInstallableUnit candidate = (IInstallableUnit) object;
+	public boolean isMatch(IInstallableUnit candidate) {
 		if (categoryId != null && candidate.getId().endsWith(categoryId))
 			return true;
 		return false;
diff --git a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/Extension.java b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/Extension.java
index df1d4a2..4f87a62 100644
--- a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/Extension.java
+++ b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/Extension.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 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
@@ -11,20 +11,12 @@
 package org.eclipse.wst.server.discovery.internal.model;
 
 import java.net.URI;
-
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
 import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.DefaultPhaseSet;
-import org.eclipse.equinox.internal.provisional.p2.engine.IEngine;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.wst.server.discovery.internal.Activator;
 import org.eclipse.wst.server.discovery.internal.ExtensionUtility;
@@ -35,7 +27,7 @@
 	private URI uri;
 
 	private ProvisioningContext provContext;
-	private ProvisioningPlan plan;
+	private IProvisioningPlan plan;
 
 	public Extension(IInstallableUnit iu, URI uri) {
 		this.iu = iu;
@@ -43,11 +35,11 @@
 	}
 
 	public String getName() {
-		return IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME);
+		return iu.getProperty(IInstallableUnit.PROP_NAME, null);
 	}
 
 	public String getDescription() {
-		return IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION);
+		return iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
 	}
 
 	public Image getImage() {
@@ -56,11 +48,15 @@
 	}
 
 	public String getLicense() {
-		return iu.getLicense().getBody();
+		ILicense[] licenses = iu.getLicenses(null);
+		if (licenses == null || licenses.length == 0)
+			return "";
+		//TODO support multiple licenses
+		return licenses[0].getBody();
 	}
 
 	public String getProvider() {
-		return IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER);
+		return iu.getProperty(IInstallableUnit.PROP_PROVIDER, null);
 	}
 
 	public String getId() {
@@ -74,30 +70,27 @@
 	public IStatus install(IProgressMonitor monitor) {
 		BundleContext bundleContext = Activator.getDefault().getBundle().getBundleContext();
 		
-		ProvisioningPlan plan = getProvisioningPlan(true, monitor);
+		IProvisioningPlan plan = getProvisioningPlan(true, monitor);
 		if (!plan.getStatus().isOK())
 			return plan.getStatus();
 		
-		IProfileRegistry profileRegistry = (IProfileRegistry) ExtensionUtility.getService(bundleContext, IProfileRegistry.class.getName());
-		IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF);
-		
 		IEngine engine = (IEngine) ExtensionUtility.getService(bundleContext, IEngine.SERVICE_NAME);
-		return engine.perform(profile, new DefaultPhaseSet(), plan.getOperands(), provContext, monitor);
+		return engine.perform(plan, new DefaultPhaseSet(), monitor);
 	}
 
 	public IInstallableUnit[] getIUs() {
 		return new IInstallableUnit[] { iu };
 	}
 
-	public ProvisioningPlan getProvisioningPlan(boolean explain, IProgressMonitor monitor) {
+	public IProvisioningPlan getProvisioningPlan(boolean explain, IProgressMonitor monitor) {
 		if (plan != null)
 			return plan;
 		
 		//long time = System.currentTimeMillis();
 		BundleContext bundleContext = Activator.getDefault().getBundle().getBundleContext();
-		IPlanner planner = (IPlanner) ExtensionUtility.getService(bundleContext, IPlanner.class.getName());
+		IPlanner planner = (IPlanner) ExtensionUtility.getService(bundleContext, IPlanner.SERVICE_NAME);
 		
-		IProfileRegistry profileRegistry = (IProfileRegistry) ExtensionUtility.getService(bundleContext, IProfileRegistry.class.getName());
+		IProfileRegistry profileRegistry = (IProfileRegistry) ExtensionUtility.getService(bundleContext, IProfileRegistry.SERVICE_NAME);
 		IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF);
 		ProfileChangeRequest pcr = new ProfileChangeRequest(profile);
 		pcr.addInstallableUnits(new IInstallableUnit[] { iu } );
diff --git a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/ExtensionUpdateSite.java b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/ExtensionUpdateSite.java
index 526aa5a..b45cffb 100644
--- a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/ExtensionUpdateSite.java
+++ b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/ExtensionUpdateSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 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
@@ -11,20 +11,17 @@
 package org.eclipse.wst.server.discovery.internal.model;
 
 import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
+import java.util.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.query.ExpressionQuery;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 import org.eclipse.wst.server.discovery.internal.PatternInstallableUnitQuery;
 import org.eclipse.wst.server.discovery.internal.Trace;
 /*
@@ -72,25 +69,19 @@
 			//Query query = CompoundQuery.createCompoundQuery(new Query[] {new
 			//		IUPropertyQuery(IInstallableUnit.PROP_TYPE_CATEGORY, Boolean.toString(true)),
 			//		new IUPropertyQuery(IInstallableUnit.PROP_NAME,"org.eclipse.wst.server.core.serverAdapter")}, true);
-			Query query = new PatternInstallableUnitQuery("org.eclipse.wst.server.core.serverAdapter");
+			IQuery<IInstallableUnit> query = new PatternInstallableUnitQuery("org.eclipse.wst.server.core.serverAdapter");
 			
-			Collector collector = new Collector(); 
-			repo.query(query, collector, monitor);
-			
+			IQueryResult<IInstallableUnit> collector = repo.query(query, monitor);
 			List<Extension> list = new ArrayList<Extension>();
-			Iterator iter = collector.iterator();
-			while (iter.hasNext()) {
-				IInstallableUnit iu = (IInstallableUnit) iter.next();
-				IRequiredCapability[] req = iu.getRequiredCapabilities();
+			for (IInstallableUnit iu: collector.unmodifiableSet()) {
+				Collection<IRequirement> req = iu.getRequiredCapabilities();
 				if (req != null) {
-					for (IRequiredCapability rc : req) {
-						query = new InstallableUnitQuery(rc.getName(), rc.getRange());
-						Collector collector2 = new Collector();
-						repo.query(query, collector2, monitor);
-						
-						Iterator iter2 = collector2.iterator();
+					for (IRequirement requirement : req) {
+					    query = new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, requirement.getMatches());
+					    IQueryResult<IInstallableUnit> collector2 = repo.query(query, monitor);						
+						Iterator<IInstallableUnit> iter2 = collector2.iterator();
 						while (iter2.hasNext()) {
-							IInstallableUnit iu2 = (IInstallableUnit) iter2.next();
+							IInstallableUnit iu2 = iter2.next();
 							if (!list.contains(iu2)) {
 								Extension ext = new Extension(iu2, url2);
 								list.add(ext);
diff --git a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/wizard/ExtensionWizardPage.java b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/wizard/ExtensionWizardPage.java
index a825c9d..ab3a73e 100644
--- a/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/wizard/ExtensionWizardPage.java
+++ b/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/wizard/ExtensionWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 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
@@ -11,11 +11,10 @@
 package org.eclipse.wst.server.discovery.internal.wizard;
 
 import java.lang.reflect.InvocationTargetException;
-
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AcceptLicensesWizardPage;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.ui.AcceptLicensesWizardPage;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.wizard.IWizardPage;
@@ -82,16 +81,16 @@
 	protected void handleSelection(Extension sel) {
 		extension = sel;
 		if (extension == null)
-			licensePage.update(new IInstallableUnit[0], null);
+			licensePage.updateForPlan(new IInstallableUnit[0], null);
 		else {
 			try {
 				getContainer().run(true, true, new IRunnableWithProgress() {
 					public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-						final ProvisioningPlan plan = extension.getProvisioningPlan(true, monitor);
+						final IProvisioningPlan plan = extension.getProvisioningPlan(true, monitor);
 						if (plan != null && plan.getStatus().isOK()) {
 							getShell().getDisplay().asyncExec(new Runnable() {
 								public void run() {
-									licensePage.update(extension.getIUs(), plan);
+									licensePage.updateForPlan(extension.getIUs(), plan);
 									nextPage = licensePage;
 									((ExtensionWizard)getWizard()).setSecondPage(nextPage);
 								}