Bug 538717 - update org.osgi.service.component to R7

Change-Id: I963d642caebd77c934fe4d36454adc5588c6e03b
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
diff --git a/bundles/org.eclipse.osgi.services/.settings/.api_filters b/bundles/org.eclipse.osgi.services/.settings/.api_filters
index 7fc488f..29ccbab 100644
--- a/bundles/org.eclipse.osgi.services/.settings/.api_filters
+++ b/bundles/org.eclipse.osgi.services/.settings/.api_filters
@@ -1,5 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.osgi.services" version="2">
+    <resource path="META-INF/MANIFEST.MF">
+        <filter comment="Ignore OSGI API" id="923795461">
+            <message_arguments>
+                <message_argument value="3.8.0"/>
+                <message_argument value="3.7.100"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="src/org/osgi/service/cm/Configuration.java" type="org.osgi.service.cm.Configuration">
         <filter comment="Ignore OSGi API" id="403804204">
             <message_arguments>
@@ -129,4 +137,129 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="src/org/osgi/service/component/ComponentConstants.java" type="org.osgi.service.component.ComponentConstants">
+        <filter comment="Ignore OSGI API" id="403767336">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.ComponentConstants"/>
+                <message_argument value="COMPONENT_SPECIFICATION_VERSION"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1209008130">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="COMPONENT_SPECIFICATION_VERSION"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java" type="org.osgi.service.component.runtime.dto.ComponentConfigurationDTO">
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ComponentConfigurationDTO"/>
+                <message_argument value="FAILED_ACTIVATION"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ComponentConfigurationDTO"/>
+                <message_argument value="failure"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ComponentConfigurationDTO"/>
+                <message_argument value="service"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="FAILED_ACTIVATION"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="failure"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="service"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java" type="org.osgi.service.component.runtime.dto.ComponentDescriptionDTO">
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ComponentDescriptionDTO"/>
+                <message_argument value="activationFields"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ComponentDescriptionDTO"/>
+                <message_argument value="factoryProperties"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ComponentDescriptionDTO"/>
+                <message_argument value="init"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="activationFields"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="factoryProperties"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="init"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/osgi/service/component/runtime/dto/ReferenceDTO.java" type="org.osgi.service.component.runtime.dto.ReferenceDTO">
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ReferenceDTO"/>
+                <message_argument value="collectionType"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="336658481">
+            <message_arguments>
+                <message_argument value="org.osgi.service.component.runtime.dto.ReferenceDTO"/>
+                <message_argument value="parameter"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="collectionType"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Ignore OSGI API" id="1141899266">
+            <message_arguments>
+                <message_argument value="1.4"/>
+                <message_argument value="3.8"/>
+                <message_argument value="parameter"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
diff --git a/bundles/org.eclipse.osgi.services/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.services/META-INF/MANIFEST.MF
index e9d9afb..cdd7b00 100644
--- a/bundles/org.eclipse.osgi.services/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi.services/META-INF/MANIFEST.MF
@@ -9,10 +9,10 @@
 Bundle-DocUrl: http://www.eclipse.org
 Bundle-ContactAddress: www.eclipse.org
 Export-Package: org.osgi.service.cm;version="1.6";uses:="org.osgi.framework",
- org.osgi.service.component;version="1.3";uses:="org.osgi.framework",
+ org.osgi.service.component;version="1.4";uses:="org.osgi.framework",
  org.osgi.service.component.annotations;version="1.3",
- org.osgi.service.component.runtime;version="1.3";uses:="org.osgi.framework,org.osgi.util.promise,org.osgi.service.component.runtime.dto",
- org.osgi.service.component.runtime.dto;version="1.3";uses:="org.osgi.dto,org.osgi.framework.dto",
+ org.osgi.service.component.runtime;version="1.4";uses:="org.osgi.framework,org.osgi.util.promise,org.osgi.service.component.runtime.dto",
+ org.osgi.service.component.runtime.dto;version="1.4";uses:="org.osgi.dto,org.osgi.framework.dto",
  org.osgi.service.device;version="1.1";uses:="org.osgi.framework",
  org.osgi.service.event;version="1.4";uses:="org.osgi.framework",
  org.osgi.service.http;version="1.2.1";uses:="javax.servlet,javax.servlet.http",
@@ -32,10 +32,10 @@
  org.osgi.framework;version="1.6",
  org.osgi.framework.dto;version="1.8.0",
  org.osgi.service.cm;version="[1.6,1.7)",
