aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject svn commit: r1075147 [5/23] - in /aries/tags/blueprint-0.3: ./ 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-anno...
Date Sun, 27 Feb 2011 21:05:20 GMT
Added: aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TservicePropertyEntry.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TservicePropertyEntry.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TservicePropertyEntry.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TservicePropertyEntry.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,479 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.04.23 at 12:57:08 PM EDT 
+//
+
+
+package org.apache.aries.blueprint.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * 
+ *                 
+ *                 TservicePropertyEntry is an entry value used for the <service-properties>
+ *                 element.  This does not allow a child <key> element and there are no
+ *                 key-ref or value-ref attributes.
+ *                 
+ * 			
+ * 
+ * <p>Java class for TservicePropertyEntry complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="TservicePropertyEntry">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Gvalue" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="key" use="required" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ *       &lt;attribute name="value" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TstringValue" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TservicePropertyEntry", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", propOrder = {
+    "service",
+    "referenceList",
+    "bean",
+    "reference",
+    "ref",
+    "any",
+    "idref",
+    "value",
+    "list",
+    "set",
+    "map",
+    "array",
+    "props",
+    "_null"
+})
+@XmlRootElement(name = "servicePropertyEntry")
+public class TservicePropertyEntry {
+
+    protected TinlinedService service;
+    @XmlElement(name = "reference-list")
+    protected TinlinedReferenceList referenceList;
+    protected TinlinedBean bean;
+    protected TinlinedReference reference;
+    protected Tref ref;
+    @XmlAnyElement(lax = true)
+    protected Object any;
+    protected Tref idref;
+    protected Tvalue value;
+    protected Tcollection list;
+    protected Tcollection set;
+    protected Tmap map;
+    protected Tcollection array;
+    protected Tprops props;
+    @XmlElement(name = "null")
+    protected Tnull _null;
+    @XmlAttribute(required = true)
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    protected String key;
+    @XmlAttribute(name = "value")
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    protected String valueAttribute;
+
+    /**
+     * Gets the value of the service property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link TinlinedService }
+     *     
+     */
+    public TinlinedService getService() {
+        return service;
+    }
+
+    /**
+     * Sets the value of the service property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link TinlinedService }
+     *     
+     */
+    public void setService(TinlinedService value) {
+        this.service = value;
+    }
+
+    /**
+     * Gets the value of the referenceList property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link TinlinedReferenceList }
+     *     
+     */
+    public TinlinedReferenceList getReferenceList() {
+        return referenceList;
+    }
+
+    /**
+     * Sets the value of the referenceList property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link TinlinedReferenceList }
+     *     
+     */
+    public void setReferenceList(TinlinedReferenceList value) {
+        this.referenceList = value;
+    }
+
+    /**
+     * Gets the value of the bean property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link TinlinedBean }
+     *     
+     */
+    public TinlinedBean getBean() {
+        return bean;
+    }
+
+    /**
+     * Sets the value of the bean property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link TinlinedBean }
+     *     
+     */
+    public void setBean(TinlinedBean value) {
+        this.bean = value;
+    }
+
+    /**
+     * Gets the value of the reference property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link TinlinedReference }
+     *     
+     */
+    public TinlinedReference getReference() {
+        return reference;
+    }
+
+    /**
+     * Sets the value of the reference property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link TinlinedReference }
+     *     
+     */
+    public void setReference(TinlinedReference value) {
+        this.reference = value;
+    }
+
+    /**
+     * Gets the value of the ref property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tref }
+     *     
+     */
+    public Tref getRef() {
+        return ref;
+    }
+
+    /**
+     * Sets the value of the ref property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tref }
+     *     
+     */
+    public void setRef(Tref value) {
+        this.ref = value;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getAny() {
+        return any;
+    }
+
+    /**
+     * Sets the value of the any property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setAny(Object value) {
+        this.any = value;
+    }
+
+    /**
+     * Gets the value of the idref property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tref }
+     *     
+     */
+    public Tref getIdref() {
+        return idref;
+    }
+
+    /**
+     * Sets the value of the idref property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tref }
+     *     
+     */
+    public void setIdref(Tref value) {
+        this.idref = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tvalue }
+     *     
+     */
+    public Tvalue getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tvalue }
+     *     
+     */
+    public void setValue(Tvalue value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the list property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tcollection }
+     *     
+     */
+    public Tcollection getList() {
+        return list;
+    }
+
+    /**
+     * Sets the value of the list property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tcollection }
+     *     
+     */
+    public void setList(Tcollection value) {
+        this.list = value;
+    }
+
+    /**
+     * Gets the value of the set property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tcollection }
+     *     
+     */
+    public Tcollection getSet() {
+        return set;
+    }
+
+    /**
+     * Sets the value of the set property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tcollection }
+     *     
+     */
+    public void setSet(Tcollection value) {
+        this.set = value;
+    }
+
+    /**
+     * Gets the value of the map property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tmap }
+     *     
+     */
+    public Tmap getMap() {
+        return map;
+    }
+
+    /**
+     * Sets the value of the map property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tmap }
+     *     
+     */
+    public void setMap(Tmap value) {
+        this.map = value;
+    }
+
+    /**
+     * Gets the value of the array property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tcollection }
+     *     
+     */
+    public Tcollection getArray() {
+        return array;
+    }
+
+    /**
+     * Sets the value of the array property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tcollection }
+     *     
+     */
+    public void setArray(Tcollection value) {
+        this.array = value;
+    }
+
+    /**
+     * Gets the value of the props property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tprops }
+     *     
+     */
+    public Tprops getProps() {
+        return props;
+    }
+
+    /**
+     * Sets the value of the props property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tprops }
+     *     
+     */
+    public void setProps(Tprops value) {
+        this.props = value;
+    }
+
+    /**
+     * Gets the value of the null property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tnull }
+     *     
+     */
+    public Tnull getNull() {
+        return _null;
+    }
+
+    /**
+     * Sets the value of the null property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tnull }
+     *     
+     */
+    public void setNull(Tnull value) {
+        this._null = value;
+    }
+
+    /**
+     * Gets the value of the key property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getKey() {
+        return key;
+    }
+
+    /**
+     * Sets the value of the key property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setKey(String value) {
+        this.key = value;
+    }
+
+    /**
+     * Gets the value of the valueAttribute property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValueAttribute() {
+        return valueAttribute;
+    }
+
+    /**
+     * Sets the value of the valueAttribute property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValueAttribute(String value) {
+        this.valueAttribute = value;
+    }
+
+}

Added: aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TserviceReference.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TserviceReference.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TserviceReference.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TserviceReference.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,237 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.04.23 at 12:57:08 PM EDT 
+//
+
+
+package org.apache.aries.blueprint.jaxb;
+
+import java.util.List;
+import java.util.Vector;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * 
+ *                 
+ *                 TserviceReference is the base element type used for <reference>
+ *                 and <reference-list> elements.  This type defines all of the
+ *                 characteristics common to both sorts of references.
+ *                 
+ * 			
+ * 
+ * <p>Java class for TserviceReference complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="TserviceReference">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tcomponent">
+ *       &lt;sequence>
+ *         &lt;group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}GserviceReferenceElements"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="interface" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
+ *       &lt;attribute name="filter" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
+ *       &lt;attribute name="component-name" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ *       &lt;attribute name="availability" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tavailability" />
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TserviceReference", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", propOrder = {
+    "description",
+    "referenceListener"
+})
+@XmlSeeAlso({
+    TreferenceList.class,
+    Treference.class
+})
+@XmlRootElement(name = "serviceReference")
+public class TserviceReference
+    extends Tcomponent
+{
+
+    protected Tdescription description;
+    @XmlElement(name = "reference-listener")
+    protected List<TreferenceListener> referenceListener = new Vector<TreferenceListener>();
+    @XmlAttribute(name = "interface")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    protected String _interface;
+    @XmlAttribute
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    @XmlSchemaType(name = "normalizedString")
+    protected String filter;
+    @XmlAttribute(name = "component-name")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    protected String componentName;
+    @XmlAttribute
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    protected String availability;
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Tdescription }
+     *     
+     */
+    public Tdescription getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Tdescription }
+     *     
+     */
+    public void setDescription(Tdescription value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the referenceListener property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the referenceListener property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getReferenceListener().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link TreferenceListener }
+     * 
+     * 
+     */
+    public List<TreferenceListener> getReferenceListener() {
+        if (referenceListener == null) {
+            referenceListener = new Vector<TreferenceListener>();
+        }
+        return this.referenceListener;
+    }
+
+    /**
+     * Gets the value of the interface property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getInterface() {
+        return _interface;
+    }
+
+    /**
+     * Sets the value of the interface property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setInterface(String value) {
+        this._interface = value;
+    }
+
+    /**
+     * Gets the value of the filter property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFilter() {
+        return filter;
+    }
+
+    /**
+     * Sets the value of the filter property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFilter(String value) {
+        this.filter = value;
+    }
+
+    /**
+     * Gets the value of the componentName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getComponentName() {
+        return componentName;
+    }
+
+    /**
+     * Sets the value of the componentName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setComponentName(String value) {
+        this.componentName = value;
+    }
+
+    /**
+     * Gets the value of the availability property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAvailability() {
+        return availability;
+    }
+
+    /**
+     * Sets the value of the availability property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAvailability(String value) {
+        this.availability = value;
+    }
+
+}

Added: aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypeConverters.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypeConverters.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypeConverters.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypeConverters.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,100 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.04.23 at 12:57:08 PM EDT 
+//
+
+
+package org.apache.aries.blueprint.jaxb;
+
+import java.util.List;
+import java.util.Vector;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlElementRefs;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ *                 
+ *                 The type used for the <type-converters> element.  The
+ *                 <type-converters> section is a set of <bean>, <ref>, or
+ *                 <reference> elements that identify the type converter components.
+ *                 
+ * 			
+ * 
+ * <p>Java class for Ttype-converters complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Ttype-converters">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded" minOccurs="0">
+ *         &lt;element name="bean" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tbean"/>
+ *         &lt;element name="reference" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Treference"/>
+ *         &lt;element name="ref" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tref"/>
+ *         &lt;any/>
+ *       &lt;/choice>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Ttype-converters", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", propOrder = {
+    "beanOrReferenceOrRef"
+})
+@XmlRootElement(name = "typeConverters")
+public class TtypeConverters {
+
+    @XmlElementRefs({
+        @XmlElementRef(name = "ref", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", type = JAXBElement.class),
+        @XmlElementRef(name = "bean", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", type = JAXBElement.class),
+        @XmlElementRef(name = "reference", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", type = JAXBElement.class)
+    })
+    @XmlAnyElement(lax = true)
+    protected List<Object> beanOrReferenceOrRef = new Vector<Object>();
+
+    /**
+     * Gets the value of the beanOrReferenceOrRef property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the beanOrReferenceOrRef property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getBeanOrReferenceOrRef().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link JAXBElement }{@code <}{@link Tref }{@code >}
+     * {@link JAXBElement }{@code <}{@link Tbean }{@code >}
+     * {@link JAXBElement }{@code <}{@link Treference }{@code >}
+     * 
+     * 
+     */
+    public List<Object> getBeanOrReferenceOrRef() {
+        if (beanOrReferenceOrRef == null) {
+            beanOrReferenceOrRef = new Vector<Object>();
+        }
+        return this.beanOrReferenceOrRef;
+    }
+
+}

