felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1656030 - in /felix/trunk/scr/src/main/java/org: apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java osgi/service/component/ComponentConstants.java osgi/service/component/runtime/dto/ReferenceDTO.java
Date Fri, 30 Jan 2015 14:39:22 GMT
Author: cziegeler
Date: Fri Jan 30 14:39:21 2015
New Revision: 1656030

URL: http://svn.apache.org/r1656030
Log:
Update to latest DS api

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
    felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
    felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java?rev=1656030&r1=1656029&r2=1656030&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
Fri Jan 30 14:39:21 2015
@@ -310,19 +310,12 @@ public class ServiceComponentRuntimeImpl
 			dto.bind = r.getBind();
 			dto.cardinality = r.getCardinality();
 			dto.field = r.getField();
+			dto.fieldOption = r.getFieldOption();
 			dto.interfaceName = r.getInterface();
 			dto.name = r.getName();
 			dto.policy = r.getPolicy();
 			dto.policyOption = r.getPolicyOption();
 			dto.scope = r.getScope().name();
-			if ( r.getField() != null )
-			{
-		        dto.strategy = r.isReplace() ? ReferenceDTO.STRATEGY_FIELD_REPLACE : ReferenceDTO.STRATEGY_FIELD_UPDATE;
-			}
-			else
-			{
-			    dto.strategy = r.getBind() != null ? ReferenceDTO.STRATEGY_METHOD : ReferenceDTO.STRATEGY_LOOKUP;
-			}
 			dto.target = r.getTarget();
 			dto.unbind = r.getUnbind();
 			dto.updated = r.getUpdated();

Modified: felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java?rev=1656030&r1=1656029&r2=1656030&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java (original)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/ComponentConstants.java Fri Jan
30 14:39:21 2015
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2004, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2015). 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.
@@ -21,7 +21,7 @@ import org.osgi.annotation.versioning.Pr
 /**
  * Defines standard names for Service Component constants.
  * 
- * @author $Id: 93b7c4e0215afc23d3f2dce477cdf4298fd366a4 $
+ * @author $Id: 624eb5610c2127d24ce76f16b3cc146cbcf6db57 $
  */
 @ProviderType
 public interface ComponentConstants {
@@ -123,4 +123,20 @@ public interface ComponentConstants {
 	 * @since 1.1
 	 */
 	public static final int		DEACTIVATION_REASON_BUNDLE_STOPPED			= 6;
+
+	/**
+	 * 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)))"
+	 * </pre>
+	 * 
+	 * @since 1.3
+	 */
+	public static final String	COMPONENT_CAPABILITY_NAME					= "osgi.component";
 }

Modified: felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java?rev=1656030&r1=1656029&r2=1656030&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java
(original)
+++ felix/trunk/scr/src/main/java/org/osgi/service/component/runtime/dto/ReferenceDTO.java
Fri Jan 30 14:39:21 2015
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2015). 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.
@@ -23,56 +23,11 @@ import org.osgi.dto.DTO;
  * 
  * @since 1.3
  * @NotThreadSafe
- * @author $Id: 906b26512776b149670ec3048a8714dc99ff447a $
+ * @author $Id: fca2413271fcded16b4ebe3c6628fe8660e2575e $
  */
 public class ReferenceDTO extends DTO {
 
 	/**
-	 * Constant for the lookup strategy
-	 * 
-	 * @see #strategy
-	 */
-	public static final String	STRATEGY_LOOKUP			= "LOOKUP";
-
-	/**
-	 * Constant for the method strategy
-	 * 
-	 * @see #strategy
-	 */
-	public static final String	STRATEGY_METHOD			= "METHOD";
-
-	/**
-	 * Constant for the field replace strategy
-	 * 
-	 * @see #strategy
-	 */
-	public static final String	STRATEGY_FIELD_REPLACE	= "FIELD_REPLACE";
-
-	/**
-	 * Constant for the field update strategy
-	 * 
-	 * @see #strategy
-	 */
-	public static final String	STRATEGY_FIELD_UPDATE	= "FIELD_UPDATE";
-
-	/**
-	 * The strategy of the reference.
-	 * 
-	 * <p>
-	 * This field returns the strategy used for this reference. If the value is
-	 * either {@code #STRATEGY_FIELD_REPLACE} or {@code #STRATEGY_FIELD_UPDATE},
-	 * {@link #field} returns the name of the field. If the strategy is
-	 * {@code #STRATEGY_METHOD} {@link #bind}, {@link #unbind}, and
-	 * {@link #updated} return the name of the methods.
-	 *
-	 * @see #STRATEGY_FIELD_REPLACE
-	 * @see #STRATEGY_FIELD_UPDATE
-	 * @see #STRATEGY_LOOKUP
-	 * @see #STRATEGY_METHOD
-	 */
-	public String	strategy;
-
-	/**
 	 * The name of the reference.
 	 * 
 	 * <p>
@@ -136,9 +91,8 @@ public class ReferenceDTO extends DTO {
 	 * 
 	 * <p>
 	 * This is declared in the {@code bind} attribute of the {@code reference}
-	 * element. This must be {@code null} if the component is not using the
-	 * method strategy or the component description does not declare a bind
-	 * method for the reference.
+	 * element. This must be {@code null} if the component description does not
+	 * declare a bind method for the reference.
 	 */
 	public String	bind;
 
@@ -147,11 +101,8 @@ public class ReferenceDTO extends DTO {
 	 * 
 	 * <p>
 	 * This is declared in the {@code unbind} attribute of the {@code reference}
-	 * element. This must be {@code null} if the component is not using the
-	 * method strategy or the component description does not declare an unbind
-	 * method for the reference.
-	 *
-	 * @see #strategy
+	 * element. This must be {@code null} if the component description does not
+	 * declare an unbind method for the reference.
 	 */
 	public String	unbind;
 
@@ -160,11 +111,8 @@ public class ReferenceDTO extends DTO {
 	 * 
 	 * <p>
 	 * This is declared in the {@code updated} attribute of the
-	 * {@code reference} element. This must be {@code null} if the component is
-	 * not using the method strategy or the component description does not
-	 * declare an updated method for the reference.
-	 * 
-	 * @see #strategy
+	 * {@code reference} element. This must be {@code null} if the component
+	 * description does not declare an updated method for the reference.
 	 */
 	public String	updated;
 
@@ -173,14 +121,22 @@ public class ReferenceDTO extends DTO {
 	 * 
 	 * <p>
 	 * This is declared in the {@code field} attribute of the {@code reference}
-	 * element. This must be {@code null} if the component is using the lookup
-	 * or method strategy.
-	 * 
-	 * @see #strategy
+	 * element. This must be {@code null} if the component description does not
+	 * declare a field for the reference.
 	 */
 	public String	field;
 
 	/**
+	 * The field option of the reference.
+	 * 
+	 * <p>
+	 * This is declared in the {@code field-option} attribute of the
+	 * {@code reference} element. This must be {@code null} if the component
+	 * description does not declare a field for the reference.
+	 */
+	public String	fieldOption;
+
+	/**
 	 * The scope of the reference.
 	 * 
 	 * <p>



Mime
View raw message