- org.osgi.service.component;version="[1.3,1.4)",
+ org.osgi.service.component;version="[1.4,1.5)",
  org.osgi.service.component.annotations;version="[1.3,1.4)",
- org.osgi.service.component.runtime; version="[1.3,1.4)",
- org.osgi.service.component.runtime.dto; version="[1.3,1.4)",
+ org.osgi.service.component.runtime; version="[1.4,1.5)",
+ org.osgi.service.component.runtime.dto; version="[1.4,1.5)",
  org.osgi.service.device;version="[1.1,1.2)",
  org.osgi.service.event;version="[1.4,1.5)",
  org.osgi.service.http;version="[1.2,1.3)",
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentConstants.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentConstants.java
index 624eb56..1638661 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentConstants.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentConstants.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2004, 2015). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2017). 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.
@@ -126,17 +126,28 @@
 
 	/**
 	 * Capability name for Service Component Runtime.
-	 * 
 	 * <p>
 	 * Used in {@code Provide-Capability} and {@code Require-Capability}
 	 * manifest headers with the {@code osgi.extender} namespace. For example:
 	 * 
 	 * <pre>
 	 * Require-Capability: osgi.extender;
-	 *  filter:="(&amp;(osgi.extender=osgi.component)(version&gt;=1.3)(!(version&gt;=2.0)))"
+	 *  filter:="(&amp;(osgi.extender=osgi.component)(version&gt;=1.4)(!(version&gt;=2.0)))"
 	 * </pre>
 	 * 
 	 * @since 1.3
 	 */
 	public static final String	COMPONENT_CAPABILITY_NAME					= "osgi.component";
+
+	/**
+	 * Compile time constant for the Specification Version of Declarative
+	 * Services.
+	 * <p>
+	 * Used in {@code Version} and {@code Requirement} annotations. The value of
+	 * this compile time constant will change when the specification version of
+	 * Declarative Services is updated.
+	 * 
+	 * @since 1.4
+	 */
+	public static final String	COMPONENT_SPECIFICATION_VERSION				= "1.4.0";
 }
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentContext.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentContext.java
index 5499691..cdae000 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentContext.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2004, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2017). 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.
@@ -17,6 +17,7 @@
 package org.osgi.service.component;
 
 import java.util.Dictionary;
+
 import org.osgi.annotation.versioning.ProviderType;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -63,7 +64,7 @@
 	 * @throws ComponentException If Service Component Runtime catches an
 	 *         exception while activating the bound service.
 	 */
-	public Object locateService(String name);
+	public <S> S locateService(String name);
 
 	/**
 	 * Returns the service object for the specified reference name and
@@ -99,11 +100,10 @@
 	public Object[] locateServices(String name);
 
 	/**
-	 * Returns the {@code BundleContext} of the bundle which contains this
+	 * Returns the {@code BundleContext} of the bundle which declares this
 	 * component.
 	 * 
-	 * @return The {@code BundleContext} of the bundle containing this
-	 *         component.
+	 * @return The {@code BundleContext} of the bundle declares this component.
 	 */
 	public BundleContext getBundleContext();
 
@@ -136,7 +136,7 @@
 	 * 
 	 * @return The Component Instance object for the component instance.
 	 */
-	public ComponentInstance getComponentInstance();
+	public <S> ComponentInstance<S> getComponentInstance();
 
 	/**
 	 * Enables the specified component name. The specified component name must
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentFactory.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentFactory.java
index a6422fc..bbe0dd3 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentFactory.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2004, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2016). 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.
@@ -17,6 +17,7 @@
 package org.osgi.service.component;
 
 import java.util.Dictionary;
+
 import org.osgi.annotation.versioning.ProviderType;
 
 /**
@@ -26,11 +27,12 @@
  * and activated rather than automatically creating and activating component
  * configuration as necessary.
  * 
+ * @param <S> Type of Service
  * @ThreadSafe
  * @author $Id$
  */
 @ProviderType