Added: aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypedCollection.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypedCollection.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypedCollection.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/TtypedCollection.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,82 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.04.23 at 12:57:08 PM EDT 
+//
+
+
+package org.apache.aries.blueprint.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * 
+ *                 
+ *                 TtypeCollection defines comment attributes shared among different
+ *                 collection types that allow a default value type to be specified.
+ *                 
+ * 			
+ * 
+ * <p>Java class for TtypedCollection complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="TtypedCollection">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="value-type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Ttype" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TtypedCollection", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0")
+@XmlSeeAlso({
+    Tmap.class,
+    Tcollection.class
+})
+@XmlRootElement(name = "typedCollection")
+public class TtypedCollection {
+
+    @XmlAttribute(name = "value-type")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    protected String valueType;
+
+    /**
+     * Gets the value of the valueType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValueType() {
+        return valueType;
+    }
+
+    /**
+     * Sets the value of the valueType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValueType(String value) {
+        this.valueType = value;
+    }
+
+}

Added: aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/Tvalue.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/Tvalue.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/Tvalue.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/Tvalue.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,125 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.04.23 at 12:57:08 PM EDT 
+//
+
+
+package org.apache.aries.blueprint.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * 
+ *                 
+ *                 Tvalue is the type used for <value> elements.  The <value> element
+ *                 is used for types that can be created from a single string value.
+ *                 The string value is the data value for the element.  The optional
+ *                 type attribute allows a target conversion value to be explicitly
+ *                 specified.
+ *                 
+ * 			
+ * 
+ * <p>Java class for Tvalue complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Tvalue">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="type" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Ttype" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Tvalue", namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", propOrder = {
+    "content"
+})
+@XmlRootElement(name = "value")
+public class Tvalue {
+
+    @XmlValue
+    protected String content;
+    @XmlAttribute
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    protected String type;
+
+    /**
+     * 
+     *                 
+     *                 Tvalue is the type used for <value> elements.  The <value> element
+     *                 is used for types that can be created from a single string value.
+     *                 The string value is the data value for the element.  The optional
+     *                 type attribute allows a target conversion value to be explicitly
+     *                 specified.
+     *                 
+     * 			
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * 
+     *                 
+     *                 Tvalue is the type used for <value> elements.  The <value> element
+     *                 is used for types that can be created from a single string value.
+     *                 The string value is the data value for the element.  The optional
+     *                 type attribute allows a target conversion value to be explicitly
+     *                 specified.
+     *                 
+     * 			
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setContent(String value) {
+        this.content = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+}

Added: aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/package-info.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/package-info.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/package-info.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/jaxb/package-info.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.04.23 at 12:57:08 PM EDT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.osgi.org/xmlns/blueprint/v1.0.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.aries.blueprint.jaxb;

Added: aries/tags/blueprint-0.3/blueprint-annotation-impl/src/test/java/org/apache/aries/blueprint/annotation/AnnotationTest.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-impl/src/test/java/org/apache/aries/blueprint/annotation/AnnotationTest.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-impl/src/test/java/org/apache/aries/blueprint/annotation/AnnotationTest.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-impl/src/test/java/org/apache/aries/blueprint/annotation/AnnotationTest.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,74 @@
+/**
+ *  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.
+ */
+package org.apache.aries.blueprint.annotation;
+
+import java.io.File;
+import java.util.List;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.apache.aries.blueprint.jaxb.Tbean;
+import org.apache.aries.blueprint.jaxb.Tblueprint;
+import org.apache.aries.blueprint.jaxb.Tproperty;
+import org.apache.aries.blueprint.jaxb.Tvalue;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
+
+import junit.framework.TestCase;
+
+public class AnnotationTest extends TestCase {
+
+    public void testGenerationFile() throws Exception {
+        File file = new File("test-annotation.xml");
+        if (file.exists()) {
+            file.delete();
+            file.createNewFile();
+        }
+
+        Tblueprint tblueprint = new Tblueprint();
+        List<Object> components = tblueprint.getServiceOrReferenceListOrBean();
+        Tbean tbean = new Tbean();
+        tbean.setDependsOn(null);
+        tbean.setId("Bar");
+        tbean.setClazz("org.apache.aries.blueprint.sample.Bar");
+        List<Object> props = tbean.getArgumentOrPropertyOrAny();
+
+        String value = "Hello Bar";
+        Tproperty tp = new Tproperty();
+        tp.setName("value");
+        //Tvalue tvalue = new Tvalue();
+        //tvalue.setContent(value);
+        //tp.setValue(tvalue);
+        tp.setValueAttribute(value);
+        props.add(tp);
+
+        components.add(tbean);
+
+        marshallOBRModel(tblueprint, file);
+    }
+
+    private void marshallOBRModel(Tblueprint tblueprint, File blueprintFile)
+            throws JAXBException {
+        JAXBContext context = JAXBContext.newInstance(Tblueprint.class);
+        Marshaller marshaller = context.createMarshaller();
+        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+        marshaller.marshal(tblueprint, blueprintFile);
+
+    }
+}

Added: aries/tags/blueprint-0.3/blueprint-annotation-itest/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-itest/pom.xml?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-itest/pom.xml (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-itest/pom.xml Sun Feb 27 21:05:07 2011
@@ -0,0 +1,215 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.aries.blueprint</groupId>
+        <artifactId>blueprint</artifactId>
+        <version>0.3</version>
+    </parent>
+
+    <artifactId>org.apache.aries.blueprint.annotation.itests</artifactId>
+    <name>Apache Aries Blueprint Annotation iTests</name>
+    <description>
+        Integration tests using the standalone blueprint-bundle for the implementation
+        and blueprint-sample-annotation for the blueprint application to be tested.
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse</groupId>
+            <artifactId>osgi</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries</groupId>
+            <artifactId>org.apache.aries.util</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.sample</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.sample-annotation</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>        
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.testbundlea</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.testbundleb</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-default</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit-extender-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.runner</groupId>
+            <artifactId>pax-runner-no-jcl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-mvn</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm-all</artifactId>
+            <scope>test</scope>
+        </dependency> 
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-finder</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.annotation.api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.annotation.impl</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <forkMode>pertest</forkMode>
+                    <excludes>
+                        <exclude>**/*$*</exclude>
+                        <exclude>**/Abstract*.java</exclude>
+                    </excludes>
+                    <includes>
+                        <include>**/Test*.java</include>
+                        <include>**/*Test.java</include>
+                    </includes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>maven-paxexam-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-config</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                        <configuration>
+                            <outputFile>${project.build.directory}/test-classes/META-INF/maven/dependencies.properties</outputFile>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>ci-build-profile</id>
+            <activation>
+                <property>
+                    <name>maven.repo.local</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <!--
+                                when the local repo location has been specified, we need to pass
+                                on this information to PAX mvn url
+                            -->
+                            <argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>

Added: aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,278 @@
+/*
+ * 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.
+ */
+package org.apache.aries.blueprint.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.*;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Currency;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.aries.blueprint.sample.Bar;
+import org.apache.aries.blueprint.sample.Foo;
+import org.junit.After;
+import org.junit.Before;
+import org.ops4j.pax.exam.CoreOptions;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
+import org.ops4j.pax.exam.Inject;
+import org.ops4j.pax.exam.Option;
+import static org.ops4j.pax.exam.OptionUtils.combine;
+import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.util.tracker.ServiceTracker;
+
+public abstract class AbstractIntegrationTest {
+
+    public static final long DEFAULT_TIMEOUT = 60000;
+
+    private List<ServiceTracker> srs;
+
+    @Before
+    public void setUp() {
+        srs = new ArrayList<ServiceTracker>();
+    }
+    
+    @After
+    public void tearDown() throws Exception{
+        for (ServiceTracker st : srs) {
+            if (st != null) {
+                st.close();
+            }  
+        }
+    }
+    
+    @Inject
+    protected BundleContext bundleContext;
+
+    protected BlueprintContainer getBlueprintContainerForBundle(String symbolicName) throws Exception {
+        return getBlueprintContainerForBundle(symbolicName, DEFAULT_TIMEOUT);
+    }
+
+    protected BlueprintContainer getBlueprintContainerForBundle(String symbolicName, long timeout) throws Exception {
+        return getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=" + symbolicName + ")", timeout);
+    }
+    
+    protected BlueprintContainer getBlueprintContainerForBundle(BundleContext bc, String symbolicName, long timeout) throws Exception {
+        return getOsgiService(bc, BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=" + symbolicName + ")", timeout);
+    }
+
+    protected <T> T getOsgiService(Class<T> type, long timeout) {
+        return getOsgiService(type, null, timeout);
+    }
+
+    protected <T> T getOsgiService(Class<T> type) {
+        return getOsgiService(type, null, DEFAULT_TIMEOUT);
+    }
+    
+    protected <T> T getOsgiService(BundleContext bc, Class<T> type, String filter, long timeout) {
+        ServiceTracker tracker = null;
+        try {
+            String flt;
+            if (filter != null) {
+                if (filter.startsWith("(")) {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")" + filter + ")";
+                } else {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")(" + filter + "))";
+                }
+            } else {
+                flt = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")";
+            }
+            Filter osgiFilter = FrameworkUtil.createFilter(flt);
+            tracker = new ServiceTracker(bc == null ? bundleContext : bc, osgiFilter, null);
+            tracker.open();
+            
+            // add tracker to the list of trackers we close at tear down
+            srs.add(tracker);
+            Object svc = type.cast(tracker.waitForService(timeout));
+            if (svc == null) {
+                throw new RuntimeException("Gave up waiting for service " + flt);
+            }
+            return type.cast(svc);
+        } catch (InvalidSyntaxException e) {
+            throw new IllegalArgumentException("Invalid filter", e);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    
+    protected <T> T getOsgiService(Class<T> type, String filter, long timeout) {
+        return getOsgiService(null, type, filter, timeout);
+    }
+
+    protected Bundle installBundle(String groupId, String artifactId) throws Exception {
+        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId);
+        return bundleContext.installBundle(mvnUrl.getURL());
+    }
+
+    protected Bundle getInstalledBundle(String symbolicName) {
+        for (Bundle b : bundleContext.getBundles()) {
+            if (b.getSymbolicName().equals(symbolicName)) {
+                return b;
+            }
+        }
+        return null;
+    }
+
+    public static MavenArtifactProvisionOption mavenBundle(String groupId, String artifactId) {
+        return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject();
+    }
+    
+    public static MavenArtifactProvisionOption mavenBundleInTest(String groupId, String artifactId) {
+        return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).version(getArtifactVersion(groupId, artifactId));
+    }
+
+    //TODO getArtifactVersion and getFileFromClasspath are borrowed and modified from pax-exam.  They should be moved back ASAP.
+    public static String getArtifactVersion( final String groupId,
+                                             final String artifactId )
+    {
+        final Properties dependencies = new Properties();
+        try
+        {
+            InputStream in = getFileFromClasspath("META-INF/maven/dependencies.properties");
+            try {
+                dependencies.load(in);
+            } finally {
+                in.close();
+            }
+            final String version = dependencies.getProperty( groupId + "/" + artifactId + "/version" );
+            if( version == null )
+            {
+                throw new RuntimeException(
+                    "Could not resolve version. Do you have a dependency for " + groupId + "/" + artifactId
+                    + " in your maven project?"
+                );
+            }
+            return version;
+        }
+        catch( IOException e )
+        {
+            // TODO throw a better exception
+            throw new RuntimeException(
+                "Could not resolve version. Did you configured the plugin in your maven project?"
+                + "Or maybe you did not run the maven build and you are using an IDE?"
+            );
+        }
+    }
+
+    private static InputStream getFileFromClasspath( final String filePath )
+        throws FileNotFoundException
+    {
+        try
+        {
+            URL fileURL = AbstractIntegrationTest.class.getClassLoader().getResource( filePath );
+            if( fileURL == null )
+            {
+                throw new FileNotFoundException( "File [" + filePath + "] could not be found in classpath" );
+            }
+            return fileURL.openStream();
+        }
+        catch (IOException e)
+        {
+            throw new FileNotFoundException( "File [" + filePath + "] could not be found: " + e.getMessage() );
+        }
+    }
+
+
+    protected static Option[] updateOptions(Option[] options) {
+        // We need to add pax-exam-junit here when running with the ibm
+        // jdk to avoid the following exception during the test run:
+        // ClassNotFoundException: org.ops4j.pax.exam.junit.Configuration
+        if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+            Option[] ibmOptions = options(
+                wrappedBundle(mavenBundle("org.ops4j.pax.exam", "pax-exam-junit"))
+            );
+            options = combine(ibmOptions, options);
+        }
+
+        return options;
+    }
+    
+    protected void testBlueprintContainer(Bundle bundle) throws Exception {
+        testBlueprintContainer(bundleContext, bundle);
+    }
+    
+    
+    protected void testBlueprintContainer(BundleContext bc, Bundle bundle) throws Exception {
+        BlueprintContainer blueprintContainer = getBlueprintContainerForBundle(
+                bc == null ? bundleContext : bc, "org.apache.aries.blueprint.sample",
+                5000);
+        assertNotNull(blueprintContainer);
+
+        Object obj = blueprintContainer.getComponentInstance("bar");
+        assertNotNull(obj);
+        assertEquals(Bar.class, obj.getClass());
+        Bar bar = (Bar) obj;
+        assertNotNull(bar.getContext());
+        assertEquals("Hello FooBar", bar.getValue());
+        assertNotNull(bar.getList());
+        assertEquals(2, bar.getList().size());
+        assertEquals("a list element", bar.getList().get(0));
+        assertEquals(Integer.valueOf(5), bar.getList().get(1));
+        obj = blueprintContainer.getComponentInstance("foo");
+        assertNotNull(obj);
+        assertEquals(Foo.class, obj.getClass());
+        Foo foo = (Foo) obj;
+        assertEquals(5, foo.getA());
+        assertEquals(10, foo.getB());
+        assertSame(bar, foo.getBar());
+        assertEquals(Currency.getInstance("PLN"), foo.getCurrency());
+        assertEquals(new SimpleDateFormat("yyyy.MM.dd").parse("2009.04.17"),
+                foo.getDate());
+
+        assertTrue(foo.isInitialized());
+        assertFalse(foo.isDestroyed());
+
+        obj = getOsgiService(bc == null ? bundleContext : bc, Foo.class, null, 5000);
+        assertNotNull(obj);
+        assertSame(foo, obj);
+
+        bundle.stop();
+
+        Thread.sleep(1000);
+
+        try {
+            blueprintContainer = getBlueprintContainerForBundle(bc == null ? bundleContext : bc, 
+                    "org.apache.aries.blueprint.sample", 1);
+            fail("BlueprintContainer should have been unregistered");
+        } catch (Exception e) {
+            // Expected, as the module container should have been unregistered
+        }
+
+        assertTrue(foo.isInitialized());
+        assertTrue(foo.isDestroyed());
+    }
+
+}

