You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by jw...@apache.org on 2012/02/24 15:22:59 UTC

svn commit: r1293266 - in /aries/trunk/subsystem: subsystem-api/src/main/java/org/osgi/service/repository/ subsystem-api/src/main/java/org/osgi/service/resolver/ subsystem-api/src/main/java/org/osgi/service/subsystem/ subsystem-core/src/main/java/org/a...

Author: jwross
Date: Fri Feb 24 14:22:58 2012
New Revision: 1293266

URL: http://svn.apache.org/viewvc?rev=1293266&view=rev
Log:
ARIES-825: Update subsystems to latest Subsystem, Resolver, and Repository APIs.

(1) Updated repository, resolver, and subsystems api with the latest changes.
(2) Fixed resulting compile errors in core and itests.

Modified:
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/ContentNamespace.java
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/Repository.java
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/RepositoryContent.java
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Environment.java
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/HostedCapability.java
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/ResolutionException.java
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Resolver.java
    aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/subsystem/SubsystemConstants.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/AriesSubsystem.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemFileResource.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemStreamResource.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/TestRepositoryContent.java

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/ContentNamespace.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/ContentNamespace.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/ContentNamespace.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/ContentNamespace.java Fri Feb 24 14:22:58 2012
@@ -13,78 +13,81 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.osgi.service.repository;
 
+import org.osgi.resource.Namespace;
 
 /**
- * Constants for use in the "osgi.content" namespace. This namespace is used to
- * locate content via the {@link Repository#findProviders(java.util.Collection)}
- * method.
+ * Content Capability and Requirement Namespace.
+ * 
+ * <p>
+ * This class defines the names for the attributes and directives for this
+ * namespace. All unspecified capability attributes are of type {@code String}
+ * and are used as arbitrary matching attributes for the capability. The values
+ * associated with the specified directive and attribute keys are of type
+ * {@code String}, unless otherwise indicated.
+ * 
+ * TODO ### Not sure this is complete. Needs to by synced with 132.4.
+ * 
+ * @Immutable
+ * @version $Id: 67140e8968223906b03ef68fbfff653020e564fb $
  */