-public interface ComponentFactory {
+public interface ComponentFactory<S> {
 	/**
 	 * Create and activate a new component configuration. Additional properties
 	 * may be provided for the component configuration.
@@ -45,5 +47,5 @@
 	 * @throws ComponentException If Service Component Runtime is unable to
 	 *         activate the component configuration.
 	 */
-	public ComponentInstance newInstance(Dictionary<String, ?> properties);
+	public ComponentInstance<S> newInstance(Dictionary<String, ? > properties);
 }
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentInstance.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentInstance.java
index 8078bab..4d50902 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentInstance.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentInstance.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2004, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2016). 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.
@@ -22,16 +22,16 @@
  * A ComponentInstance encapsulates a component instance of an activated
  * component configuration. ComponentInstances are created whenever a component
  * configuration is activated.
- * 
  * <p>
  * ComponentInstances are never reused. A new ComponentInstance object will be
  * created when the component configuration is activated again.
  * 
+ * @param <S> Type of Service
  * @ThreadSafe
  * @author $Id$
  */
 @ProviderType
-public interface ComponentInstance {
+public interface ComponentInstance<S> {
 	/**
 	 * Dispose of the component configuration for this component instance. The
 	 * component configuration will be deactivated. If the component
@@ -45,5 +45,5 @@
 	 * @return The component instance or {@code null} if the component
 	 *         configuration has been deactivated.
 	 */
-	public Object getInstance();
+	public S getInstance();
 }
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentServiceObjects.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentServiceObjects.java
index 49fc5e8..eef8682 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentServiceObjects.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/ComponentServiceObjects.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2016). 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.
@@ -50,7 +50,6 @@
 	/**
 	 * Returns a service object for the {@link #getServiceReference()
 	 * associated} service.
-	 * 
 	 * <p>
 	 * This method will always return {@code null} when the associated service
 	 * has been become unbound.
@@ -60,8 +59,9 @@
 	 *         a {@code ServiceFactory} does not implement the classes under
 	 *         which it was registered or the {@code ServiceFactory} threw an
 	 *         exception.
-	 * @throws IllegalStateException If the associated service has been become
-	 *         unbound.
+	 * @throws IllegalStateException If the component instance that received
+	 *             this {@code ComponentServiceObjects} object has been
+	 *             deactivated.
 	 * @see #ungetService(Object)
 	 */
 	public S getService();
@@ -69,15 +69,15 @@
 	/**
 	 * Releases a service object for the {@link #getServiceReference()
 	 * associated} service.
-	 * 
 	 * <p>
 	 * The specified service object must no longer be used and all references to
 	 * it should be destroyed after calling this method.
 	 * 
 	 * @param service A service object previously provided by this
 	 *        {@code ComponentServiceObjects} object.
-	 * @throws IllegalStateException If the associated service has been become
-	 *         unbound.
+	 * @throws IllegalStateException If the component instance that received
+	 *             this {@code ComponentServiceObjects} object has been
+	 *             deactivated.
 	 * @throws IllegalArgumentException If the specified service object was not
 	 *         provided by this {@code ComponentServiceObjects} object.
 	 * @see #getService()
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/package-info.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/package-info.java
index 9c158e8..1e5cc0f 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/package-info.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2016). 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.
@@ -15,28 +15,28 @@
  */
 
 /**
- * Service Component Package Version 1.3.
- *
+ * Service Component Package Version 1.4.
  * <p>
  * Bundles wishing to use this package must list the package in the
  * Import-Package header of the bundle's manifest. This package has two types of
  * users: the consumers that use the API in this package and the providers that
  * implement the API in this package.
- *
  * <p>
  * Example import for consumers using the API in this package:
  * <p>
- * {@code  Import-Package: org.osgi.service.component; version="[1.3,2.0)"}
+ * {@code  Import-Package: org.osgi.service.component; version="[1.4,2.0)"}
  * <p>
  * Example import for providers implementing the API in this package:
  * <p>
- * {@code  Import-Package: org.osgi.service.component; version="[1.3,1.4)"}
+ * {@code  Import-Package: org.osgi.service.component; version="[1.4,1.5)"}
  *
  * @author $Id$
  */
 
-@Version("1.3")
+@Version(COMPONENT_SPECIFICATION_VERSION)
 package org.osgi.service.component;
 
+import static org.osgi.service.component.ComponentConstants.COMPONENT_SPECIFICATION_VERSION;
+
 import org.osgi.annotation.versioning.Version;
 
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/packageinfo b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/packageinfo
deleted file mode 100644
index 0117a56..0000000
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.3
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/ServiceComponentRuntime.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/ServiceComponentRuntime.java
old mode 100644
new mode 100755
index 59760dc..5c261c4
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/ServiceComponentRuntime.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/ServiceComponentRuntime.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2017). 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.
@@ -17,8 +17,10 @@
 package org.osgi.service.component.runtime;
 
 import java.util.Collection;