Added: aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java (added)
+++ aries/tags/blueprint-0.3/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+package org.apache.aries.blueprint.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+
+import java.text.SimpleDateFormat;
+import java.util.Currency;
+import java.util.Hashtable;
+import java.util.Set;
+
+import org.apache.aries.blueprint.sample.Bar;
+import org.apache.aries.blueprint.sample.Foo;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.Bundle;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+@RunWith(JUnit4TestRunner.class)
+public class BlueprintAnnotationTest extends AbstractIntegrationTest {
+
+    @Test
+    public void test() throws Exception {
+        BlueprintContainer blueprintContainer = getBlueprintContainerForBundle(
+                 bundleContext, "org.apache.aries.blueprint.sample-annotation",
+                5000);
+
+        assertNotNull(blueprintContainer);
+
+        Object obj = blueprintContainer.getComponentInstance("bar");
+        assertNotNull(obj);
+        assertEquals(Bar.class, obj.getClass());
+        Bar bar = (Bar) obj;
+        assertEquals("Hello FooBar", bar.getValue());
+        
+        obj = blueprintContainer.getComponentInstance("foo");
+        assertNotNull(obj);
+        assertEquals(Foo.class, obj.getClass());
+        Foo foo = (Foo) obj;
+        assertEquals(5, foo.getA());
+       // assertEquals(10, foo.getB());
+        assertSame(bar, foo.getBar());
+        assertEquals(Currency.getInstance("PLN"), foo.getCurrency());
+        assertEquals(new SimpleDateFormat("yyyy.MM.dd").parse("2009.04.17"),
+                foo.getDate());
+
+        assertTrue(foo.isInitialized());
+        assertFalse(foo.isDestroyed());
+
+       obj = getOsgiService(bundleContext, Foo.class, null, 5000);
+        assertNotNull(obj);
+        assertEquals(foo.toString(), obj.toString());
+    }
+
+    @org.ops4j.pax.exam.junit.Configuration
+    public static Option[] configuration() {
+        Option[] options = options(
+            // Log
+            mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
+            mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
+            // Felix Config Admin
+            mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
+            // Felix mvn url handler
+            mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
+
+
+            // this is how you set the default log level when using pax logging (logProfile)
+            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+
+            // Bundles
+            mavenBundle("org.apache.aries", "org.apache.aries.util"),
+            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
+            mavenBundle("asm", "asm-all"),
+            mavenBundle("org.apache.xbean", "xbean-finder"),
+            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.api"),
+            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.impl"),
+            mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample-annotation"),
+            //mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample"),
+            mavenBundle("org.osgi", "org.osgi.compendium"),
+            //org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
+
+            equinox().version("3.5.0")
+        );
+        options = updateOptions(options);
+        return options;
+    }
+
+}

