You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2011/02/27 21:50:51 UTC

svn commit: r1075143 [6/23] - in /aries/tags/blueprint-0.2.1: ./ blueprint-annotation-api/ blueprint-annotation-api/src/ blueprint-annotation-api/src/main/ blueprint-annotation-api/src/main/java/ blueprint-annotation-api/src/main/java/org/ blueprint-an...

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.container;
+
+/**
+ * Type converter to convert an object to a target type.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface Converter {
+
+	/**
+	 * Return if this converter is able to convert the specified object to the
+	 * specified type.
+	 * 
+	 * @param sourceObject The source object <code>s</code> to convert.
+	 * @param targetType The target type <code>T</code>.
+	 * 
+	 * @return <code>true</code> if the conversion is possible,
+	 *         <code>false</code> otherwise.
+	 */
+	boolean canConvert(Object sourceObject, ReifiedType targetType);
+
+	/**
+	 * Convert the specified object to an instance of the specified type.
+	 * 
+	 * @param sourceObject The source object <code>s</code> to convert.
+	 * @param targetType The target type <code>T</code>.
+	 * @return An instance with a type that is assignable from targetType's raw
+	 *         class
+	 * @throws Exception If the conversion cannot succeed. This exception should
+	 *         not be thrown when the {@link #canConvert canConvert} method has
+	 *         returned <code>true</code>.
+	 */
+	Object convert(Object sourceObject, ReifiedType targetType)
+			throws Exception;
+}
\ No newline at end of file

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.container;
+
+/**
+ * Event property names used in Event Admin events published by a Blueprint
+ * Container.
+ * 
+ * <p>
+ * Each type of event is sent to a different topic:
+ * 
+ * <p>
+ * <code>org/osgi/service/blueprint/container/</code><em>&lt;event-type&gt;</em>
+ * 
+ * <p>
+ * where <em>&lt;event-type&gt;</em> can have the values
+ * {@link BlueprintEvent#CREATING CREATING}, {@link BlueprintEvent#CREATED
+ * CREATED}, {@link BlueprintEvent#DESTROYING DESTROYING},
+ * {@link BlueprintEvent#DESTROYED DESTROYED}, {@link BlueprintEvent#FAILURE
+ * FAILURE}, {@link BlueprintEvent#GRACE_PERIOD GRACE_PERIOD}, or
+ * {@link BlueprintEvent#WAITING WAITING}.
+ * 
+ * <p>
+ * Such events have the following properties:
+ * <ul>
+ * <li>{@link #TYPE type}</li>
+ * <li>{@link #EVENT event}</li>
+ * <li>{@link #TIMESTAMP timestamp}</li>
+ * <li>{@link #BUNDLE bundle}</li>
+ * <li>{@link #BUNDLE_SYMBOLICNAME bundle.symbolicName}</li>
+ * <li>{@link #BUNDLE_ID bundle.id}</li>
+ * <li>{@link #BUNDLE_VERSION bundle.version}</li>
+ * <li>{@link #EXTENDER_BUNDLE_SYMBOLICNAME extender.bundle.symbolicName}</li>
+ * <li>{@link #EXTENDER_BUNDLE_ID extender.bundle.id}</li>
+ * <li>{@link #EXTENDER_BUNDLE_VERSION extender.bundle.version}</li>
+ * <li>{@link #DEPENDENCIES dependencies}</li>
+ * <li>{@link #CAUSE cause}</li>
+ * </ul>
+ * 
+ * @Immutable
+ * @version $Revision: 792499 $
+ */
+public class EventConstants {
+	private EventConstants() {
+		// non-instantiable class
+	}
+
+	/**
+	 * The type of the event that has been issued. This property is of type
+	 * <code>Integer</code> and can take one of the values defined in
+	 * {@link BlueprintEvent}.
+	 */
+	public static final String TYPE = "type";
+
+	/**
+	 * The <code>BlueprintEvent</code> object that caused this event. This
+	 * property is of type {@link BlueprintEvent}.
+	 */
+	public static final String EVENT = "event";
+
+	/**
+	 * The time the event was created. This property is of type
+	 * <code>Long</code>.
+	 */
+	public static final String TIMESTAMP = "timestamp";
+
+	/**
+	 * The Blueprint bundle associated with this event. This property is of type
+	 * <code>Bundle</code>.
+	 */
+	public static final String BUNDLE = "bundle";
+
+	/**
+	 * The bundle id of the Blueprint bundle associated with this event. This
+	 * property is of type <code>Long</code>.
+	 */
+	public static final String BUNDLE_ID = "bundle.id";
+
+	/**
+	 * The bundle symbolic name of the Blueprint bundle associated with this
+	 * event. This property is of type <code>String</code>.
+	 */
+	public static final String BUNDLE_SYMBOLICNAME = "bundle.symbolicName";
+
+	/**
+	 * The bundle version of the Blueprint bundle associated with this event.
+	 * This property is of type <code>Version</code>.
+	 */
+	public static final String BUNDLE_VERSION = "bundle.version";
+
+	/**
+	 * The Blueprint extender bundle that is generating this event. This
+	 * property is of type <code>Bundle</code>.
+	 */
+	public static final String EXTENDER_BUNDLE = "extender.bundle";
+
+	/**
+	 * The bundle id of the Blueprint extender bundle that is generating this
+	 * event. This property is of type <code>Long</code>.
+	 */
+	public static final String EXTENDER_BUNDLE_ID = "extender.bundle.id";
+
+	/**
+	 * The bundle symbolic of the Blueprint extender bundle that is generating
+	 * this event. This property is of type <code>String</code>.
+	 */
+	public static final String EXTENDER_BUNDLE_SYMBOLICNAME = "extender.bundle.symbolicName";
+
+	/**
+	 * The bundle version of the Blueprint extender bundle that is generating
+	 * this event. This property is of type <code>Version</code>.
+	 */
+	public static final String EXTENDER_BUNDLE_VERSION = "extender.bundle.version";
+
+	/**
+	 * The filters identifying the missing dependencies that caused this event
+	 * for a {@link BlueprintEvent#FAILURE FAILURE},
+	 * {@link BlueprintEvent#GRACE_PERIOD GRACE_PERIOD}, or
+	 * {@link BlueprintEvent#WAITING WAITING} event. This property type is an
+	 * array of <code>String</code>.
+	 */
+	public static final String DEPENDENCIES = "dependencies";
+
+	/**
+	 * The cause for a {@link BlueprintEvent#FAILURE FAILURE} event. This
+	 * property is of type <code>Throwable</code>.
+	 */
+	public static final String CAUSE = "cause";
+
+	/**
+	 * Topic prefix for all events issued by the Blueprint Container
+	 */
+	public static final String TOPIC_BLUEPRINT_EVENTS = "org/osgi/service/blueprint/container";
+
+	/**
+	 * Topic for Blueprint Container CREATING events
+	 */
+	public static final String TOPIC_CREATING = TOPIC_BLUEPRINT_EVENTS
+			+ "/CREATING";
+
+	/**
+	 * Topic for Blueprint Container CREATED events
+	 */
+	public static final String TOPIC_CREATED = TOPIC_BLUEPRINT_EVENTS
+			+ "/CREATED";
+
+	/**
+	 * Topic for Blueprint Container DESTROYING events
+	 */
+	public static final String TOPIC_DESTROYING = TOPIC_BLUEPRINT_EVENTS
+			+ "/DESTROYING";
+
+	/**
+	 * Topic for Blueprint Container DESTROYED events
+	 */
+	public static final String TOPIC_DESTROYED = TOPIC_BLUEPRINT_EVENTS
+			+ "/DESTROYED";
+
+	/**
+	 * Topic for Blueprint Container FAILURE events
+	 */
+	public static final String TOPIC_FAILURE = TOPIC_BLUEPRINT_EVENTS
+			+ "/FAILURE";
+
+	/**
+	 * Topic for Blueprint Container GRACE_PERIOD events
+	 */
+	public static final String TOPIC_GRACE_PERIOD = TOPIC_BLUEPRINT_EVENTS
+			+ "/GRACE_PERIOD";
+
+	/**
+	 * Topic for Blueprint Container WAITING events
+	 */
+	public static final String TOPIC_WAITING = TOPIC_BLUEPRINT_EVENTS
+			+ "/WAITING";
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.container;
+
+/**
+ * A Blueprint exception indicating that a component does not exist in a
+ * Blueprint Container.
+ * 
+ * This exception is thrown when an attempt is made to create a component
+ * instance or lookup Component Metadata using a component id that does not
+ * exist in the Blueprint Container.
+ * 
+ * @version $Revision: 791585 $
+ */
+public class NoSuchComponentException extends RuntimeException {
+	private static final long	serialVersionUID	= 1L;
+	/**
+	 * The requested component id that generated the exception.
+	 */
+	private final String		componentId;
+
+	/**
+	 * Create a No Such Component Exception for a non-existent component.
+	 * 
+	 * @param msg The associated message.
+	 * @param id The id of the non-existent component.
+	 */
+	public NoSuchComponentException(String msg, String id) {
+		super(msg);
+		this.componentId = id;
+	}
+
+	/**
+	 * Create a No Such Component Exception for a non-existent component.
+	 * 
+	 * @param id The id of the non-existent component.
+	 */
+	public NoSuchComponentException(String id) {
+		super("No component with id '" + (id == null ? "<null>" : id)
+				+ "' could be found");
+		this.componentId = id;
+	}
+
+	/**
+	 * Returns the id of the non-existent component.
+	 * 
+	 * @return The id of the non-existent component.
+	 */
+	public String getComponentId() {
+		return componentId;
+	}
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.container;
+
+/**
+ * Provides access to a concrete type and its optional generic type parameters.
+ * 
+ * <p>
+ * Java 5 and later support generic types. These types consist of a raw class
+ * with type parameters. This class models such a <code>Type</code> class but
+ * ensures that the type is <em>reified</em>. Reification means that the Type
+ * graph associated with a Java 5 <code>Type</code> instance is traversed until
+ * the type becomes a concrete class. This class is available with the
+ * {@link #getRawClass()} method. The optional type parameters are recursively
+ * represented as Reified Types.
+ * 
+ * <p>
+ * In Java 1.4, a class has by definition no type parameters. This class
+ * implementation provides the Reified Type for Java 1.4 by making the raw class
+ * the Java 1.4 class and using a Reified Type based on the <code>Object</code>
+ * class for any requested type parameter.
+ * 
+ * <p>
+ * A Blueprint extender implementations can subclass this class and provide
+ * access to the generic type parameter graph for conversion. Such a subclass
+ * must <em>reify</em> the different Java 5 <code>Type</code> instances into the
+ * reified form. That is, a form where the raw Class is available with its
+ * optional type parameters as Reified Types.
+ * 
+ * @Immutable
+ * @version $Revision: 896324 $
+ */
+public class ReifiedType {
+	private final static ReifiedType	OBJECT	= new ReifiedType(Object.class);
+
+	private final Class					clazz;
+
+	/**
+	 * Create a Reified Type for a raw Java class without any generic type
+	 * parameters. Subclasses can provide the optional generic type parameter
+	 * information. Without subclassing, this instance has no type parameters.
+	 * 
+	 * @param clazz The raw class of the Reified Type.
+	 */
+	public ReifiedType(Class clazz) {
+		this.clazz = clazz;
+	}
+
+	/**
+	 * Return the raw class represented by this type.
+	 * 
+	 * The raw class represents the concrete class that is associated with a
+	 * type declaration. This class could have been deduced from the generics
+	 * type parameter graph of the declaration. For example, in the following
+	 * example:
+	 * 
+	 * <pre>
+	 * Map&lt;String, ? extends Metadata&gt;
+	 * </pre>
+	 * 
+	 * The raw class is the Map class.
+	 * 
+	 * @return The raw class represented by this type.
+	 */
+	public Class getRawClass() {
+		return clazz;
+	}
+
+	/**
+	 * Return a type parameter for this type.
+	 * 
+	 * The type parameter refers to a parameter in a generic type declaration
+	 * given by the zero-based index <code>i</code>.
+	 * 
+	 * For example, in the following example:
+	 * 
+	 * <pre>
+	 * Map&lt;String, ? extends Metadata&gt;
+	 * </pre>
+	 * 
+	 * type parameter 0 is <code>String</code>, and type parameter 1 is
+	 * <code>Metadata</code>.
+	 * 
+	 * <p>
+	 * This implementation returns a Reified Type that has <code>Object</code>
+	 * as class. Any object is assignable to Object and therefore no conversion
+	 * is then necessary. This is compatible with versions of Java language
+	 * prior to Java 5.
+	 * 
+	 * This method should be overridden by a subclass that provides access to
+	 * the generic type parameter information for Java 5 and later.
+	 * 
+	 * @param i The zero-based index of the requested type parameter.
+	 * @return The <code>ReifiedType</code> for the generic type parameter at
+	 *         the specified index.
+	 */
+	public ReifiedType getActualTypeArgument(int i) {
+		return OBJECT;
+	}
+
+	/**
+	 * Return the number of type parameters for this type.
+	 * 
+	 * <p>
+	 * This implementation returns <code>0</code>. This method should be
+	 * overridden by a subclass that provides access to the generic type
+	 * parameter information for Java 5 and later.
+	 * 
+	 * @return The number of type parameters for this type.
+	 */
+	public int size() {
+		return 0;
+	}
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.container;
+
+import org.osgi.framework.ServiceException;
+
+/**
+ * A Blueprint exception indicating that a service is unavailable.
+ * 
+ * This exception is thrown when an invocation is made on a service reference
+ * and a backing service is not available.
+ * 
+ * @version $Revision: 791585 $
+ */
+public class ServiceUnavailableException extends ServiceException {
+	private static final long	serialVersionUID	= 1L;
+	/**
+	 * The filter string associated with the exception.
+	 */
+	private final String		filter;
+
+	/**
+	 * Creates a Service Unavailable Exception with the specified message.
+	 * 
+	 * @param message The associated message.
+	 * @param filter The filter used for the service lookup.
+	 */
+	public ServiceUnavailableException(String message, String filter) {
+		super(message, UNREGISTERED);
+		this.filter = filter;
+	}
+
+	/**
+	 * Creates a Service Unavailable Exception with the specified message and
+	 * exception cause.
+	 * 
+	 * @param message The associated message.
+	 * @param filter The filter used for the service lookup.
+	 * @param cause The cause of this exception.
+	 */
+	public ServiceUnavailableException(String message, String filter,
+			Throwable cause) {
+		super(message, UNREGISTERED, cause);
+		this.filter = filter;
+	}
+
+	/**
+	 * Returns the filter expression that a service would have needed to satisfy
+	 * in order for the invocation to proceed.
+	 * 
+	 * @return The failing filter.
+	 */
+	public String getFilter() {
+		return this.filter;
+	}
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html Sun Feb 27 20:50:38 2011
@@ -0,0 +1,39 @@
+<!--
+    /*
+    * $Revision$
+    *
+    * Copyright (c) OSGi Alliance (2008, 2009). 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.
+    * You may obtain a copy of the License at
+    *
+    *      http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    */
+    -->
+<BODY>
+<p>Blueprint Container Package Version 1.0.</p>
+<p>Bundles wishing to use this package must list the package
+in the Import-Package header of the bundle's manifest.
+For example:</p>
+<pre>
+Import-Package: org.osgi.service.blueprint.container; version=&quot;[1.0,2.0)&quot;
+</pre>
+<p>
+	This package defines the primary interface to a Blueprint Container,
+	<code>BlueprintContainer</code>. An instance of this type is available
+        inside a Blueprint Container as an implicitly defined component with the name
+        &quot;blueprintContainer&quot;.
+</p>
+<p>
+	This package also declares the supporting exception types, listener, and constants for working with a Blueprint
+	Container.
+</p>
+</BODY>
+

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo Sun Feb 27 20:50:38 2011
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+version 1.0.1

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a factory method or constructor argument of a bean. The
+ * arguments of a bean are obtained from {@link BeanMetadata#getArguments()}.
+ * 
+ * This is specified by the <code>argument</code> elements of a bean.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface BeanArgument {
+
+	/**
+	 * Return the Metadata for the argument value.
+	 * 
+	 * This is specified by the <code>value</code> attribute.
+	 * 
+	 * @return The Metadata for the argument value.
+	 */
+	Metadata getValue();
+
+	/**
+	 * Return the name of the value type to match the argument and convert the
+	 * value into when invoking the constructor or factory method.
+	 * 
+	 * This is specified by the <code>type</code> attribute.
+	 * 
+	 * @return The name of the value type to convert the value into, or
+	 *         <code>null</code> if no type is specified.
+	 */
+	String getValueType();
+
+	/**
+	 * Return the zero-based index into the parameter list of the factory method
+	 * or constructor to be invoked for this argument. This is determined by
+	 * specifying the <code>index</code> attribute for the bean. If not
+	 * explicitly set, this will return -1 and the initial ordering is defined
+	 * by its position in the {@link BeanMetadata#getArguments()} list.
+	 * 
+	 * This is specified by the <code>index</code> attribute.
+	 * 
+	 * @return The zero-based index of the parameter, or -1 if no index is
+	 *         specified.
+	 */
+	int getIndex();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+import java.util.List;
+
+/**
+ * Metadata for a Bean component.
+ * 
+ * <p>
+ * This is specified by the <code>bean</code> element.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface BeanMetadata extends Target, ComponentMetadata {
+
+	/**
+	 * The bean has <code>singleton</code> scope.
+	 * 
+	 * @see #getScope()
+	 */
+	static final String	SCOPE_SINGLETON	= "singleton";
+
+	/**
+	 * The bean has <code>prototype</code> scope.
+	 * 
+	 * @see #getScope()
+	 */
+	static final String	SCOPE_PROTOTYPE	= "prototype";
+
+	/**
+	 * Return the name of the class specified for the bean.
+	 * 
+	 * This is specified by the <code>class</code> attribute of the bean
+	 * definition.
+	 * 
+	 * @return The name of the class specified for the bean. If no class is
+	 *         specified in the bean definition, because the a factory component
+	 *         is used instead, then this method will return <code>null</code>.
+	 */
+	String getClassName();
+
+	/**
+	 * Return the name of the init method specified for the bean.
+	 * 
+	 * This is specified by the <code>init-method</code> attribute of the bean
+	 * definition.
+	 * 
+	 * @return The name of the init method specified for the bean, or
+	 *         <code>null</code> if no init method is specified.
+	 */
+	String getInitMethod();
+
+	/**
+	 * Return the name of the destroy method specified for the bean.
+	 * 
+	 * This is specified by the <code>destroy-method</code> attribute of the
+	 * bean definition.
+	 * 
+	 * @return The name of the destroy method specified for the bean, or
+	 *         <code>null</code> if no destroy method is specified.
+	 */
+	String getDestroyMethod();
+
+	/**
+	 * Return the arguments for the factory method or constructor of the bean.
+	 * 
+	 * This is specified by the child <code>argument<code> elements.
+	 * 
+	 * @return An immutable List of {@link BeanArgument} objects for the factory
+	 *         method or constructor of the bean. The List is empty if no
+	 *         arguments are specified for the bean.
+	 */
+	List<BeanArgument> getArguments();
+
+	/**
+	 * Return the properties for the bean.
+	 * 
+	 * This is specified by the child <code>property</code> elements.
+	 * 
+	 * @return An immutable List of {@link BeanProperty} objects, with one entry
+	 *         for each property to be injected in the bean. The List is empty
+	 *         if no property injection is specified for the bean.
+	 * 
+	 */
+	List<BeanProperty> getProperties();
+
+	/**
+	 * Return the name of the factory method for the bean.
+	 * 
+	 * This is specified by the <code>factory-method</code> attribute of the
+	 * bean.
+	 * 
+	 * @return The name of the factory method of the bean or <code>null</code>
+	 *         if no factory method is specified for the bean.
+	 */
+	String getFactoryMethod();
+
+	/**
+	 * Return the Metadata for the factory component on which to invoke the
+	 * factory method for the bean.
+	 * 
+	 * This is specified by the <code>factory-ref</code> attribute of the bean.
+	 * 
+	 * <p>
+	 * When a factory method and factory component have been specified for the
+	 * bean, this method returns the factory component on which to invoke the
+	 * factory method for the bean. When no factory component has been specified
+	 * this method will return <code>null</code>.
+	 * 
+	 * When a factory method has been specified for the bean but a factory
+	 * component has not been specified, the factory method must be invoked as a
+	 * static method on the bean's class.
+	 * 
+	 * @return The Metadata for the factory component on which to invoke the
+	 *         factory method for the bean or <code>null</code> if no factory
+	 *         component is specified.
+	 */
+	Target getFactoryComponent();
+
+	/**
+	 * Return the scope for the bean.
+	 * 
+	 * @return The scope for the bean.
+	 * @see #SCOPE_SINGLETON
+	 * @see #SCOPE_PROTOTYPE
+	 */
+	String getScope();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a property to be injected into a bean. The properties of a bean
+ * are obtained from {@link BeanMetadata#getProperties()}.
+ * 
+ * This is specified by the <code>property</code> elements of a bean. Properties
+ * are defined according to the Java Beans conventions.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 896324 $
+ */
+public interface BeanProperty {
+
+	/**
+	 * Return the name of the property to be injected. The name follows Java
+	 * Beans conventions.
+	 * 
+	 * This is specified by the <code>name</code> attribute.
+	 * 
+	 * @return The name of the property to be injected.
+	 */
+	String getName();
+
+	/**
+	 * Return the Metadata for the value to be injected into a bean.
+	 * 
+	 * This is specified by the <code>value</code> attribute or in inlined text.
+	 * 
+	 * @return The Metadata for the value to be injected into a bean.
+	 */
+	Metadata getValue();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+import java.util.List;
+
+/**
+ * Metadata for a collection based value. Values of the collection are defined
+ * by Metadata objects. This Collection Metadata can constrain the values of the
+ * collection to a specific type.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 896324 $
+ */
+
+public interface CollectionMetadata extends NonNullMetadata {
+
+	/**
+	 * Return the type of the collection.
+	 * 
+	 * The possible types are: array (<code>Object[]</code>), <code>Set</code>,
+	 * and <code>List</code>. This information is specified in the element name.
+	 * 
+	 * @return The type of the collection. <code>Object[]</code> is returned to
+	 *         indicate an array.
+	 */
+	Class<?> getCollectionClass();
+
+	/**
+	 * Return the type specified for the values of the collection.
+	 * 
+	 * The <code>value-type</code> attribute specified this information.
+	 * 
+	 * @return The type specified for the values of the collection.
+	 */
+	String getValueType();
+
+	/**
+	 * Return Metadata for the values of the collection.
+	 * 
+	 * @return A List of Metadata for the values of the collection.
+	 */
+	List<Metadata> getValues();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+import java.util.List;
+
+/**
+ * Metadata for managed components. This is the base type for
+ * {@link BeanMetadata}, {@link ServiceMetadata} and
+ * {@link ServiceReferenceMetadata}.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface ComponentMetadata extends NonNullMetadata {
+
+	/**
+	 * The component's manager must eagerly activate the component.
+	 * 
+	 * @see #getActivation()
+	 */
+	static final int	ACTIVATION_EAGER	= 1;
+
+	/**
+	 * The component's manager must lazily activate the component.
+	 * 
+	 * @see #getActivation()
+	 */
+	static final int	ACTIVATION_LAZY		= 2;
+
+	/**
+	 * Return the id of the component.
+	 * 
+	 * @return The id of the component. The component id can be
+	 *         <code>null</code> if this is an anonymously defined and/or
+	 *         inlined component.
+	 */
+	String getId();
+
+	/**
+	 * Return the activation strategy for the component.
+	 * 
+	 * This is specified by the <code>activation</code> attribute of a component
+	 * definition. If this is not set, then the <code>default-activation</code>
+	 * in the <code>blueprint</code> element is used. If that is also not set,
+	 * then the activation strategy is {@link #ACTIVATION_EAGER}.
+	 * 
+	 * @return The activation strategy for the component.
+	 * @see #ACTIVATION_EAGER
+	 * @see #ACTIVATION_LAZY
+	 */
+	int getActivation();
+
+	/**
+	 * Return the ids of any components listed in a <code>depends-on</code>
+	 * attribute for the component.
+	 * 
+	 * @return An immutable List of component ids that are explicitly declared
+	 *         as a dependency, or an empty List if none.
+	 */
+	List<String> getDependsOn();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for the verified id of another component managed by the Blueprint
+ * Container. The id itself will be injected, not the component to which the id
+ * refers. No implicit dependency is created.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface IdRefMetadata extends NonNullMetadata {
+	/**
+	 * Return the id of the referenced component.
+	 * 
+	 * This is specified by the <code>component-id</code> attribute of a
+	 * component.
+	 * 
+	 * @return The id of the referenced component.
+	 */
+	String getComponentId();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a map entry.
+ * 
+ * This type is used by {@link MapMetadata}, {@link PropsMetadata} and
+ * {@link ServiceMetadata}.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 896324 $
+ */
+public interface MapEntry {
+	/**
+	 * Return the Metadata for the key of the map entry.
+	 * 
+	 * This is specified by the <code>key</code> attribute or element.
+	 * 
+	 * @return The Metadata for the key of the map entry. This must not be
+	 *         <code>null</code>.
+	 */
+	NonNullMetadata getKey();
+
+	/**
+	 * Return the Metadata for the value of the map entry.
+	 * 
+	 * This is specified by the <code>value</code> attribute or element.
+	 * 
+	 * @return The Metadata for the value of the map entry. This must not be
+	 *         <code>null</code>.
+	 */
+	Metadata getValue();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+import java.util.List;
+
+/**
+ * Metadata for a Map based value.
+ * 
+ * <p>
+ * This is specified by the <code>map</code> element.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface MapMetadata extends NonNullMetadata {
+	/**
+	 * Return the name of the type of the map keys.
+	 * 
+	 * This is specified by the <code>key-type</code> attribute of the map.
+	 * 
+	 * @return The name of the type of the map keys, or <code>null</code> if
+	 *         none is specified.
+	 */
+	String getKeyType();
+
+	/**
+	 * Return the name of the type of the map values.
+	 * 
+	 * This is specified by the <code>value-type</code> attribute of the map.
+	 * 
+	 * @return The name of the type of the map values, or <code>null</code> if
+	 *         none is specified.
+	 */
+	String getValueType();
+
+	/**
+	 * Return the entries for the map.
+	 * 
+	 * @return An immutable List of {@link MapEntry} objects for each entry in
+	 *         the map. The List is empty if no entries are specified for the
+	 *         map.
+	 */
+	List<MapEntry> getEntries();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) OSGi Alliance (2009). 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.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Top level Metadata type. All Metdata types extends this base type.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface Metadata {
+	// marker interface
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a value that cannot <code>null</code>. All Metadata subtypes
+ * extend this type except for {@link NullMetadata}.
+ * 
+ * <p>
+ * This Metadata type is used for keys in Maps because they cannot be
+ * <code>null</code>.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 896324 $
+ */
+public interface NonNullMetadata extends Metadata {
+	// marker interface
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a value specified to be <code>null</code> via the &lt;null&gt;
+ * element.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface NullMetadata extends Metadata {
+
+	/**
+	 * Singleton instance of <code>NullMetadata</code>.
+	 */
+	static final NullMetadata	NULL	= new NullMetadata() {
+											// empty body
+										};
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+import java.util.List;
+
+/**
+ * Metadata for a <code>java.util.Properties</code> based value.
+ * 
+ * <p>
+ * The {@link MapEntry} objects of properties are defined with keys and values
+ * of type <code>String</code>.
+ * 
+ * <p>
+ * This is specified by the <code>props</code> element.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface PropsMetadata extends NonNullMetadata {
+
+	/**
+	 * Return the entries for the properties.
+	 * 
+	 * @return An immutable List of {@link MapEntry} objects for each entry in
+	 *         the properties. The List is empty if no entries are specified for
+	 *         the properties.
+	 */
+	List<MapEntry> getEntries();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a reference to another component managed by the Blueprint
+ * Container.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface RefMetadata extends Target, NonNullMetadata {
+	/**
+	 * Return the id of the referenced component.
+	 * 
+	 * This is specified by the <code>component-id</code> attribute of a
+	 * component.
+	 * 
+	 * @return The id of the referenced component.
+	 */
+	String getComponentId();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a list of service references.
+ * 
+ * <p>
+ * This is specified by the <code>reference-list</code> element.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface ReferenceListMetadata extends ServiceReferenceMetadata {
+
+	/**
+	 * Reference list values must be proxies to the actual service objects.
+	 * 
+	 * @see #getMemberType()
+	 */
+	 static final int	USE_SERVICE_OBJECT		= 1;
+
+	/**
+	 * Reference list values must be <code>ServiceReference</code> objects.
+	 * 
+	 * @see #getMemberType()
+	 */
+	 static final int	USE_SERVICE_REFERENCE	= 2;
+
+	/**
+	 * Return whether the List will contain service object proxies or
+	 * <code>ServiceReference</code> objects.
+	 * 
+	 * This is specified by the <code>member-type</code> attribute of the
+	 * reference list.
+	 * 
+	 * @return Whether the List will contain service object proxies or
+	 *         <code>ServiceReference</code> objects.
+	 * @see #USE_SERVICE_OBJECT
+	 * @see #USE_SERVICE_REFERENCE
+	 */
+	int getMemberType();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a reference listener interested in the reference bind and unbind
+ * events for a service reference.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface ReferenceListener {
+
+	/**
+	 * Return the Metadata for the component that will receive bind and unbind
+	 * events.
+	 * 
+	 * This is specified by the <code>ref</code> attribute or via an inlined
+	 * component.
+	 * 
+	 * @return The Metadata for the component that will receive bind and unbind
+	 *         events.
+	 */
+	Target getListenerComponent();
+
+	/**
+	 * Return the name of the bind method. The bind method will be invoked when
+	 * a matching service is bound to the reference.
+	 * 
+	 * This is specified by the <code>bind-method</code> attribute of the
+	 * reference listener.
+	 * 
+	 * @return The name of the bind method.
+	 */
+	String getBindMethod();
+
+	/**
+	 * Return the name of the unbind method. The unbind method will be invoked
+	 * when a matching service is unbound from the reference.
+	 * 
+	 * This is specified by the <code>unbind-method</code> attribute of the
+	 * reference listener.
+	 * 
+	 * @return The name of the unbind method.
+	 */
+	String getUnbindMethod();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a reference that will bind to a single matching service in the
+ * service registry.
+ * 
+ * <p>
+ * This is specified by the <code>reference</code> element.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface ReferenceMetadata extends Target, ServiceReferenceMetadata {
+
+	/**
+	 * Return the timeout for service invocations when a backing service is is
+	 * unavailable.
+	 * 
+	 * This is specified by the <code>timeout</code> attribute of the reference.
+	 * 
+	 * @return The timeout, in milliseconds, for service invocations when a
+	 *         backing service is is unavailable.
+	 */
+	long getTimeout();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a registration listener interested in service registration and
+ * unregistration events for a service.
+ * 
+ * <p>
+ * The registration listener is called with the initial state of the service
+ * when the registration listener is actuated.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface RegistrationListener {
+
+	/**
+	 * Return the Metadata for the component that will receive registration and
+	 * unregistration events.
+	 * 
+	 * This is specified by the <code>ref</code> attribute or via an inlined
+	 * component.
+	 * 
+	 * @return The Metadata for the component that will receive registration and
+	 *         unregistration events.
+	 */
+	Target getListenerComponent();
+
+	/**
+	 * Return the name of the registration method. The registration method will
+	 * be invoked when the associated service is registered with the service
+	 * registry.
+	 * 
+	 * This is specified by the <code>registration-method</code> attribute of
+	 * the registration listener.
+	 * 
+	 * @return The name of the registration method.
+	 */
+	String getRegistrationMethod();
+
+	/**
+	 * Return the name of the unregistration method. The unregistration method
+	 * will be invoked when the associated service is unregistered from the
+	 * service registry.
+	 * 
+	 * This is specified by the <code>unregistration-method</code> attribute of
+	 * the registration listener.
+	 * 
+	 * @return The name of the unregistration method.
+	 */
+	String getUnregistrationMethod();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Metadata for a service to be registered by the Blueprint Container when
+ * enabled.
+ * 
+ * <p>
+ * This is specified by the <code>service</code> element.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface ServiceMetadata extends ComponentMetadata {
+
+	/**
+	 * Do not auto-detect types for advertised service interfaces
+	 * 
+	 * @see #getAutoExport()
+	 */
+	static final int		AUTO_EXPORT_DISABLED		= 1;
+
+	/**
+	 * Advertise all Java interfaces implemented by the component instance type
+	 * as service interfaces.
+	 * 
+	 * @see #getAutoExport()
+	 */
+	static final int		AUTO_EXPORT_INTERFACES		= 2;
+
+	/**
+	 * Advertise all Java classes in the hierarchy of the component instance
+	 * type as service interfaces.
+	 * 
+	 * @see #getAutoExport()
+	 */
+	static final int		AUTO_EXPORT_CLASS_HIERARCHY	= 3;
+
+	/**
+	 * Advertise all Java classes and interfaces in the component instance type
+	 * as service interfaces.
+	 * 
+	 * @see #getAutoExport()
+	 */
+	static final int	AUTO_EXPORT_ALL_CLASSES		= 4;
+
+	/**
+	 * Return the Metadata for the component to be exported as a service.
+	 * 
+	 * This is specified inline or via the <code>ref</code> attribute of the
+	 * service.
+	 * 
+	 * @return The Metadata for the component to be exported as a service.
+	 */
+	Target getServiceComponent();
+
+	/**
+	 * Return the type names of the interfaces that the service should be
+	 * advertised as supporting.
+	 * 
+	 * This is specified in the <code>interface</code> attribute or child
+	 * <code>interfaces</code> element of the service.
+	 * 
+	 * @return An immutable List of <code>String</code> for the type names of
+	 *         the interfaces that the service should be advertised as
+	 *         supporting. The List is empty if using <code>auto-export</code>
+	 *         or no interface names are specified for the service.
+	 */
+	List<String> getInterfaces();
+
+	/**
+	 * Return the auto-export mode for the service.
+	 * 
+	 * This is specified by the <code>auto-export</code> attribute of the
+	 * service.
+	 * 
+	 * @return The auto-export mode for the service.
+	 * @see #AUTO_EXPORT_DISABLED
+	 * @see #AUTO_EXPORT_INTERFACES
+	 * @see #AUTO_EXPORT_CLASS_HIERARCHY
+	 * @see #AUTO_EXPORT_ALL_CLASSES
+	 */
+	int getAutoExport();
+
+	/**
+	 * Return the user declared properties to be advertised with the service.
+	 * 
+	 * This is specified by the <code>service-properties</code> element of the
+	 * service.
+	 * 
+	 * @return An immutable List of {@link MapEntry} objects for the user
+	 *         declared properties to be advertised with the service. The List
+	 *         is empty if no service properties are specified for the service.
+	 */
+	List<MapEntry> getServiceProperties();
+
+	/**
+	 * Return the ranking value to use when advertising the service. If the
+	 * ranking value is zero, the service must be registered without a
+	 * <code>service.ranking</code> service property.
+	 * 
+	 * This is specified by the <code>ranking</code> attribute of the service.
+	 * 
+	 * @return The ranking value to use when advertising the service.
+	 */
+	int getRanking();
+
+	/**
+	 * Return the registration listeners to be notified when the service is
+	 * registered and unregistered with the framework.
+	 * 
+	 * This is specified by the <code>registration-listener</code> elements of
+	 * the service.
+	 * 
+	 * @return An immutable Collection of {@link RegistrationListener} objects
+	 *         to be notified when the service is registered and unregistered
+	 *         with the framework. The Collection is empty if no registration
+	 *         listeners are specified for the service.
+	 */
+	Collection<RegistrationListener> getRegistrationListeners();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+import java.util.Collection;
+
+/**
+ * Metadata for a reference to an OSGi service. This is the base type for
+ * {@link ReferenceListMetadata} and {@link ReferenceMetadata}.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface ServiceReferenceMetadata extends ComponentMetadata {
+
+	/**
+	 * A matching service is required at all times.
+	 * 
+	 * @see #getAvailability()
+	 */
+	static final int	AVAILABILITY_MANDATORY	= 1;
+
+	/**
+	 * A matching service is not required to be present.
+	 * 
+	 * @see #getAvailability()
+	 */
+	static final int	AVAILABILITY_OPTIONAL	= 2;
+
+	/**
+	 * Return whether or not a matching service is required at all times.
+	 * 
+	 * This is specified in the <code>availability</code> attribute of the
+	 * service reference.
+	 * 
+	 * @return Whether or not a matching service is required at all times.
+	 * @see #AVAILABILITY_MANDATORY
+	 * @see #AVAILABILITY_OPTIONAL
+	 */
+	int getAvailability();
+
+	/**
+	 * Return the name of the interface type that a matching service must
+	 * support.
+	 * 
+	 * This is specified in the <code>interface</code> attribute of the service
+	 * reference.
+	 * 
+	 * @return The name of the interface type that a matching service must
+	 *         support or <code>null</code> when no interface name is specified.
+	 */
+	String getInterface();
+
+	/**
+	 * Return the value of the <code>component-name</code> attribute of the
+	 * service reference. This specifies the id of a component that is
+	 * registered in the service registry. This will create an automatic filter,
+	 * appended with the filter if set, to select this component based on its
+	 * automatic <code>id</code> attribute.
+	 * 
+	 * @return The value of the <code>component-name</code> attribute of the
+	 *         service reference or <code>null</code> if the attribute is not
+	 *         specified.
+	 */
+	String getComponentName();
+
+	/**
+	 * Return the filter expression that a matching service must match.
+	 * 
+	 * This is specified by the <code>filter</code> attribute of the service
+	 * reference.
+	 * 
+	 * @return The filter expression that a matching service must match or
+	 *         <code>null</code> if a filter is not specified.
+	 */
+	String getFilter();
+
+	/**
+	 * Return the reference listeners to receive bind and unbind events.
+	 * 
+	 * This is specified by the <code>reference-listener</code> elements of the
+	 * service reference.
+	 * 
+	 * @return An immutable Collection of {@link ReferenceListener} objects to
+	 *         receive bind and unbind events. The Collection is empty if no
+	 *         reference listeners are specified for the service reference.
+	 */
+	Collection<ReferenceListener> getReferenceListeners();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * A common interface for managed components that can be used as a direct target
+ * for method calls. These are <code>bean</code>, <code>reference</code>, and
+ * <code>ref</code>, where the <code>ref</code> must refer to a bean or
+ * reference component.
+ * 
+ * @see BeanMetadata
+ * @see ReferenceMetadata
+ * @see RefMetadata
+ * @ThreadSafe
+ * @version $Revision: 896324 $
+ */
+public interface Target extends NonNullMetadata {
+	// marker interface
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java Sun Feb 27 20:50:38 2011
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.blueprint.reflect;
+
+/**
+ * Metadata for a simple <code>String</code> value that will be type-converted
+ * if necessary before injecting.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface ValueMetadata extends NonNullMetadata {
+	/**
+	 * Return the unconverted string representation of the value.
+	 * 
+	 * This is specified by the <code>value</code> attribute or text part of the
+	 * <code>value</code> element.
+	 * 
+	 * @return The unconverted string representation of the value.
+	 */
+	String getStringValue();
+
+	/**
+	 * Return the name of the type to which the value should be converted.
+	 * 
+	 * This is specified by the <code>type</code> attribute.
+	 * 
+	 * @return The name of the type to which the value should be converted or
+	 *         <code>null</code> if no type is specified.
+	 */
+	String getType();
+}

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html Sun Feb 27 20:50:38 2011
@@ -0,0 +1,32 @@
+<!--
+    /*
+    * $Revision$
+    *
+    * Copyright (c) OSGi Alliance (2008, 2009). 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.
+    * You may obtain a copy of the License at
+    *
+    *      http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    */
+    -->
+<BODY>
+<p>Blueprint Reflection Package Version 1.0.
+<p>Bundles wishing to use this package must list the package
+in the Import-Package header of the bundle's manifest.
+For example:
+<pre>
+Import-Package: org.osgi.service.blueprint.reflect; version=&quot;[1.0,2.0)&quot;
+</pre>
+<p> This package provides a reflection-based view of the configuration information for a
+	Blueprint Container.
+</p>
+</BODY>
+

Added: aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo?rev=1075143&view=auto
==============================================================================
--- aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo (added)
+++ aries/tags/blueprint-0.2.1/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo Sun Feb 27 20:50:38 2011
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+version 1.0.1