Package: ImportExpander

ImportExpander

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2008, 2010 VMware Inc.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * VMware Inc. - initial contribution
10: *******************************************************************************/
11:
12: package org.eclipse.virgo.kernel.osgi.framework;
13:
14: import java.util.List;
15:
16: import org.eclipse.virgo.util.osgi.manifest.BundleManifest;
17:
18: /**
19: * {@link ImportExpander} is an interface for expanding library and bundle imports into package imports and propagating
20: * promoted imports across a collection of bundles. <p />
21: *
22: * <strong>Concurrent Semantics</strong><br />
23: *
24: * Implementations of this interface should be thread safe.
25: *
26: */
27: public interface ImportExpander {
28:
29: public interface ImportPromotionVector {
30: }
31:
32: /**
33: * Modifies the supplied {@link BundleManifest bundle manifests} by replacing all of the <code>Import-Library</code>
34: * and <code>Import-Bundle</code> header entries with the equivalent <code>Import-Package</code> header entries and
35: * propagating promoted imports across the supplied bundle manifests.
36: *
37: * @param bundleManifests the manifests to perform <code>Import-Library</code> and <code>Import-Bundle</code>
38: * expansion upon.
39: * @return vector of imports promoted
40: * @throws UnableToSatisfyDependenciesException if a manifest's dependencies cannot be satisfied
41: * @throws ImportMergeException if there was a clash between some of the imports being merged
42: */
43: ImportPromotionVector expandImports(List<BundleManifest> bundleManifests) throws UnableToSatisfyDependenciesException, ImportMergeException;
44:
45: }