geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r763912 [1/2] - in /geronimo/sandbox/gawor/rfc124: extender/src/main/java/org/apache/geronimo/osgi/context/ extender/src/main/java/org/apache/geronimo/osgi/reflect/ rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/
Date Fri, 10 Apr 2009 11:33:28 GMT
Author: rickmcguire
Date: Fri Apr 10 11:33:27 2009
New Revision: 763912

URL: http://svn.apache.org/viewvc?rev=763912&view=rev
Log:
fix some errors in the api classes and add concrete reflection api classes

Added:
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java   (with props)
    geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertyInjectionMetadata.java
      - copied, changed from r763906, geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertiesInjectionMetadata.java
Removed:
    geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertiesInjectionMetadata.java
Modified:
    geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/context/ModuleContextImpl.java
    geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java
    geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/LocalComponentMetadata.java

Modified: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/context/ModuleContextImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/context/ModuleContextImpl.java?rev=763912&r1=763911&r2=763912&view=diff
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/context/ModuleContextImpl.java (original)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/context/ModuleContextImpl.java Fri Apr 10 11:33:27 2009
@@ -32,7 +32,7 @@
         this.bundleContext = bundleContext;
         System.out.println("Module context created: " + this.bundleContext);
     }
-    
+
     public BundleContext getBundleContext() {
         return this.bundleContext;
     }
@@ -60,7 +60,7 @@
     public Collection getReferencedServicesMetadata() {
         return null;
     }