+
 import org.osgi.annotation.versioning.ProviderType;
 import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.runtime.dto.ComponentConfigurationDTO;
 import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO;
@@ -30,7 +32,6 @@
  * service components and their life cycle. The {@code ServiceComponentRuntime}
  * service allows introspection of the components managed by Service Component
  * Runtime.
- * 
  * <p>
  * This service differentiates between a {@link ComponentDescriptionDTO} and a
  * {@link ComponentConfigurationDTO}. A {@link ComponentDescriptionDTO} is a
@@ -38,7 +39,10 @@
  * {@link ComponentConfigurationDTO} is a representation of an actual instance
  * of a declared component description parameterized by component properties.
  * <p>
- * 
+ * This service must be registered with a {@link Constants#SERVICE_CHANGECOUNT}
+ * service property that must be updated each time the SCR DTOs available from
+ * this service change.
+ * <p>
  * Access to this service requires the
  * {@code ServicePermission[ServiceComponentRuntime, GET]} permission. It is
  * intended that only administrative bundles should be granted this permission
@@ -97,7 +101,8 @@
 	 * @param description The component description. Must not be {@code null}.
 	 * @return A collection containing a snapshot of the current component
 	 *         configurations for the specified component description. An empty
-	 *         collection is returned if there are none.
+	 *         collection is returned if there are none or if the provided
+	 *         component description does not belong to an active bundle.
 	 */
 	Collection<ComponentConfigurationDTO> getComponentConfigurationDTOs(ComponentDescriptionDTO description);
 
@@ -121,11 +126,9 @@
 
 	/**
 	 * Enables the specified component description.
-	 * 
 	 * <p>
 	 * If the specified component description is currently enabled, this method
 	 * has no effect.
-	 * 
 	 * <p>
 	 * This method must return after changing the enabled state of the specified
 	 * component description. Any actions that result from this, such as
@@ -133,21 +136,20 @@
 	 * asynchronously to this method call.
 	 * 
 	 * @param description The component description to enable. Must not be
-	 *        {@code null}.
+	 *            {@code null}.
 	 * @return A promise that will be resolved when the actions that result from
 	 *         changing the enabled state of the specified component have
-	 *         completed.
+	 *         completed. If the provided description does not belong to an
+	 *         active bundle, a failed promise is returned.
 	 * @see #isComponentEnabled(ComponentDescriptionDTO)
 	 */
 	Promise<Void> enableComponent(ComponentDescriptionDTO description);
 
 	/**
 	 * Disables the specified component description.
-	 * 
 	 * <p>
 	 * If the specified component description is currently disabled, this method
 	 * has no effect.
-	 * 
 	 * <p>
 	 * This method must return after changing the enabled state of the specified
 	 * component description. Any actions that result from this, such as
@@ -155,10 +157,11 @@
 	 * asynchronously to this method call.
 	 * 
 	 * @param description The component description to disable. Must not be
-	 *        {@code null}.
+	 *            {@code null}.
 	 * @return A promise that will be resolved when the actions that result from
 	 *         changing the enabled state of the specified component have
-	 *         completed.
+	 *         completed. If the provided description does not belong to an
+	 *         active bundle, a failed promise is returned.
 	 * @see #isComponentEnabled(ComponentDescriptionDTO)
 	 */
 	Promise<Void> disableComponent(ComponentDescriptionDTO description);
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java
old mode 100644
new mode 100755
index a3e98bb..aabff50
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentConfigurationDTO.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2018). 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.
@@ -17,7 +17,9 @@
 package org.osgi.service.component.runtime.dto;
 
 import java.util.Map;
+
 import org.osgi.dto.DTO;
+import org.osgi.framework.dto.ServiceReferenceDTO;
 import org.osgi.service.component.ComponentContext;
 
 /**
@@ -59,6 +61,23 @@
 	public static final int			ACTIVE						= 8;
 
 	/**
+	 * The component configuration failed to activate.
+	 * <p>
+	 * This means the component configuration is satisfied but that either:
+	 * <ul>
+	 * <li>an exception occurred loading the implementation class,</li>
+	 * <li>the static initializer threw an exception,</li>
+	 * <li>the constructor threw an exception, or</li>
+	 * <li>the activate method threw an exception.</li>
+	 * </ul>
+	 * The failure information from the exception is available from
+	 * {@link #failure}.
+	 * 
+	 * @since 1.4
+	 */
+	public static final int				FAILED_ACTIVATION			= 16;
+
+	/**
 	 * The representation of the component configuration's component
 	 * description.
 	 */