-public final class ContentNamespace {
-	private ContentNamespace() {
-		// non-instantiable
-	}
+public final class ContentNamespace extends Namespace {
 
 	/**
-	 * Namespace of the content capability
+	 * Namespace name for content capabilities and requirements.
+	 * 
+	 * <p>
+	 * Also, the capability attribute used to specify the unique identifier of
+	 * the content. This identifier is the {@code SHA-256} hash of the content.
 	 */
-	public final String		CAPABILITY					= "osgi.content";
+	public static final String	CONTENT_NAMESPACE					= "osgi.content";
 
 	/**
-	 * Checksum attribute of a resource
+	 * The mandatory capability attribute that contains the size, in bytes, of
+	 * the content. The value of this attribute must be of type {@code Long}.
 	 */
-	public final String		CHECKSUM_ATTRIBUTE			= "checksum";
+	public final String			CAPABILITY_SIZE_ATTRIBUTE			= "size";
 
 	/**
-	 * The checksum algorithm used to calculate the {@link #CHECKSUM_ATTRIBUTE}
-	 * if not specified this is assumed to be SHA-256 - TODO need default?
+	 * The capability attribute that contains a human readable copyright notice.
 	 */
-	public final String		CHECKSUM_ALGO_ATTRIBUTE		= "checksumAlgo";
+	public final String			CAPABILITY_COPYRIGHT_ATTRIBUTE		= "copyright";
 
 	/**
-	 * A copyright statement for the resource
+	 * The capability attribute that contains a human readable description.
 	 */
-	public final String		COPYRIGHT_ATTRIBUTE			= "copyright";
+	public final String			CAPABILITY_DESCRIPTION_ATTRIBUTE	= "description";
 
 	/**
-	 * A human readable description of this resource
+	 * The capability attribute that contains a reference to the resource
+	 * containing the documentation for the content.
+	 * 
 	 */
-	public final String		DESCRIPTION_ATTRIBUTE		= "description";
+	public final String			CAPABILITY_DOCUMENTATION_ATTRIBUTE	= "documentation";
 
 	/**
-	 * A URL where documentation for this resource can be accessed
+	 * The capability attribute that contains the license name of the resource as 
+	 * defined in the Bundle-License header.
 	 */
-	public final String		DOCUMENTATION_URL_ATTRIBUTE	= "documentation";
+	public final String			CAPABILITY_LICENSE_ATTRIBUTE		= "license";
 
 	/**
-	 * Provides an optional machine readable form of license information. See
-	 * section 3.2.1.10 of the OSGi Core Specification for information on it's
-	 * usage.
+	 * The capability attribute that defines the IANA MIME Type/Format for this
+	 * content.
+	 * 
 	 */
-	public final String		LICENSE_ATTRIBUTE			= "license";
+	public final String			CAPABILITY_MIME_ATTRIBUTE			= "mime";
 
 	/**
-	 * A URL where source control management for this resource is located
+	 * A Requirement Directive that specifies that this Requirement is a
+	 * relation to another Resource with the given content type.
+	 * 
 	 */
-	public final String		SCM_URL_ATTRIBUTE			= "scm";
+	public final String			REQUIREMENT_RELATION_DIRECTIVE		= "relation";
 
-	/**
-	 * The size of this resource in bytes.
-	 */
-	public final String		SIZE_ATTRIBUTE				= "size";
-
-	/**
-	 * A URL where source code for this resource is located
-	 */
-	public final String		SOURCE_URL_ATTRIBUTE		= "source";
-
-	/**
-	 * All attributes defined in this interface
-	 */
-	public final String[]	ATTRIBUTES					= {CHECKSUM_ATTRIBUTE,
-			CHECKSUM_ALGO_ATTRIBUTE, COPYRIGHT_ATTRIBUTE,
-			DESCRIPTION_ATTRIBUTE, DOCUMENTATION_URL_ATTRIBUTE,
-			LICENSE_ATTRIBUTE, SCM_URL_ATTRIBUTE, SIZE_ATTRIBUTE,
-			SOURCE_URL_ATTRIBUTE						};
+	private ContentNamespace() {
+		// empty
+	}
 }

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/Repository.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/Repository.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/Repository.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/Repository.java Fri Feb 24 14:22:58 2012
@@ -39,23 +39,13 @@ import org.osgi.resource.Resource;
  * properties.
  * 
  * @ThreadSafe
- * @version $Id: c8ac56d5b6e0376018c8a3bb872010596fc8087a $
+ * @version $Id: ed526d7ce615bed833c679eb154f1b2ee57ff8fa $
  */
 public interface Repository {
 	/**
-	 * Service attribute to uniquely identify this repository
+	 * Service property to provide an optional URL related to this repository
 	 */
-	String	ID				= "repository.id";
-
-	/**
-	 * Service attribute to define the name of this repository
-	 */
-	String	NAME			= "repository.name";
-
-	/**
-	 * Service attribute to provide a human readable name for this repository
-	 */
-	String	DISPLAY_NAME	= "repository.displayName";
+	String	URL	= "repository.url";
 
 	/**
 	 * Find any capabilities that match the supplied requirements.
@@ -68,6 +58,9 @@ public interface Repository {
 	 * @return A map of requirements to capabilities that match the supplied
 	 *         requirements
 	 * 
+	 * 
+	 * ### is it guaranteed that each Requirement given is in the returned map?
+	 * 
 	 * @throws NullPointerException if requirements is null
 	 */
 	Map<Requirement, Collection<Capability>> findProviders(

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/RepositoryContent.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/RepositoryContent.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/RepositoryContent.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/repository/RepositoryContent.java Fri Feb 24 14:22:58 2012
@@ -16,10 +16,9 @@
 
 package org.osgi.service.repository;
 
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.*;
 
-import org.osgi.resource.Resource;
+import org.osgi.resource.*;
 
 /**
  * An accessor for the content of a resource.
@@ -30,17 +29,18 @@ import org.osgi.resource.Resource;
  * {@code InputStream} to the content of the resource.
  * 
  * @ThreadSafe
- * @version $Id: 6a91b25ad4eff5054b1436ba9f5c9c4a58e89cf7 $
+ * @version $Id: 45eb6e8f54d08d5491a342bfafbcc9b6465f06e0 $
  */
 public interface RepositoryContent {
 
 	/**
 	 * Returns a new input stream to the underlying artifact for the associated
-	 * resource.
+	 * resource. The given osgiContent must map to the SHA-256 that is stored
+	 * in the {@code osgi.content} Capability under {@code osgi.content}.
+	 * 
+	 * @param osgiContent The SHA-256 of the content
 	 * 
 	 * @return A new input stream for associated resource.
-	 * @throws IOException If an I/O error occurs while creating the input
-	 *         stream.
 	 */
-	InputStream getContent() throws IOException;
+	InputStream getContent(String osgiContent) throws IOException;
 }

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Environment.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Environment.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Environment.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Environment.java Fri Feb 24 14:22:58 2012
@@ -65,19 +65,18 @@ public interface Environment {
 	 * The returned list contains {@link HostedCapability} objects where the
 	 * Resource must be the declared Resource of the Capability. The Resolver
 	 * can then add additional {@link HostedCapability} objects with the
-	 * {@link #insertHostedCapability(Resource, Capability, List)} method when
-	 * it, for example, attaches fragments. Those {@link HostedCapability}
-	 * objects will then use the host's Resource which likely differs from the
-	 * declared Resource of the corresponding Capability.
+	 * {@link #insertHostedCapability(List, HostedCapability)} method when it,
+	 * for example, attaches fragments. Those {@link HostedCapability} objects
+	 * will then use the host's Resource which likely differs from the declared
+	 * Resource of the corresponding Capability.
 	 * <p>
 	 * The returned list is in priority order, the Capabilities with a lower
 	 * index have a preference over later {@link HostedCapability} objects.
 	 * <p>
 	 * The collection returned is unmodifiable but additional elements can be
-	 * added through the
-	 * {@link #insertHostedCapability(Resource, Capability, List)} method. In
-	 * general, this is necessary when the Resolver uses Capabilities declared
-	 * in a Resource but that must originate from an attached host.
+	 * added through the {@link #insertHostedCapability(List, HostedCapability)}
+	 * method. In general, this is necessary when the Resolver uses Capabilities
+	 * declared in a Resource but that must originate from an attached host.
 	 * <p>
 	 * Each returned Capability must match the given Requirement. This implies
 	 * that the filter in the Requirement must match as well as any namespace
@@ -87,33 +86,34 @@ public interface Environment {
 	 * @param requirement the requirement that a resolver is attempting to
 	 *        satisfy
 	 * 
-	 * @return a List of {@link HostedCapability} objects that match the
+	 * @return a List of {@link Capability} objects that match the given
 	 *         requirement
 	 * 
 	 * @throws NullPointerException if the requirement is null
 	 */
-	List<HostedCapability> findProviders(Requirement requirement);
+	List<Capability> findProviders(Requirement requirement);
 
 	/**
-	 * Add a Resource/Capability tuple to the list of capabilities returned from
+	 * Add a {@link HostedCapability} to the list of capabilities returned from
 	 * {@link #findProviders(Requirement)}.
 	 * <p>
-	 * Used by the Resolver to add additional Capabilities, with a potentially
-	 * different Resource as its source, to the set of Capabilities. This
-	 * function is necessary to allow fragments to attach to hosts, thereby
-	 * changing the origin of a Capability.
-	 * <p>
-	 * The given Capability must
+	 * Used by the Resolver to add Capabilities that are hosted by another
+	 * Resource the set of Capabilities returned from
+	 * {@link #findProviders(Requirement)}. This function is necessary to allow
+	 * fragments to attach to hosts, thereby changing the origin of a
+	 * Capability. The implementation must insert the HostedCapability in a
+	 * place that makes the list contain the preference order. It must return
+	 * the position of this {@link HostedCapability}.
 	 * 
-	 * @param resource The Resource that hosts this capability
-	 * @param capability The Capability to be hosted
+	 * @param capability The Hosted Capability to insert
 	 * @param capabilities The list returned from
 	 *        {@link #findProviders(Requirement)}
-	 * @return The newly created HostedCapability
+	 * @param hostedCapability
+	 * @return The position where the Hosted Capability was inserted
 	 * 
 	 */
-	HostedCapability insertHostedCapability(Resource resource, Capability capability,
-			List<HostedCapability> capabilities);
+	int insertHostedCapability(List<Capability> capabilities,
+			HostedCapability hostedCapability);
 
 	/**
 	 * Test if a given requirement should be wired in a given resolve operation.

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/HostedCapability.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/HostedCapability.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/HostedCapability.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/HostedCapability.java Fri Feb 24 14:22:58 2012
@@ -20,22 +20,23 @@ import org.osgi.resource.Capability;
 import org.osgi.resource.Resource;
 
 /**
- * A HostedCapability is a tuple of a Resource with a Capability to model the
- * cases where the declared Resource of a Capability does not match the runtime
- * state. This is the case for fragments, when a fragment attaches a host, most
- * of its Capabilities and Requirements become hosted by the attached host.
- * Since a fragment can attach multiple hosts, a single Capability can actually
- * be hosted multiple times.
+ * A HostedCapability is a Capability where the {@link #getResource()} method
+ * returns a Resource that hosts this Capability instead of declaring it. This
+ * is necessary for cases where the declared Resource of a Capability does not
+ * match the runtime state. This is for example the case for fragments, when a fragment
+ * attaches a host, most of its Capabilities and Requirements become hosted by
+ * the attached host. Since a fragment can attach multiple hosts, a single
+ * Capability can actually be hosted multiple times.
  * 
  * @Threadsafe
- * @version $Id: 8b77d074366fb7dcd8cd209d767be652b1db0cfd $
+ * @version $Id: 38f5d2b31ef4bfe805a207a87d452672a9ac5178 $
  */
-public interface HostedCapability {
+public interface HostedCapability extends Capability {
 
 	/**
-	 * Return the Resource of this HostedCapability.
+	 * Return the Resource that hosts this Capability.
 	 * 
-	 * @return the Resource
+	 * @return the hosting Resource
 	 */
 	Resource getResource();
 
@@ -44,5 +45,5 @@ public interface HostedCapability {
 	 * 
 	 * @return the Capability
 	 */
-	Capability getCapability();
+	Capability getDeclaredCapability();
 }

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/ResolutionException.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/ResolutionException.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/ResolutionException.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/ResolutionException.java Fri Feb 24 14:22:58 2012
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -32,97 +32,76 @@ import org.osgi.resource.Requirement;
  * {@link #getUnresolvedRequirements()} method.
  * 
  * <p>
- * Resolver implementations may subclass this class to provide extra state
+ * Resolver implementations may extend this class to provide extra state
  * information about the reason for the resolution failure.
- * 
- * @ThreadSafe
- * @Immutable
  */
 public class ResolutionException extends RuntimeException {
 
-  private static final long serialVersionUID = 1L;
+	private static final long				serialVersionUID	= 1L;
+
+	private final Collection<Requirement>	unresolvedRequirements;
 
-  // NOTE used requirement[] not collection to avoid accidental serialization
-  // issues
-  private Requirement[] unresolvedRequirements;
-
-  /**
-   * Creates an exception of type {@code ResolutionException}.
-   * 
-   * <p>
-   * This method creates an {@code ResolutionException} object with the
-   * specified message, cause and unresolvedRequirements.
-   * 
-   * @param message
-   *          The message.
-   * @param cause
-   *          The cause of this exception.
-   * @param unresolvedRequirements
-   *          the requirements that are unresolved or null if no unresolved requirements
-   *          information is provided.
-   */
-  public ResolutionException(String message, Throwable cause,
-      Collection<Requirement> unresolvedRequirements) {
-    super(message, cause);
-    if (unresolvedRequirements != null) {
-      // copy array both fixes serialization issues and
-      // ensures exception is immutable
-      this.unresolvedRequirements = unresolvedRequirements
-          .toArray(new Requirement[unresolvedRequirements.size()]);
-    }
-  }
-
-  /**
-   * Creates an exception of type {@code ResolutionException}.
-   * 
-   * <p>
-   * This method creates an {@code ResolutionException} object with the
-   * specified message.
-   * 
-   * @param message
-   *          The message.
-   */
-  public ResolutionException(String message) {
-    super(message);
-  }
-
-  /**
-   * Creates an exception of type {@code ResolutionException}.
-   * 
-   * <p>
-   * This method creates an {@code ResolutionException} object with the
-   * specified cause.
-   * 
-   * @param cause
-   *          The cause of this exception.
-   */
-  public ResolutionException(Throwable cause) {
-    super(cause);
-  }
-
-  /**
-   * May contain one or more unresolved mandatory requirements from mandatory
-   * resources.
-   * 
-   * <p>
-   * This exception is provided for informational purposes and the specific set
-   * of requirements that are returned after a resolve failure is not defined.
-   * 
-   * @return a collection of requirements that are unsatisfied
-   */
-  public Collection<Requirement> getUnresolvedRequirements() {
-    // creating at each call ensures internal data is immutable
-    // TODO could use a transient field to reduce CPU cost at expense of RAM -
-    // both trivial compared to code complexity
-    if (unresolvedRequirements == null) {
-      return Collections.EMPTY_LIST;
-    } else {
-      ArrayList<Requirement> requirements = new ArrayList<Requirement>(
-          unresolvedRequirements.length);
-      for (Requirement r : unresolvedRequirements) {
-        requirements.add(r);
-      }
-      return requirements;
-    }
-  }
+	/**
+	 * Create a {@code ResolutionException} with the specified message, cause
+	 * and unresolved requirements.
+	 * 
+	 * @param message The message.
+	 * @param cause The cause of this exception.
+	 * @param unresolvedRequirements The unresolved mandatory requirements from
+	 *        mandatory resources or {@code null} if no unresolved requirements
+	 *        information is provided.
+	 */
+	public ResolutionException(String message, Throwable cause,
+			Collection<Requirement> unresolvedRequirements) {
+		super(message, cause);
+		if ((unresolvedRequirements == null)
+				|| unresolvedRequirements.isEmpty()) {
+			this.unresolvedRequirements = emptyCollection();
+		}
+		else {
+			this.unresolvedRequirements = Collections
+					.unmodifiableCollection(new ArrayList<Requirement>(
+							unresolvedRequirements));
+		}
+	}
+
+	/**
+	 * Create a {@code ResolutionException} with the specified message.
+	 * 
+	 * @param message The message.
+	 */
+	public ResolutionException(String message) {
+		super(message);
+		unresolvedRequirements = emptyCollection();
+	}
+
+	/**
+	 * Create a {@code ResolutionException} with the specified cause.
+	 * 
+	 * @param cause The cause of this exception.
+	 */
+	public ResolutionException(Throwable cause) {
+		super(cause);
+		unresolvedRequirements = emptyCollection();
+	}
+
+	private static <T> Collection<T> emptyCollection() {
+		return Collections.EMPTY_LIST;
+	}
+
+	/**
+	 * Return the unresolved requirements, if any, for this exception.
+	 * 
+	 * <p>
+	 * The unresolved requirements are provided for informational purposes and
+	 * the specific set of unresolved requirements that are provided after a
+	 * resolve failure is not defined.
+	 * 
+	 * @return A collection of the unresolved requirements for this exception.
+	 *         The returned collection may be empty if no unresolved
+	 *         requirements information is provided.
+	 */
+	public Collection<Requirement> getUnresolvedRequirements() {
+		return unresolvedRequirements;
+	}
 }

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Resolver.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Resolver.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Resolver.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/resolver/Resolver.java Fri Feb 24 14:22:58 2012
@@ -32,7 +32,7 @@ import org.osgi.resource.Wire;
  * specified {@link Resource resources} based on a supplied {@link Environment}.
  *
  * @ThreadSafe
- * @version $Id: 2207d63318bcc17df98cab5e649e4e74245b01e4 $
+ * @version $Id: a844927600988c6e4690c5bdf055e828f7a206a3 $
  */
 public interface Resolver {
 	/**

Modified: aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/subsystem/SubsystemConstants.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/subsystem/SubsystemConstants.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/subsystem/SubsystemConstants.java (original)
+++ aries/trunk/subsystem/subsystem-api/src/main/java/org/osgi/service/subsystem/SubsystemConstants.java Fri Feb 24 14:22:58 2012
@@ -30,7 +30,12 @@ public class SubsystemConstants {
 	 * Manifest header attribute identifying the deployed version.
 	 */
 	public static final String DEPLOYED_VERSION_ATTRIBUTE = "deployed-version";
-	
+
+	/**
+	 * Manifest header identifying the deployment manifest version.  If not present, the default value is 1.
+	 */
+	public static final String DEPLOYMENT_MANIFESTVERSION = "Deployment-ManifestVersion";
+
 	/**
 	 * Manifest header used to express a preference for particular resources to
 	 * satisfy implicit package dependencies.

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/AriesSubsystem.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/AriesSubsystem.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/AriesSubsystem.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/AriesSubsystem.java Fri Feb 24 14:22:58 2012
@@ -872,7 +872,7 @@ public class AriesSubsystem implements S
 				constituents.add(subsystem);
 				return subsystem;
 			}
-			subsystem = new AriesSubsystem(location, ssr.getContent(), this);
+			subsystem = new AriesSubsystem(location, ssr.getContent(null), this);
 			installSubsystemResource(subsystem, coordination, false);
 			return subsystem;
 		}
@@ -896,7 +896,7 @@ public class AriesSubsystem implements S
 				revision = (BundleRevision)resource;
 			}
 			else {
-				InputStream content = ((RepositoryContent)resource).getContent();
+				InputStream content = ((RepositoryContent)resource).getContent(null);
 				String location = provisionTo.getSubsystemId() + "@" + provisionTo.getSymbolicName() + "@" + ResourceHelper.getSymbolicNameAttribute(resource);
 				Bundle bundle = provisionTo.region.installBundle(location, content);
 				revision = bundle.adapt(BundleRevision.class);
@@ -954,7 +954,7 @@ public class AriesSubsystem implements S
 		}
 		else if (resource instanceof SubsystemFileResource) {
 			SubsystemFileResource sfr = (SubsystemFileResource)resource;
-			subsystem = (AriesSubsystem)install(sfr.getLocation(), sfr.getContent(), coordination);
+			subsystem = (AriesSubsystem)install(sfr.getLocation(), sfr.getContent(null), coordination);
 			return;
 		}
 		else if (resource instanceof SubsystemDirectoryResource) {
@@ -964,7 +964,7 @@ public class AriesSubsystem implements S
 		}
 		else if (resource instanceof RepositoryContent) {
 			String location = getSubsystemId() + "@" + getSymbolicName() + "@" + ResourceHelper.getSymbolicNameAttribute(resource);
-			subsystem = (AriesSubsystem)install(location, ((RepositoryContent)resource).getContent(), coordination);
+			subsystem = (AriesSubsystem)install(location, ((RepositoryContent)resource).getContent(null), coordination);
 			return;
 		}
 		else {

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/obr/felix/FelixResourceAdapter.java Fri Feb 24 14:22:58 2012
@@ -97,7 +97,7 @@ public class FelixResourceAdapter implem
 	}
 	
 	@Override
-	public InputStream getContent() throws IOException {
+	public InputStream getContent(String osgiContent) throws IOException {
 		return new URL(resource.getURI()).openStream();
 	}
 

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/BundleResource.java Fri Feb 24 14:22:58 2012
@@ -94,7 +94,7 @@ public class BundleResource implements R
 	}
 	
 	@Override
-	public InputStream getContent() throws IOException {
+	public InputStream getContent(String osgiContent) throws IOException {
 		return content.openStream();
 	}
 

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemFileResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemFileResource.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemFileResource.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemFileResource.java Fri Feb 24 14:22:58 2012
@@ -78,7 +78,7 @@ public class SubsystemFileResource imple
 	}
 
 	@Override
-	public InputStream getContent() throws IOException {
+	public InputStream getContent(String osgiContent) throws IOException {
 		return new FileInputStream(file);
 	}
 	

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemStreamResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemStreamResource.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemStreamResource.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/resource/SubsystemStreamResource.java Fri Feb 24 14:22:58 2012
@@ -96,7 +96,7 @@ public class SubsystemStreamResource imp
 	}
 
 	@Override
-	public InputStream getContent() throws IOException {
+	public InputStream getContent(String osgiContent) throws IOException {
 		return new ByteArrayInputStream(content);
 	}
 

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/TestRepositoryContent.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/TestRepositoryContent.java?rev=1293266&r1=1293265&r2=1293266&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/TestRepositoryContent.java (original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/TestRepositoryContent.java Fri Feb 24 14:22:58 2012
@@ -47,7 +47,7 @@ public class TestRepositoryContent exten
 	}
 
 	@Override
-	public InputStream getContent() throws IOException {
+	public InputStream getContent(String osgiContent) throws IOException {
 		return new ByteArrayInputStream(content);
 	}