-        
+
     public void destroy() {
         System.out.println("Module context destroyed: " + this.bundleContext);
     }

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,65 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.ArrayValue;
+import org.osgi.service.blueprint.reflect.Value;
+
+
+public class ArrayValueImpl implements ArrayValue {
+    private String valueType;
+    private Value[] array;
+
+    public ArrayValueImpl() {
+        array = new Value[0];
+    }
+
+    public ArrayValueImpl(ArrayValue source) {
+        Value[] valueArray = source.getArray();
+
+        array = new Value[valueArray.length];
+        for (int i = 0; i < valueArray.length; i++) {
+            array[i] = MetadataUtil.cloneValue(valueArray[i]);
+        }
+
+        valueType = source.getValueType();
+    }
+
+    /**
+     * The value-type specified for the list elements, or null if none given
+     */
+	public String getValueType() {
+        return valueType;
+    }
+
+    public void setValueType(String type) {
+        valueType = type;
+    }
+
+    /**
+     * The array of Value objects
+     */
+    public Value[] getArray() {
+        return array;
+    }
+
+    public void setValueArray(Value[] array) {
+        this.array = array;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ArrayValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,87 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.BindingListenerMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+
+public class BindingListenerMetadataImpl implements BindingListenerMetadata {
+    private Value listenerComponent;
+    private String bindMethodName;
+    private String unbindMethodName;
+
+    public BindingListenerMetadataImpl()
+    {
+    }
+
+    public BindingListenerMetadataImpl(BindingListenerMetadata source) {
+        listenerComponent = MetadataUtil.cloneValue(source.getListenerComponent());
+        bindMethodName = source.getBindMethodName();
+        unbindMethodName = source.getUnbindMethodName();
+    }
+
+
+
+    /**
+     * The component instance that will receive bind and unbind
+     * events. The returned value must reference a component and therefore be
+     * either a ComponentValue, ReferenceValue, or ReferenceNameValue.
+     *
+     * @return the listener component reference.
+     */
+    public Value getListenerComponent() {
+        return listenerComponent;
+    }
+
+    public void setListenerComponent(Value v) {
+        listenerComponent = v;
+    }
+
+
+    /**
+     * The name of the method to invoke on the listener component when
+     * a matching service is bound to the reference
+     *
+     * @return the bind callback method name.
+     */
+    public String getBindMethodName() {
+        return bindMethodName;
+    }
+
+    public void setBindMethodName(String name) {
+        bindMethodName = name;
+    }
+
+
+
+    /**
+     * The name of the method to invoke on the listener component when
+     * a service is unbound from the reference.
+     *
+     * @return the unbind callback method name.
+     */
+    public String getUnbindMethodName() {
+        return unbindMethodName;
+    }
+
+    public void setUnbindMethodName(String name) {
+        unbindMethodName = name;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/BindingListenerMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,103 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.List;
+
+import org.osgi.service.blueprint.reflect.CollectionBasedServiceReferenceComponentMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+public class CollectionBasedServiceReferenceComponentMetadataImpl extends ServiceReferenceComponentMetadataImpl implements CollectionBasedServiceReferenceComponentMetadata {
+    private Value comparator;
+    private Class collectionType = List.class;
+    private int orderingBasis;
+    private int memberType;
+
+    public CollectionBasedServiceReferenceComponentMetadataImpl() {
+        this((String)null);
+    }
+
+    public CollectionBasedServiceReferenceComponentMetadataImpl(String name) {
+        super(name);
+    }
+
+
+    public CollectionBasedServiceReferenceComponentMetadataImpl(CollectionBasedServiceReferenceComponentMetadata source) {
+        super(source);
+
+        comparator = MetadataUtil.cloneValue(source.getComparator());
+        collectionType = source.getCollectionType();
+        orderingBasis = source.getOrderingComparisonBasis();
+    }
+
+    /**
+     * The comparator specified for ordering the collection, or null if no
+     * comparator was specified.
+     *
+     * @return if a comparator was specified then a Value object identifying the
+     * comparator (a ComponentValue, ReferenceValue, or ReferenceNameValue) is
+     * returned. If no comparator was specified then null will be returned.
+     */
+    public Value getComparator() {
+        return comparator;
+    }
+
+    public void setComparator(Value comparator) {
+        this.comparator = comparator;
+    }
+
+
+    /**
+     * The type of collection to be created.
+     *
+     * @return Class object for the specified collection type (List, Set).
+     */
+    public Class getCollectionType() {
+        return collectionType;
+    }
+
+
+    public void setCollectionType(Class type) {
+        collectionType = type;
+    }
+
+
+    /**
+     * The basis on which to perform natural ordering, if specified.
+     *
+     * @return one of ORDER_BASIS_SERVICES and ORDER_BASIS_SERVICE_REFERENCES
+     */
+    public int getOrderingComparisonBasis() {
+        return orderingBasis;
+    }
+
+    public void setOrderingComparisonBasis(int b) {
+        orderingBasis = b;
+    }
+
+    /**
+     * Whether the collection will contain service instances, or service references
+     */
+    public int getMemberType() {
+        return memberType;
+    }
+
+    public void setMemberType(int memberType) {
+           this.memberType = memberType;
+    }
+}

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/CollectionBasedServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,78 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+
+public class ComponentMetadataImpl implements ComponentMetadata {
+    // the name of the component;
+    private String name;
+    // the dependency set
+    private Set dependencies;
+
+    protected ComponentMetadataImpl() {
+        this((String)null);
+    }
+
+    protected ComponentMetadataImpl(String name) {
+        this.name = name;
+        dependencies = new HashSet();
+    }
+
+    protected ComponentMetadataImpl(ComponentMetadata source) {
+        name = source.getName();
+        dependencies = new HashSet(source.getExplicitDependencies());
+    }
+
+
+
+    /**
+     * The name of the component.
+     *
+     * @return component name. The component name may be null if this is an anonymously
+     * defined inner component.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * The names of any components listed in a "depends-on" attribute for this
+     * component.
+     *
+     * @return an immutable set of component names for components that we have explicitly
+     * declared a dependency on, or an empty set if none.
+     */
+    public Set getExplicitDependencies() {
+        return dependencies;
+    }
+
+
+    /**
+     * Add a new dependency to the explicit list.
+     *
+     * @param name   The new dependency name.
+     */
+    public void addDependency(String name) {
+        dependencies.add(name);
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,39 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ComponentValue;
+
+
+public class ComponentValueImpl implements ComponentValue {
+    private ComponentMetadata componentMetadata;
+
+    public ComponentValueImpl(ComponentMetadata meta) {
+        componentMetadata = meta;
+    }
+
+    public ComponentValueImpl(ComponentValue source) {
+        componentMetadata = MetadataUtil.cloneComponentMetadata(source.getComponentMetadata());
+    }
+
+    public ComponentMetadata getComponentMetadata() {
+        return componentMetadata;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ComponentValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,58 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.osgi.service.blueprint.reflect.*;
+
+public class ConstructorInjectionMetadataImpl implements ConstructorInjectionMetadata {
+    private List parameterSpecifications = new ArrayList();
+
+    public ConstructorInjectionMetadataImpl() {
+
+    }
+
+    public ConstructorInjectionMetadataImpl(ConstructorInjectionMetadata source) {
+        Iterator i = source.getParameterSpecifications().iterator();
+        while (i.hasNext()) {
+            parameterSpecifications.add(new ParameterSpecificationImpl((ParameterSpecification)i.next()));
+        }
+    }
+
+
+    /**
+     * The parameter specifications that determine which constructor to invoke
+     * and what arguments to pass to it.
+     *
+     * @return an immutable list of ParameterSpecification, or an empty list if the
+     * default constructor is to be invoked. The list is ordered by ascending parameter index.
+     * I.e., the first parameter is first in the list, and so on.
+     */
+    public List getParameterSpecifications() {
+        return parameterSpecifications;
+    }
+
+    public void addParameterSpecification(ParameterSpecification p) {
+        parameterSpecifications.add(p);
+    }
+
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ConstructorInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,64 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.osgi.service.blueprint.reflect.*;
+
+
+public class ListValueImpl implements ListValue {
+    private List list;
+    private String valueType;
+
+    public ListValueImpl(List list) {
+        this.list = list;
+    }
+
+    public ListValueImpl(ListValue source) {
+        this.list = new ArrayList();
+        Iterator i = source.getList().iterator();
+        while (i.hasNext()) {
+            list.add(MetadataUtil.cloneValue((Value)i.next()));
+        }
+        valueType = source.getValueType();
+    }
+
+
+    /**
+     * The List (of Value objects) for this List-based value
+     */
+    public List getList() {
+        return list;
+    }
+
+    /**
+     * The value-type specified for the list elements, or null if none given
+     */
+	public String getValueType() {
+        return valueType;
+    }
+
+    public void setValueType(String type) {
+        valueType = type;
+    }
+}
+
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ListValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,258 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.osgi.service.blueprint.reflect.ConstructorInjectionMetadata;
+import org.osgi.service.blueprint.reflect.LocalComponentMetadata;
+import org.osgi.service.blueprint.reflect.MethodInjectionMetadata;
+import org.osgi.service.blueprint.reflect.ParameterSpecification;
+import org.osgi.service.blueprint.reflect.PropertyInjectionMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+
+public class LocalComponentMetadataImpl extends ComponentMetadataImpl implements LocalComponentMetadata {
+    // the constructor metadata impl information.
+    private ConstructorInjectionMetadataImpl constructorInjection;
+    // the component class name
+    private String className;
+    private String initMethod;
+    private String destroyMethod;
+    private String scope;
+    private boolean lazy;
+    private Collection propertyInjection;
+    private Value factoryComponent;
+    private MethodInjectionMetadata factoryMethod;
+
+    public LocalComponentMetadataImpl() {
+        this((String)null);
+    }
+
+    public LocalComponentMetadataImpl(String name) {
+        super(name);
+        // create a new one of these, even if empty
+        propertyInjection = new ArrayList();
+        scope = SCOPE_SINGLETON;
+        // we always have something here
+        constructorInjection = new ConstructorInjectionMetadataImpl();
+    }
+
+
+    public LocalComponentMetadataImpl(LocalComponentMetadata source) {
+        super(source);
+        constructorInjection = new ConstructorInjectionMetadataImpl(source.getConstructorInjectionMetadata());
+        initMethod = source.getInitMethodName();
+        destroyMethod = source.getDestroyMethodName();
+        scope = source.getScope();
+        lazy = source.isLazy();
+        propertyInjection = new ArrayList();
+        // we need to deep copy this collection to replace with our own version
+        Iterator propertySource = source.getPropertyInjectionMetadata().iterator();
+        while (propertySource.hasNext()) {
+            propertyInjection.add(new PropertyInjectionMetadataImpl((PropertyInjectionMetadata)propertySource.next()));
+        }
+        factoryComponent = MetadataUtil.cloneValue(source.getFactoryComponent());
+    }
+
+
+    /**
+     * The constructor injection metadata for this component.
+     *
+     * @return the constructor injection metadata. This is guaranteed to be
+     * non-null and will refer to the default constructor if no explicit
+     * constructor injection was specified for the component.
+     */
+    public ConstructorInjectionMetadata getConstructorInjectionMetadata() {
+        return constructorInjection;
+    }
+
+
+    /**
+     * A couple of convenience methods to make components
+     * easier to construct.
+     *
+     * @param spec   The Parameter spect to add.
+     */
+    public void addConstructorArg(ParameterSpecification spec) {
+		constructorInjection.addParameterSpecification(spec);
+	}
+
+    /**
+     * convenience method for String-based values
+     *
+     * @param value  The string source value.
+     * @param index  The index position
+     */
+	public void addConstructorArg(String value, int index) {
+        ParameterSpecificationImpl spec = new ParameterSpecificationImpl();
+        spec.setIndex(index);
+        spec.setValue(new TypedStringValueImpl(value));
+	}
+
+
+    /**
+     * The name of the class type specified for this component.
+     *
+     * @return the name of the component class. If no class was specified
+     * in the component definition (because the a factory component is used
+     * instead) then this method will return null.
+     */
+    public String getClassName() {
+        return className;
+    }
+
+    public void setClassName(String name) {
+        this.className = name;
+    }
+
+    /**
+     * The name of the init method specified for this component, if any.
+     *
+     * @return the method name of the specified init method, or null if
+     * no init method was specified.
+     */
+    public String getInitMethodName() {
+        return initMethod;
+    }
+
+    public void setInitMethodName(String name) {
+        this.initMethod = name;
+    }
+
+
+    /**
+     * Is this component to be lazily instantiated?
+     *
+     * @return true, iff this component definition specifies lazy
+     * instantiation.
+     */
+    public boolean isLazy() {
+        return lazy;
+    }
+
+    public void setLazy(boolean lazy) {
+        this.lazy = lazy;
+    }
+
+
+    /**
+     * The name of the destroy method specified for this component, if any.
+     *
+     * @return the method name of the specified destroy method, or null if no
+     * destroy method was specified.
+     */
+    public String getDestroyMethodName() {
+        return destroyMethod;
+    }
+
+
+    public void setDestroyMethodName(String name) {
+        destroyMethod = name;
+    }
+
+    /**
+     * The component instance on which to invoke the factory method (if specified).
+     *
+     * @return when a factory method and factory component has been specified for this
+     * component, this operation returns the metadata specifying the component on which
+     * the factory method is to be invoked. When no factory component has been specified
+     * this operation will return null. A return value of null with a non-null factory method
+     * indicates that the factory method should be invoked as a static method on the
+     * component class itself.
+     */
+    public Value getFactoryComponent() {
+        return factoryComponent;
+    }
+
+    public void setFactoryComponent(Value m) {
+        factoryComponent = m;
+    }
+
+
+
+    /**
+     * The property injection metadata for this component.
+     *
+     * @return an immutable collection of PropertyInjectionMetadata, with one entry for each property to be injected. If
+     * no property injection was specified for this component then an empty collection
+     * will be returned.
+     *
+     */
+    public Collection getPropertyInjectionMetadata() {
+        return propertyInjection;
+    }
+
+    public void addProperty(PropertyInjectionMetadata m) {
+        propertyInjection.add(m);
+    }
+
+    public void replaceProperty(PropertyInjectionMetadata m) {
+        String name = m.getName();
+        // remove any matching item and replace with the new one
+        Iterator i = propertyInjection.iterator();
+        while (i.hasNext()) {
+            PropertyInjectionMetadata current = (PropertyInjectionMetadata)i.next();
+            if (current.getName().equals(name)) {
+                i.remove();
+                break;
+            }
+        }
+        propertyInjection.add(m);
+    }
+
+    public void addProperty(String name, Value value) {
+        addProperty(new PropertyInjectionMetadataImpl(name, value));
+    }
+
+    public void addProperty(String name, String value) {
+        addProperty(new PropertyInjectionMetadataImpl(name, new TypedStringValueImpl(value)));
+    }
+
+    /**
+     * The metadata describing how to create the component instance by invoking a
+     * method (as opposed to a constructor) if factory methods are used.
+     *
+     * @return the method injection metadata for the specified factory method, or null if no
+     * factory method is used for this component.
+     */
+    public MethodInjectionMetadata getFactoryMethodMetadata() {
+        return factoryMethod;
+    }
+
+    public void setFactoryMethodMetadata(MethodInjectionMetadata factoryMethod) {
+        this.factoryMethod = factoryMethod;
+    }
+
+
+    /**
+     * The specified scope for the component lifecycle.
+     *
+     * @return a String indicating the scope specified for the component.
+     *
+     * @see #SCOPE_SINGLETON
+     * @see #SCOPE_PROTOTYPE
+     * @see #SCOPE_BUNDLE
+     */
+    public String getScope() {
+        return scope;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/LocalComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,78 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.osgi.service.blueprint.reflect.*;
+
+public class MapValueImpl implements MapValue {
+    private Map map;
+    private String valueType;
+    private String keyType;
+
+    public MapValueImpl(Map map) {
+        this.map = map;
+    }
+
+    public MapValueImpl(MapValue source) {
+        this.map = new HashMap();
+        // both the values and the keys are Value types, so we need to deep copy them
+        Iterator i = source.getMap().entrySet().iterator();
+        while (i.hasNext()) {
+            Entry entry = (Entry)i.next();
+            map.put(MetadataUtil.cloneValue((Value)entry.getKey()), MetadataUtil.cloneValue((Value)entry.getValue()));
+        }
+        valueType = source.getValueType();
+        keyType = source.getKeyType();
+    }
+
+
+    /**
+     * The Map of Value->Value mappings for this map-based value
+     */
+    public Map getMap() {
+        return map;
+    }
+
+    /**
+     * The value-type specified for the list elements, or null if none given
+     */
+	public String getValueType() {
+        return valueType;
+    }
+
+    public void setValueType(String type) {
+        valueType = type;
+    }
+
+	/**
+	 * The key-type specified for map keys, or null if none given
+	 */
+	public String getKeyType() {
+        return keyType;
+    }
+
+    public void setKeyType(String type) {
+        keyType = type;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MapValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,114 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.ArrayValue;
+import org.osgi.service.blueprint.reflect.CollectionBasedServiceReferenceComponentMetadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ComponentValue;
+import org.osgi.service.blueprint.reflect.ListValue;
+import org.osgi.service.blueprint.reflect.LocalComponentMetadata;
+import org.osgi.service.blueprint.reflect.MapValue;
+import org.osgi.service.blueprint.reflect.NullValue;
+import org.osgi.service.blueprint.reflect.PropertiesValue;
+import org.osgi.service.blueprint.reflect.ReferenceNameValue;
+import org.osgi.service.blueprint.reflect.ReferenceValue;
+import org.osgi.service.blueprint.reflect.ServiceExportComponentMetadata;
+import org.osgi.service.blueprint.reflect.SetValue;
+import org.osgi.service.blueprint.reflect.TypedStringValue;
+import org.osgi.service.blueprint.reflect.UnaryServiceReferenceComponentMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+
+/**
+ * A utility class that handles cloning various polymorphic
+ * bits of metadata into concrete class implementations.
+ */
+public class MetadataUtil {
+    static public Value cloneValue(Value source) {
+        if (source instanceof ArrayValue) {
+            return new ArrayValueImpl((ArrayValue)source);
+        }
+        else if (source instanceof ComponentValue) {
+            return new ComponentValueImpl((ComponentValue)source);
+        }
+        else if (source instanceof ListValue) {
+            return new ListValueImpl((ListValue)source);
+        }
+        else if (source instanceof SetValue) {
+            return new SetValueImpl((SetValue)source);
+        }
+        else if (source instanceof MapValue) {
+            return new MapValueImpl((MapValue)source);
+        }
+        else if (source instanceof NullValue) {
+            return new NullValueImpl();
+        }
+        else if (source instanceof PropertiesValue) {
+            return new PropertiesValueImpl((PropertiesValue)source);
+        }
+        else if (source instanceof PropertiesValue) {
+            return new PropertiesValueImpl((PropertiesValue)source);
+        }
+        else if (source instanceof ReferenceNameValue) {
+            return new ReferenceNameValueImpl((ReferenceNameValue)source);
+        }
+        else if (source instanceof ReferenceValue) {
+            return new ReferenceValueImpl((ReferenceValue)source);
+        }
+        else if (source instanceof TypedStringValue) {
+            return new TypedStringValueImpl((TypedStringValue)source);
+        }
+
+        throw new RuntimeException("Unknown Value type received: " + source.getClass().getName());
+    }
+
+
+    /**
+     * Clone a component metadata item, returning a mutable
+     * instance.
+     *
+     * @param source The source metadata item.
+     *
+     * @return A mutable instance of this metadata item.
+     */
+    static public ComponentMetadata cloneComponentMetadata(ComponentMetadata source) {
+        if (source instanceof LocalComponentMetadata) {
+            return new LocalComponentMetadataImpl((LocalComponentMetadata)source);
+        }
+        else if (source instanceof CollectionBasedServiceReferenceComponentMetadata) {
+            return new CollectionBasedServiceReferenceComponentMetadataImpl((CollectionBasedServiceReferenceComponentMetadata)source);
+        }
+        else if (source instanceof CollectionBasedServiceReferenceComponentMetadata) {
+            return new CollectionBasedServiceReferenceComponentMetadataImpl((CollectionBasedServiceReferenceComponentMetadata)source);
+        }
+        else if (source instanceof ServiceExportComponentMetadata) {
+            return new ServiceExportComponentMetadataImpl((ServiceExportComponentMetadata)source);
+        }
+        else if (source instanceof ServiceExportComponentMetadata) {
+            return new ServiceExportComponentMetadataImpl((ServiceExportComponentMetadata)source);
+        }
+        else if (source instanceof UnaryServiceReferenceComponentMetadata) {
+            return new UnaryServiceReferenceComponentMetadataImpl((UnaryServiceReferenceComponentMetadata)source);
+        }
+
+        throw new RuntimeException("Unknown ComponentMetadata type received: " + source.getClass().getName());
+    }
+
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MetadataUtil.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,75 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.osgi.service.blueprint.reflect.*;
+
+
+public class MethodInjectionMetadataImpl implements MethodInjectionMetadata {
+    private String name;
+    private List parameterSpecifications = new ArrayList();
+
+    public MethodInjectionMetadataImpl() {
+    }
+
+    public MethodInjectionMetadataImpl(MethodInjectionMetadata source) {
+        name = source.getName();
+        Iterator i = source.getParameterSpecifications().iterator();
+        while (i.hasNext()) {
+            parameterSpecifications.add(new ParameterSpecificationImpl((ParameterSpecification)i.next()));
+        }
+    }
+
+
+    /**
+     * The name of the method to be invoked.
+     *
+     * @return the method name, overloaded methods are disambiguated by
+     * parameter specifications.
+     */
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+    /**
+     * The parameter specifications that determine which method to invoke
+     * (in the case of overloading) and what arguments to pass to it.
+     *
+     * @return an immutable List of ParameterSpecification, or an empty list if the
+     * method takes no arguments. The list is ordered by ascending parameter index.
+     * I.e., the first parameter is first in the list, and so on.
+     */
+    public List getParameterSpecifications() {
+        return parameterSpecifications;
+    }
+
+    public void addParameterSpecification(ParameterSpecification p) {
+        parameterSpecifications.add(p);
+    }
+
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/MethodInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,26 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.NullValue;
+
+
+public class NullValueImpl implements NullValue {
+    public NullValueImpl() {}
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/NullValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,88 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.ParameterSpecification;
+import org.osgi.service.blueprint.reflect.Value;
+
+
+public class ParameterSpecificationImpl implements ParameterSpecification {
+    private Value value;
+    private String typeName;
+    private int index;
+
+    public ParameterSpecificationImpl() {
+    }
+
+    public ParameterSpecificationImpl(ParameterSpecification source) {
+        value = MetadataUtil.cloneValue(source.getValue());
+        typeName = source.getTypeName();
+        index = source.getIndex();
+    }
+
+
+    /**
+     * The value to inject into the parameter.
+     *
+     * @return the parameter value
+     */
+    public Value getValue() {
+        return value;
+    }
+
+    public void setValue(Value value) {
+        this.value = value;
+    }
+
+
+    /**
+     * The type to convert the value into when invoking the constructor or
+     * factory method. If no explicit type was specified on the component
+     * definition then this method returns null.
+     *
+     * @return the explicitly specified type to convert the value into, or
+     * null if no type was specified in the component definition.
+     */
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+
+
+    /**
+     * The (zero-based) index into the parameter list of the method or
+     * constructor to be invoked for this parameter. This is determined
+     * either by explicitly specifying the index attribute in the component
+     * declaration, or by declaration order of constructor-arg elements if the
+     * index was not explicitly set.
+     *
+     * @return the zero-based parameter index
+     */
+    public int getIndex() {
+        return index;
+    }
+
+    public void setIndex(int index) {
+        this.index = index;
+    }
+
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ParameterSpecificationImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,40 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.Properties;
+
+import org.osgi.service.blueprint.reflect.PropertiesValue;
+
+
+public class PropertiesValueImpl implements PropertiesValue {
+    private Properties properties;
+
+    public PropertiesValueImpl(Properties properties) {
+        this.properties = properties;
+    }
+
+    public PropertiesValueImpl(PropertiesValue source) {
+        properties = new Properties(source.getPropertiesValue());
+    }
+
+    public Properties getPropertiesValue() {
+        return properties;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertiesValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,68 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.PropertyInjectionMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+
+public class PropertyInjectionMetadataImpl implements PropertyInjectionMetadata {
+    private String name;
+    private Value value;
+
+    public PropertyInjectionMetadataImpl() {
+    }
+
+    public PropertyInjectionMetadataImpl(String name, Value value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public PropertyInjectionMetadataImpl(PropertyInjectionMetadata source) {
+        name = source.getName();
+        value = MetadataUtil.cloneValue(source.getValue());
+    }
+
+    /**
+     * The name of the property to be injected, following JavaBeans conventions.
+     *
+     * @return the property name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * The value to inject the property with.
+     *
+     * @return the property value.
+     */
+    public Value getValue() {
+        return value;
+    }
+
+
+    public void setValue(Value value) {
+        this.value = value;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/PropertyInjectionMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,38 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.ReferenceNameValue;
+
+
+public class ReferenceNameValueImpl implements ReferenceNameValue {
+    private String referenceName;
+
+    public ReferenceNameValueImpl(String name) {
+        referenceName = name;
+    }
+
+    public ReferenceNameValueImpl(ReferenceNameValue source) {
+        referenceName = source.getReferenceName();
+    }
+
+    public String getReferenceName() {
+        return referenceName;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceNameValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,41 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.ReferenceValue;
+
+public class ReferenceValueImpl implements ReferenceValue {
+    private String componentName;
+
+    public ReferenceValueImpl(String name) {
+        componentName = name;
+    }
+
+    public ReferenceValueImpl(ReferenceValue source) {
+        componentName = source.getComponentName();
+    }
+
+
+    /**
+     * The name of the referenced component.
+     */
+    public String getComponentName() {
+        return componentName;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ReferenceValueImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,83 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.RegistrationListenerMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+public class RegistrationListenerMetadataImpl implements RegistrationListenerMetadata {
+    private Value listenerComponent;
+    private String registrationMethodName;
+    private String unregistrationMethodName;
+
+    public RegistrationListenerMetadataImpl() {
+    }
+
+    public RegistrationListenerMetadataImpl(RegistrationListenerMetadata source) {
+        listenerComponent = MetadataUtil.cloneValue(source.getListenerComponent());
+        registrationMethodName = source.getRegistrationMethodName();
+        unregistrationMethodName = source.getUnregistrationMethodName();
+    }
+
+
+    /**
+     * The component instance that will receive registration and unregistration
+     * events. The returned value must reference a component and therefore be
+     * either a ComponentValue, ReferenceValue, or ReferenceNameValue.
+     *
+     * @return the listener component reference.
+     */
+    public Value getListenerComponent() {
+        return listenerComponent;
+    }
+
+    public void setListenerComponent(Value v) {
+        listenerComponent = v;
+    }
+
+
+    /**
+     * The name of the method to invoke on the listener component when
+     * the exported service is registered with the service registry.
+     *
+     * @return the registration callback method name.
+     */
+    public String getRegistrationMethodName() {
+        return registrationMethodName;
+    }
+
+    public void setRegistrationMethodName(String name) {
+        registrationMethodName = name;
+    }
+
+
+    /**
+     * The name of the method to invoke on the listener component when
+     * the exported service is unregistered from the service registry.
+     *
+     * @return the unregistration callback method name.
+     */
+    public String getUnregistrationMethodName() {
+        return unregistrationMethodName;
+    }
+
+    public void setUnregistrationMethodName(String name) {
+        unregistrationMethodName = name;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/RegistrationListenerMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,155 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.osgi.service.blueprint.reflect.RegistrationListenerMetadata;
+import org.osgi.service.blueprint.reflect.ServiceExportComponentMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+
+public class ServiceExportComponentMetadataImpl extends ComponentMetadataImpl implements ServiceExportComponentMetadata {
+    private Map serviceProperties;
+    private Value exportedComponent;
+    private int ranking = 0;
+    private Set interfaceNames;
+    private Collection registrationListeners;
+    private int exportMode = EXPORT_MODE_DISABLED;
+
+
+    public ServiceExportComponentMetadataImpl() {
+        this((String)null);
+    }
+
+    public ServiceExportComponentMetadataImpl(String name) {
+        super(name);
+        // create a new one of these, even if empty
+        serviceProperties = new HashMap();
+        interfaceNames = new HashSet();
+        registrationListeners = new ArrayList();
+    }
+
+
+    public ServiceExportComponentMetadataImpl(ServiceExportComponentMetadata source) {
+        super(source);
+        serviceProperties = new HashMap(source.getServiceProperties());
+        exportedComponent = MetadataUtil.cloneValue(exportedComponent);
+        ranking = source.getRanking();
+        interfaceNames = new HashSet(source.getInterfaceNames());
+        Iterator i = source.getRegistrationListeners().iterator();
+        registrationListeners = new ArrayList();
+        while (i.hasNext()) {
+            registrationListeners.add(new RegistrationListenerMetadataImpl((RegistrationListenerMetadata)i.next()));
+        }
+        exportMode = source.getAutoExportMode();
+    }
+
+
+
+    /**
+     * The user declared properties to be advertised with the service.
+     *
+     * @return Map containing the set of user declared service properties (may be
+     * empty if no properties were specified).
+     */
+    public Map getServiceProperties() {
+        return serviceProperties;
+    }
+
+    public void setServiceProperties(Map p) {
+        serviceProperties = p;
+    }
+
+    /**
+     * The component that is to be exported as a service. Value must refer to a component and
+     * therefore be either a ComponentValue or ReferenceValue.
+     *
+     * @return the component to be exported as a service.
+     */
+    public Value getExportedComponent() {
+        return exportedComponent;
+    }
+
+    public void setExportedComponent(Value v) {
+        exportedComponent = v;
+    }
+
+    /**
+     * The ranking value to use when advertising the service
+     *
+     * @return service ranking
+     */
+    public int getRanking() {
+        return ranking;
+    }
+
+    public void setRanking(int ranking) {
+        this.ranking = ranking;
+    }
+
+    /**
+     * The type names of the set of interface types that the service should be advertised
+     * as supporting.
+     *
+     * @return an immutable set of (String) type names, or an empty set if using auto-export
+     */
+    public Set getInterfaceNames() {
+        return interfaceNames;
+    }
+
+    public void addInterfaceName(String name) {
+        interfaceNames.add(name);
+    }
+
+
+    /**
+     * The listeners that have registered to be notified when the exported service
+     * is registered and unregistered with the framework.
+     *
+     * @return an immutable collection of RegistrationListenerMetadata
+     */
+    public Collection getRegistrationListeners() {
+        return registrationListeners;
+    }
+
+    public void addRegistrationListener(RegistrationListenerMetadata l) {
+        registrationListeners.add(l);
+    }
+
+    /**
+     * Return the auto-export mode specified.
+     *
+     * @return One of EXPORT_MODE_DISABLED, EXPORT_MODE_INTERFACES, EXPORT_MODE_CLASS_HIERARCHY, EXPORT_MODE_ALL
+     */
+    public int getAutoExportMode() {
+        return exportMode;
+    }
+
+
+    public void setAutoExportMode(int mode) {
+        exportMode = mode;
+    }
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceExportComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,130 @@
+/**
+ *  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.geronimo.osgi.reflect;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.osgi.service.blueprint.reflect.BindingListenerMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceComponentMetadata;
+
+public class ServiceReferenceComponentMetadataImpl extends ComponentMetadataImpl implements ServiceReferenceComponentMetadata {
+    private Collection bindingListeners = new ArrayList();
+    private int serviceAvailability = MANDATORY_AVAILABILITY;
+    private Set interfaceNames = new HashSet();
+    private String filter;
+    private String componentName;
+
+
+    public ServiceReferenceComponentMetadataImpl() {
+        this((String)null);
+    }
+
+    public ServiceReferenceComponentMetadataImpl(String name) {
+        super(name);
+    }
+
+
+    public ServiceReferenceComponentMetadataImpl(ServiceReferenceComponentMetadata source) {
+        super(source);
+
+        Iterator i = source.getBindingListeners().iterator();
+        while (i.hasNext()) {
+            bindingListeners.add(new BindingListenerMetadataImpl((BindingListenerMetadata)i.next()));
+        }
+
+        interfaceNames.addAll(source.getInterfaceNames());
+        serviceAvailability = source.getServiceAvailabilitySpecification();
+        filter = source.getFilter();
+        componentName = source.getComponentName();
+    }
+
+
+    /**
+     * The set of listeners registered to receive bind and unbind events for
+     * backing services.
+     *
+     * @return an immutable collection of registered BindingListenerMetadata
+     */
+    public Collection getBindingListeners() {
+        return bindingListeners;
+    }
+
+    public void addBindingListener(BindingListenerMetadata listener) {
+        bindingListeners.add(listener);
+    }
+
+
+    /**
+     * Whether or not a matching service is required at all times.
+     *
+     * @return one of MANDATORY_AVAILABILITY or OPTIONAL_AVAILABILITY
+     */
+    public int getServiceAvailabilitySpecification() {
+        return serviceAvailability;
+    }
+
+    public void setServiceAvailabilitySpecification(int s) {
+        serviceAvailability = s;
+    }
+
+    /**
+     * The interface types that the matching service must support
+     *
+     * @return an immutable set of type names
+     */
+    public Set getInterfaceNames() {
+        return interfaceNames;
+    }
+
+    public void addInterfaceName(String name) {
+        interfaceNames.add(name);
+    }
+
+
+    /**
+     * The filter expression that a matching service must pass
+     *
+     * @return filter expression
+     */
+    public String getFilter() {
+        return filter;
+    }
+
+    public void setFilter(String filter) {
+        this.filter = filter;
+    }
+
+	/**
+	 * The value of the component name attribute, if specified.
+	 *
+	 * @return the component name attribute value, or null if the attribute was not specified
+	 */
+	public String getComponentName() {
+        return componentName;
+    }
+
+    public void setComponentName(String name) {
+        componentName = name;
+    }
+
+}
+

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/ServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message