Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a99fa42a11644de6982def2326034b23f1dd804d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*******************************************************************************
 * Copyright (c) 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.core.runtime.adaptor.testsupport;

import org.eclipse.osgi.internal.resolver.BundleInstaller;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.osgi.service.resolver.State;
import org.osgi.framework.BundleException;

public class SimpleBundleInstaller implements BundleInstaller {
	private State state;

	public SimpleBundleInstaller(State state) {
		this.state = state;
	}

	public void installBundle(BundleDescription toInstall) throws BundleException {
		state.addBundle(toInstall);
	}

	public void uninstallBundle(BundleDescription toUninstall) throws BundleException {
		state.removeBundle(toUninstall);
	}

	public void updateBundle(BundleDescription toUpdate) throws BundleException {
		//TODO
	}
}

Back to the top