Added: aries/tags/blueprint-0.3/blueprint-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-api/pom.xml?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-api/pom.xml (added)
+++ aries/tags/blueprint-0.3/blueprint-api/pom.xml Sun Feb 27 21:05:07 2011
@@ -0,0 +1,50 @@
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.aries.blueprint</groupId>
+        <artifactId>blueprint</artifactId>
+        <version>0.3</version>
+    </parent>
+
+    <artifactId>org.apache.aries.blueprint.api</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Aries Blueprint API</name>
+    <description>
+        This bundle contains the blueprint api 1.0.1 and the corresponding xml schema.
+    </description>
+
+    <properties>
+         <aries.osgi.export>
+             org.osgi.service.blueprint*;version="1.0.1"
+         </aries.osgi.export>
+         <aries.osgi.import>
+             !org.osgi.service.blueprint*,
+             *
+         </aries.osgi.import>
+     </properties>
+
+     <dependencies>
+        <dependency>
+            <groupId>org.eclipse</groupId>
+            <artifactId>osgi</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+    
+</project>

Added: aries/tags/blueprint-0.3/blueprint-api/src/main/appended-resources/META-INF/NOTICE.vm
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-api/src/main/appended-resources/META-INF/NOTICE.vm?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-api/src/main/appended-resources/META-INF/NOTICE.vm (added)
+++ aries/tags/blueprint-0.3/blueprint-api/src/main/appended-resources/META-INF/NOTICE.vm Sun Feb 27 21:05:07 2011
@@ -0,0 +1,2 @@
+This product includes software developed at
+the OSGi Alliance (http://www.osgi.org/).
\ No newline at end of file

Added: aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java (added)
+++ aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,100 @@
+/*
+ * 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 java.util.Collection;
+import java.util.Set;
+
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceListMetadata;
+import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
+
+/**
+ * A Blueprint Container represents the managed state of a Blueprint bundle.
+ * 
+ * A Blueprint Container provides access to all managed components. These are
+ * the beans, services, and service references. Only bundles in the
+ * <code>ACTIVE</code> state (and also the <code>STARTING</code> state for
+ * bundles awaiting lazy activation) can have an associated Blueprint Container.
+ * A given Bundle Context has at most one associated Blueprint Container.
+ * 
+ * A Blueprint Container can be obtained by injecting the predefined
+ * &quot;blueprintContainer&quot; component id. The Blueprint Container is also
+ * registered as a service and its managed components can be queried.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 791585 $
+ */
+public interface BlueprintContainer {
+	/**
+	 * Returns the set of component ids managed by this Blueprint Container.
+	 * 
+	 * @return An immutable Set of Strings, containing the ids of all of the
+	 *         components managed within this Blueprint Container.
+	 */
+	Set<String> getComponentIds();
+
+	/**
+	 * Return the component instance for the specified component id.
+	 * 
+	 * If the component's manager has not yet been activated, calling this
+	 * operation will atomically activate it. If the component has singleton
+	 * scope, the activation will cause the component instance to be created and
+	 * initialized. If the component has prototype scope, then each call to this
+	 * method will return a new component instance.
+	 * 
+	 * @param id The component id for the requested component instance.
+	 * @return A component instance for the component with the specified
+	 *         component id.
+	 * @throws NoSuchComponentException If no component with the specified
+	 *         component id is managed by this Blueprint Container.
+	 */
+	Object getComponentInstance(String id);
+
+	/**
+	 * Return the Component Metadata object for the component with the specified
+	 * component id.
+	 * 
+	 * @param id The component id for the requested Component Metadata.
+	 * @return The Component Metadata object for the component with the
+	 *         specified component id.
+	 * @throws NoSuchComponentException If no component with the specified
+	 *         component id is managed by this Blueprint Container.
+	 */
+	ComponentMetadata getComponentMetadata(String id);
+
+	/**
+	 * Return all {@link ComponentMetadata} objects of the specified Component
+	 * Metadata type. The supported Component Metadata types are
+	 * {@link ComponentMetadata} (which returns the Component Metadata for all
+	 * defined manager types), {@link BeanMetadata} ,
+	 * {@link ServiceReferenceMetadata} (which returns both
+	 * {@link ReferenceMetadata} and {@link ReferenceListMetadata} objects), and
+	 * {@link ServiceMetadata}. The collection will include all Component
+	 * Metadata objects of the requested type, including components that are
+	 * declared inline.
+	 * 
+	 * @param type The super type or type of the requested Component Metadata
+	 *        objects.
+	 * @return An immutable collection of Component Metadata objects of the
+	 *         specified type.
+	 */
+	<T extends ComponentMetadata> Collection<T> getMetadata(
+			Class<T> type);
+}

Added: aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintEvent.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintEvent.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintEvent.java (added)
+++ aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintEvent.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,370 @@
+/*
+ * 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.Bundle;
+
+/**
+ * A Blueprint Event.
+ *
+ * <p>
+ * <code>BlueprintEvent</code> objects are delivered to all registered
+ * {@link BlueprintListener} services. Blueprint Events must be asynchronously
+ * delivered in chronological order with respect to each listener.
+ *
+ * <p>
+ * In addition, after a Blueprint Listener is registered, the Blueprint extender
+ * will synchronously send to this Blueprint Listener the last Blueprint Event
+ * for each ready Blueprint bundle managed by this extender. This
+ * <em>replay</em> of Blueprint Events is designed so that the new Blueprint
+ * Listener can be informed of the state of each Blueprint bundle. Blueprint
+ * Events sent during this replay will have the {@link #isReplay()} flag set.
+ * The Blueprint extender must ensure that this replay phase does not interfere
+ * with new Blueprint Events so that the chronological order of all Blueprint
+ * Events received by the Blueprint Listener is preserved. If the last Blueprint
+ * Event for a given Blueprint bundle is {@link #DESTROYED}, the extender must
+ * not send it during this replay phase.
+ *
+ * <p>
+ * A type code is used to identify the type of event. The following event types
+ * are defined:
+ * <ul>
+ * <li>{@link #CREATING}</li>
+ * <li>{@link #CREATED}</li>
+ * <li>{@link #DESTROYING}</li>
+ * <li>{@link #DESTROYED}</li>
+ * <li>{@link #FAILURE}</li>
+ * <li>{@link #GRACE_PERIOD}</li>
+ * <li>{@link #WAITING}</li>
+ * </ul>
+ *
+ * <p>
+ * In addition to calling the registered {@link BlueprintListener} services, the
+ * Blueprint extender must also send those events to the Event Admin service, if
+ * it is available.
+ *
+ * @see BlueprintListener
+ * @see EventConstants
+ * @Immutable
+ * @version $Revision: 1031344 $
+ */
+public class BlueprintEvent {
+
+	/**
+	 * The Blueprint extender has started creating a Blueprint Container for the
+	 * bundle.
+	 */
+	public static final int	CREATING		= 1;
+	/**
+	 * The Blueprint extender has created a Blueprint Container for the bundle.
+	 * This event is sent after the Blueprint Container has been registered as a
+	 * service.
+	 */
+	public static final int	CREATED			= 2;
+	/**
+	 * The Blueprint extender has started destroying the Blueprint Container for
+	 * the bundle.
+	 */
+	public static final int	DESTROYING		= 3;
+	/**
+	 * The Blueprint Container for the bundle has been completely destroyed.
+	 * This event is sent after the Blueprint Container has been unregistered as
+	 * a service.
+	 */
+	public static final int	DESTROYED		= 4;
+	/**
+	 * The Blueprint Container creation for the bundle has failed. If this event
+	 * is sent after a timeout in the Grace Period, the
+	 * {@link #getDependencies()} method must return an array of missing
+	 * mandatory dependencies. The event must also contain the cause of the
+	 * failure as a <code>Throwable</code> through the {@link #getCause()}
+	 * method.
+	 */
+	public static final int	FAILURE			= 5;
+	/**
+	 * The Blueprint Container has entered the grace period. The list of missing
+	 * dependencies must be made available through the
+	 * {@link #getDependencies()} method. During the grace period, a
+	 * {@link #GRACE_PERIOD} event is sent each time the set of unsatisfied
+	 * dependencies changes.
+	 */
+	public static final int	GRACE_PERIOD	= 6;
+	/**
+	 * The Blueprint Container is waiting on the availability of a service to
+	 * satisfy an invocation on a referenced service. The missing dependency
+	 * must be made available through the {@link #getDependencies()} method
+	 * which will return an array containing one filter object as a String.
+	 */
+	public static final int	WAITING			= 7;
+
+	/**
+	 * Type of this event.
+	 *
+	 * @see #getType()
+	 */
+	private final int		type;
+	/**
+	 * The time when the event occurred.
+	 *
+	 * @see #getTimestamp()
+	 */
+	private final long		timestamp;
+	/**
+	 * The Blueprint bundle.
+	 *
+	 * @see #getBundle()
+	 */
+	private final Bundle	bundle;
+	/**
+	 * The Blueprint extender bundle.
+	 *
+	 * @see #getExtenderBundle()
+	 */
+	private final Bundle	extenderBundle;
+	/**
+	 * An array containing filters identifying the missing dependencies. Must
+	 * not be <code>null</code> when the event type requires it.
+	 *
+	 * @see #getDependencies()
+	 */
+	private final String[]	dependencies;
+	/**
+	 * Cause of the failure.
+	 *
+	 * @see #getCause()
+	 */
+	private final Throwable	cause;
+	/**
+	 * Indicate if this event is a replay event or not.
+	 *
+	 * @see #isReplay()
+	 */
+	private final boolean	replay;
+
+	/**
+	 * Create a simple <code>BlueprintEvent</code> object.
+	 *
+	 * @param type The type of this event.
+	 * @param bundle The Blueprint bundle associated with this event. This
+	 *        parameter must not be <code>null</code>.
+	 * @param extenderBundle The Blueprint extender bundle that is generating
+	 *        this event. This parameter must not be <code>null</code>.
+	 */
+	public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle) {
+		this(type, bundle, extenderBundle, null, null);
+	}
+
+	/**
+	 * Create a <code>BlueprintEvent</code> object associated with a set of
+	 * dependencies.
+	 *
+	 * @param type The type of this event.
+	 * @param bundle The Blueprint bundle associated with this event. This
+	 *        parameter must not be <code>null</code>.
+	 * @param extenderBundle The Blueprint extender bundle that is generating
+	 *        this event. This parameter must not be <code>null</code>.
+	 * @param dependencies An array of <code>String</code> filters for each
+	 *        dependency associated with this event. Must be a non-empty array
+	 *        for event types {@link #FAILURE}, {@link #GRACE_PERIOD} and
+	 *        {@link #WAITING}. Must be <code>null</code> for other event types.
+	 */
+	public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle,
+			String[] dependencies) {
+		this(type, bundle, extenderBundle, dependencies, null);
+	}
+
+	/**
+	 * Create a <code>BlueprintEvent</code> object associated with a failure
+	 * cause.
+	 *
+	 * @param type The type of this event.
+	 * @param bundle The Blueprint bundle associated with this event. This
+	 *        parameter must not be <code>null</code>.
+	 * @param extenderBundle The Blueprint extender bundle that is generating
+	 *        this event. This parameter must not be <code>null</code>.
+	 * @param cause A <code>Throwable</code> object describing the root cause of
+	 *        the event. May be <code>null</code>.
+	 */
+	public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle,
+			Throwable cause) {
+		this(type, bundle, extenderBundle, null, cause);
+	}
+
+	/**
+	 * Create a <code>BlueprintEvent</code> object associated with a failure
+	 * cause and a set of dependencies.
+	 *
+	 * @param type The type of this event.
+	 * @param bundle The Blueprint bundle associated with this event. This
+	 *        parameter must not be <code>null</code>.
+	 * @param extenderBundle The Blueprint extender bundle that is generating
+	 *        this event. This parameter must not be <code>null</code>.
+	 * @param dependencies An array of <code>String</code> filters for each
+	 *        dependency associated with this event. Must be a non-empty array
+	 *        for event types {@link #GRACE_PERIOD} and	(@link #WAITING}.  It
+	 *        is optional for {@link #FAILURE} event types.
+	 *        Must be <code>null</code> for other event types.
+	 * @param cause A <code>Throwable</code> object describing the root cause of
+	 *        this event. May be <code>null</code>.
+	 */
+	public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle,
+			String[] dependencies, Throwable cause) {
+		this.type = type;
+		this.timestamp = System.currentTimeMillis();
+		this.bundle = bundle;
+		this.extenderBundle = extenderBundle;
+	    this.dependencies = dependencies == null ? null
+                        : (String[]) dependencies.clone();;
+		this.cause = cause;
+		this.replay = false;
+		if (bundle == null) {
+			throw new NullPointerException("bundle must not be null");
+		}
+		if (extenderBundle == null) {
+			throw new NullPointerException("extenderBundle must not be null");
+		}
+		switch (type) {
+			case WAITING :
+			case GRACE_PERIOD :
+				if (dependencies == null) {
+					throw new NullPointerException(
+							"dependencies must not be null");
+				}
+				if (dependencies.length == 0) {
+					throw new IllegalArgumentException(
+							"dependencies must not be length zero");
+				}
+				break;
+			case FAILURE :
+				// not all FAILURE events have a dependency list, but if there
+				// is one, it must be non-empty.
+				if (dependencies != null) {
+     				if (dependencies.length == 0) {
+     					throw new IllegalArgumentException(
+     							"dependencies must not be length zero");
+     				}
+				}
+				break;
+			default :
+				if (dependencies != null) {
+					throw new IllegalArgumentException(
+							"dependencies must be null");
+				}
+				break;
+		}
+	}
+
+	/**
+	 * Create a new <code>BlueprintEvent</code> from the specified
+	 * <code>BlueprintEvent</code>. The <code>timestamp</code> property will be
+	 * copied from the original event and only the replay property will be
+	 * overridden with the given value.
+	 *
+	 * @param event The original <code>BlueprintEvent</code> to copy. Must not
+	 *        be <code>null</code>.
+	 * @param replay <code>true</code> if this event should be used as a replay
+	 *        event.
+	 */
+	public BlueprintEvent(BlueprintEvent event, boolean replay) {
+		this.type = event.type;
+		this.timestamp = event.timestamp;
+		this.bundle = event.bundle;
+		this.extenderBundle = event.extenderBundle;
+		this.dependencies = event.dependencies;
+		this.cause = event.cause;
+		this.replay = replay;
+	}
+
+	/**
+	 * Return the type of this event.
+	 * <p>
+	 * The type values are:
+	 * <ul>
+	 * <li>{@link #CREATING}</li>
+	 * <li>{@link #CREATED}</li>
+	 * <li>{@link #DESTROYING}</li>
+	 * <li>{@link #DESTROYED}</li>
+	 * <li>{@link #FAILURE}</li>
+	 * <li>{@link #GRACE_PERIOD}</li>
+	 * <li>{@link #WAITING}</li>
+	 * </ul>
+	 *
+	 * @return The type of this event.
+	 */
+	public int getType() {
+		return type;
+	}
+
+	/**
+	 * Return the time at which this event was created.
+	 *
+	 * @return The time at which this event was created.
+	 */
+	public long getTimestamp() {
+		return timestamp;
+	}
+
+	/**
+	 * Return the Blueprint bundle associated with this event.
+	 *
+	 * @return The Blueprint bundle associated with this event.
+	 */
+	public Bundle getBundle() {
+		return bundle;
+	}
+
+	/**
+	 * Return the Blueprint extender bundle that is generating this event.
+	 *
+	 * @return The Blueprint extender bundle that is generating this event.
+	 */
+	public Bundle getExtenderBundle() {
+		return extenderBundle;
+	}
+
+	/**
+	 * Return the filters identifying the missing dependencies that caused this
+	 * event.
+	 *
+	 * @return The filters identifying the missing dependencies that caused this
+	 *         event if the event type is one of {@link #WAITING},
+	 *         {@link #GRACE_PERIOD} or {@link #FAILURE} or <code>null</code>
+	 *         for the other event types.
+	 */
+	public String[] getDependencies() {
+		return dependencies == null ? null : (String[]) dependencies.clone();
+	}
+
+	/**
+	 * Return the cause for this {@link #FAILURE} event.
+	 *
+	 * @return The cause of the failure for this event. May be <code>null</code>
+	 *         .
+	 */
+	public Throwable getCause() {
+		return cause;
+	}
+
+	/**
+	 * Return whether this event is a replay event.
+	 *
+	 * @return <code>true</code> if this event is a replay event and
+	 *         <code>false</code> otherwise.
+	 */
+	public boolean isReplay() {
+		return replay;
+	}
+}