@@ -66,10 +85,10 @@
 
 	/**
 	 * The current state of the component configuration.
-	 * 
 	 * <p>
 	 * This is one of {@link #UNSATISFIED_CONFIGURATION},
-	 * {@link #UNSATISFIED_REFERENCE}, {@link #SATISFIED} or {@link #ACTIVE}.
+	 * {@link #UNSATISFIED_REFERENCE}, {@link #SATISFIED}, {@link #ACTIVE}, or
+	 * {@link #FAILED_ACTIVATION}.
 	 */
 	public int							state;
 
@@ -110,4 +129,33 @@
 	 * empty if the component configuration has no unsatisfied references.
 	 */
 	public UnsatisfiedReferenceDTO[]	unsatisfiedReferences;
+
+	/**
+	 * The failure information if the component configuration state is
+	 * {@link #FAILED_ACTIVATION}.
+	 * <p>
+	 * This is the failure exception converted to a String using:
+	 * 
+	 * <pre>
+	 * StringWriter sw = new StringWriter();
+	 * exception.printStackTrace(new PrintWriter(sw));
+	 * sw.toString();
+	 * </pre>
+	 * 
+	 * This must be {@code null} if the component configuration state is not
+	 * {@link #FAILED_ACTIVATION}.
+	 * 
+	 * @since 1.4
+	 */
+	public String						failure;
+
+	/**
+	 * The registered service of the component configuration.
+	 * <p>
+	 * This must be non-{@code null} if the component configuration is
+	 * registered as a service. Otherwise it must be {@code null}.
+	 * 
+	 * @since 1.4
+	 */
+	public ServiceReferenceDTO			service;
 }
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java
old mode 100644
new mode 100755
index 9f098a6..78df935
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ComponentDescriptionDTO.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2017). 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.
@@ -17,6 +17,7 @@
 package org.osgi.service.component.runtime.dto;
 
 import java.util.Map;
+
 import org.osgi.dto.DTO;
 import org.osgi.framework.dto.BundleDTO;
 
@@ -49,7 +50,7 @@
 	 * <p>
 	 * This is declared in the {@code factory} attribute of the
 	 * {@code component} element. This must be {@code null} if the component
-	 * description is not declared as a component factory.
+	 * description is not declared as a factory component.
 	 */
 	public String				factory;
 
@@ -101,11 +102,11 @@
 	public String[]				serviceInterfaces;
 
 	/**
-	 * The declared component properties.
-	 * 
+	 * The component properties.
 	 * <p>
-	 * These are declared in the {@code property} and {@code properties}
-	 * elements.
+	 * These are declared in the component description by the {@code property}
+	 * and {@code properties} elements as well as the {@code target} attribute
+	 * of the {@code reference} elements.
 	 */
 	public Map<String, Object>	properties;
 
@@ -168,4 +169,38 @@
 	 * pid if the component description does not declare a configuration pid.
 	 */
 	public String[]				configurationPid;
+
+	/**
+	 * The factory properties.
+	 * <p>
+	 * These are declared in the component description by the
+	 * {@code factory-property} and {@code factory-properties} elements. This
+	 * must be {@code null} if the component description is not declared as a
+	 * {@link #factory factory component}.
+	 * 
+	 * @since 1.4
+	 */
+	public Map<String,Object>	factoryProperties;
+
+	/**
+	 * The activation fields.
+	 * <p>
+	 * These are declared in the {@code activation-fields} attribute of the
+	 * {@code component} element. The array must be empty if the component
+	 * description does not declare any activation fields.
+	 * 
+	 * @since 1.4
+	 */
+	public String[]				activationFields;
+
+	/**
+	 * The constructor parameter count.
+	 * <p>
+	 * This is declared in the {@code init} attribute of the {@code component}
+	 * element. This must be {@code 0} if the component description does not
+	 * declare an {@code init} attribute.
+	 * 
+	 * @since 1.4
+	 */
+	public int					init;
 }
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ReferenceDTO.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ReferenceDTO.java
old mode 100644
new mode 100755
index fca2413..c806c0a
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ReferenceDTO.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/ReferenceDTO.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013, 2015). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2017). 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.
@@ -145,4 +145,27 @@
 	 * not declare a scope for the reference.
 	 */
 	public String	scope;
