1 /* 2 * $Header: /home/eclipse/org.eclipse.osgi/osgi/src/org/osgi/service/packageadmin/ProvidingBundle.java,v 1.2 2004/05/10 14:40:56 hargrave Exp $ 3 * 4 * Copyright (c) The OSGi Alliance (2004). 5 * All Rights Reserved. 6 * 7 * Implementation of certain elements of the OSGi 8 * Specification may be subject to third party intellectual property 9 * rights, including without limitation, patent rights (such a third party may 10 * or may not be a member of the OSGi Alliance). The OSGi Alliance 11 * is not responsible and shall not be 12 * held responsible in any manner for identifying or failing to identify any or 13 * all such third party intellectual property rights. 14 * 15 * This document and the information contained herein are provided on an "AS 16 * IS" basis and THE OSGI ALLIANCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 17 * BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL 18 * NOT INFRINGE ANY RIGHTS AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR 19 * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL THE OSGI ALLIANCE BE LIABLE FOR ANY 20 * LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF 21 * BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTIAL, 22 * PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH THIS 23 * DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE 24 * POSSIBILITY OF SUCH LOSS OR DAMAGE. 25 * 26 * All Company, brand and product names may be trademarks that are the sole 27 * property of their respective owners. All rights reserved. 28 */ 29 package org.osgi.service.packageadmin; 30 31 import org.osgi.framework.Bundle; 32 33 //================================================================ 34 // Post R3 Addenda. EXPERIMENTAL. 35 //================================================================ 36 37 /** 38 * A provided bundle. 39 * 40 * Instances implementing this interface are created by the Package 41 * Admin service. 42 * 43 * <p>The information about a <tt>ProvidingBundle</tt> provided by this object is 44 * valid only until the next time <tt>PackageAdmin.refreshPackages()</tt> called. 45 * If a <tt>ProvidingBundle</tt> object becomes stale (that is, the bundle it 46 * references has been updated or removed as a result of calling 47 * <tt>PackageAdmin.refreshPackages()</tt>), its <tt>getSymbolicName()</tt> and 48 * <tt>getVersion()</tt> continue to return their old values, 49 * <tt>isRemovalPending()</tt> returns true, and <tt>getBundle()</tt> 50 * and <tt>getRequiringBundles()</tt> return <tt>null</tt>. 51 * @since 1.2 <b>EXPERIMENTAL</b> 52 */ 53 public interface ProvidingBundle { 54 /** 55 * Returns the providing bundle. 56 * 57 * @return The providing bundle, or <tt>null</tt> if this <tt>ProvidingBundle</tt> 58 * object has become stale. 59 */ 60 public Bundle getBundle(); 61 62 /** 63 * Returns the resolved bundles that are currently require the providing bundle. 64 * 65 * @return An array of resolved bundles currently requiring the providing bundle, 66 * or <tt>null</tt> if this <tt>ProvidingBundle</tt> object has become stale. 67 */ 68 public Bundle[] getRequiringBundles(); 69 70 /** 71 * Returns the symbolic name of the providing bundle. 72 * 73 * @return The symbolic name of the providing bundle. 74 */ 75 public String getSymbolicName(); 76 77 /** 78 * Returns the version of the providing bundle. 79 * 80 * @return The version of the providing bundle. 81 */ 82 public String getVersion(); 83 84 /** 85 * Returns <tt>true</tt> if the providing bundle 86 * has been updated or uninstalled. 87 * 88 * @return <tt>true</tt> if the providing bundle 89 * has been updated or uninstalled, or if the 90 * <tt>ProvidingBundle</tt> object has become stale; <tt>false</tt> otherwise. 91 */ 92 public boolean isRemovalPending(); 93 }