Added: aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java (added)
+++ aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java Sun Feb 27 21:05:07 2011
@@ -0,0 +1,52 @@
+/*
+ * 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 <code>BlueprintEvent</code> Listener.
+ * 
+ * <p>
+ * To receive Blueprint Events, a bundle must register a Blueprint Listener
+ * service.
+ * 
+ * After a Blueprint Listener is registered, the Blueprint extender must
+ * synchronously send to this Blueprint Listener the last Blueprint Event for
+ * each ready Blueprint bundle managed by this extender. This replay of
+ * Blueprint Events is designed so that the new Blueprint Listener can be
+ * informed of the state of each Blueprint bundle. Blueprint Events sent during
+ * this replay will have the {@link BlueprintEvent#isReplay() isReplay()} flag
+ * set. The Blueprint extender must ensure that this replay phase does not
+ * interfere with new Blueprint Events so that the chronological order of all
+ * Blueprint Events received by the Blueprint Listener is preserved. If the last
+ * Blueprint Event for a given Blueprint bundle is
+ * {@link BlueprintEvent#DESTROYED DESTROYED}, the extender must not send it
+ * during this replay phase.
+ * 
+ * @see BlueprintEvent
+ * @ThreadSafe
+ * @version $Revision: 792499 $
+ */
+public interface BlueprintListener {
+
+	/**
+	 * Receives notifications of a Blueprint Event.
+	 * 
+	 * Implementers should quickly process the event and return.
+	 * 
+	 * @param event The {@link BlueprintEvent}.
+	 */
+	void blueprintEvent(BlueprintEvent event);
+}

