KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > adaptor > testsupport > SimpleBundleInstaller


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.runtime.adaptor.testsupport;
12
13 import org.eclipse.osgi.internal.resolver.BundleInstaller;
14 import org.eclipse.osgi.service.resolver.BundleDescription;
15 import org.eclipse.osgi.service.resolver.State;
16 import org.osgi.framework.BundleException;
17
18 public class SimpleBundleInstaller implements BundleInstaller {
19     private State state;
20
21     public SimpleBundleInstaller(State state) {
22         this.state = state;
23     }
24
25     public void installBundle(BundleDescription toInstall) throws BundleException {
26         state.addBundle(toInstall);
27     }
28
29     public void uninstallBundle(BundleDescription toUninstall) throws BundleException {
30         state.removeBundle(toUninstall);
31     }
32
33     public void updateBundle(BundleDescription toUpdate) throws BundleException {
34         //TODO
35
}
36 }
Popular Tags