+
+	/**
+	 * The zero-based parameter number of the constructor parameter for the
+	 * reference.
+	 * <p>
+	 * This is declared in the {@code parameter} attribute of the
+	 * {@code reference} element. This must be {@code null} if the component
+	 * description does not declare a parameter number for the reference.
+	 * 
+	 * @since 1.4
+	 */
+	public Integer	parameter;
+
+	/**
+	 * The collection type for the reference.
+	 * <p>
+	 * This is declared in the {@code field-collection-type} attribute of the
+	 * {@code reference} element. This must be {@code null} if the component
+	 * description does not declare a collection type for the reference.
+	 * 
+	 * @since 1.4
+	 */
+	public String	collectionType;
 }
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/SatisfiedReferenceDTO.java
old mode 100644
new mode 100755
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/package-info.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/package-info.java
index d7d82da..017778a 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/package-info.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2014, 2016). 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.
@@ -15,28 +15,28 @@
  */
 
 /**
- * Service Component Runtime Data Transfer Objects Package Version 1.3.
- *
+ * Service Component Runtime Data Transfer Objects Package Version 1.4.
  * <p>
  * Bundles wishing to use this package must list the package in the
  * Import-Package header of the bundle's manifest. This package has two types of
  * users: the consumers that use the API in this package and the providers that
  * implement the API in this package.
- *
  * <p>
  * Example import for consumers using the API in this package:
  * <p>
- * {@code  Import-Package: org.osgi.service.component.runtime.dto; version="[1.3,2.0)"}
+ * {@code  Import-Package: org.osgi.service.component.runtime.dto; version="[1.4,2.0)"}
  * <p>
  * Example import for providers implementing the API in this package:
  * <p>
- * {@code  Import-Package: org.osgi.service.component.runtime.dto; version="[1.3,1.4)"}
+ * {@code  Import-Package: org.osgi.service.component.runtime.dto; version="[1.4,1.5)"}
  *
  * @author $Id$
  */
 
-@Version("1.3")
+@Version(COMPONENT_SPECIFICATION_VERSION)
 package org.osgi.service.component.runtime.dto;
 
+import static org.osgi.service.component.ComponentConstants.COMPONENT_SPECIFICATION_VERSION;
+
 import org.osgi.annotation.versioning.Version;
 
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/packageinfo b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/packageinfo
deleted file mode 100644
index 0117a56..0000000
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/dto/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.3
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/package-info.java b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/package-info.java
index 3d4fa42..9265b99 100644
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/package-info.java
+++ b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2016). 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.
@@ -15,28 +15,28 @@
  */
 
 /**
- * Service Component Runtime Package Version 1.3.
- *
+ * Service Component Runtime Package Version 1.4.
  * <p>
  * Bundles wishing to use this package must list the package in the
  * Import-Package header of the bundle's manifest. This package has two types of
  * users: the consumers that use the API in this package and the providers that
  * implement the API in this package.
- *
  * <p>
  * Example import for consumers using the API in this package:
  * <p>
- * {@code  Import-Package: org.osgi.service.component.runtime; version="[1.3,2.0)"}
+ * {@code  Import-Package: org.osgi.service.component.runtime; version="[1.4,2.0)"}
  * <p>
  * Example import for providers implementing the API in this package:
  * <p>
- * {@code  Import-Package: org.osgi.service.component.runtime; version="[1.3,1.4)"}
+ * {@code  Import-Package: org.osgi.service.component.runtime; version="[1.4,1.5)"}
  *
  * @author $Id$
  */
 
-@Version("1.3")
+@Version(COMPONENT_SPECIFICATION_VERSION)
 package org.osgi.service.component.runtime;
 
+import static org.osgi.service.component.ComponentConstants.COMPONENT_SPECIFICATION_VERSION;
+
 import org.osgi.annotation.versioning.Version;
 
diff --git a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/packageinfo b/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/packageinfo
deleted file mode 100644
index 0117a56..0000000
--- a/bundles/org.eclipse.osgi.services/src/org/osgi/service/component/runtime/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.3