Added: aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java
URL: http://svn.apache.org/viewvc/aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java?rev=1075147&view=auto
==============================================================================
--- aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java (added)
+++ aries/tags/blueprint-0.3/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java Sun Feb 27 21:05:07 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 definition is in error.
+ * 
+ * This exception is thrown when a configuration-related error occurs during
+ * creation of a Blueprint Container.
+ * 
+ * @version $Revision: 791585 $
+ */
+public class ComponentDefinitionException extends RuntimeException {
+	private static final long	serialVersionUID	= 1L;
+
+	/**
+	 * Creates a Component Definition Exception with no message or exception
+	 * cause.
+	 */
+	public ComponentDefinitionException() {
+		super();
+	}
+
+	/**
+	 * Creates a Component Definition Exception with the specified message
+	 * 
+	 * @param explanation The associated message.
+	 */
+	public ComponentDefinitionException(String explanation) {
+		super(explanation);
+	}
+
+	/**
+	 * Creates a Component Definition Exception with the specified message and
+	 * exception cause.
+	 * 
+	 * @param explanation The associated message.
+	 * @param cause The cause of this exception.
+	 */
+	public ComponentDefinitionException(String explanation, Throwable cause) {
+		super(explanation, cause);
+	}
+
+	/**
+	 * Creates a Component Definition Exception with the exception cause.
+	 * 
+	 * @param cause The cause of this exception.
+	 */
+	public ComponentDefinitionException(Throwable cause) {
+		super(cause);
+	}
+}



Mime
View raw message