geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r768357 - in /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint: mutable/ reflect/
Date Fri, 24 Apr 2009 16:40:48 GMT
Author: gnodet
Date: Fri Apr 24 16:40:47 2009
New Revision: 768357

URL: http://svn.apache.org/viewvc?rev=768357&view=rev
Log:
Add mutable apis for the metadata, this will be usefull to implement NamespaceHandlers

Added:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanArgument.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanProperty.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableIdRefMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableListener.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapEntry.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutablePropsMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefCollectionMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRegistrationListener.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java
Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanArgumentImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanPropertyImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/IdRefMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ListenerImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapEntryImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/PropsMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefCollectionMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RegistrationListenerImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ValueMetadataImpl.java

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanArgument.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanArgument.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanArgument.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanArgument.java Fri Apr 24 16:40:47 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.BeanArgument;
+import org.osgi.service.blueprint.reflect.Metadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableBeanArgument extends BeanArgument {
+
+    void setValue(Metadata value);
+
+    void setValueType(String valueType);
+
+    void setIndex(int index);
+
+}

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,67 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.BeanArgument;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.Target;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableBeanMetadata extends BeanMetadata, MutableComponentMetadata {
+
+    void setId(String id);
+
+    void setClassName(String className);
+
+    void setInitMethodName(String initMethodName);
+
+    void setDestroyMethodName(String destroyMethodName);
+
+    void addArgument(BeanArgument argument);
+
+    BeanArgument addArgument(Metadata value, String valueType, int index);
+
+    void removeArgument(BeanArgument argument);
+
+    void addProperty(BeanProperty property);
+
+    BeanProperty addProperty(String name, Metadata value);
+
+    void removeProperty(BeanProperty property);
+
+    void setLazyInit(boolean lazyInit);
+
+    void setFactoryMethodName(String factoryMethodName);
+
+    void setFactoryComponent(Target factoryComponent);
+
+    void setScope(String scope);
+
+    void addExplicitDependency(String dependency);
+
+    void removeExplicitDependency(String dependency);
+
+}

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanProperty.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanProperty.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanProperty.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableBeanProperty.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,36 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.Metadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableBeanProperty extends BeanProperty {
+
+    void setName(String name);
+
+    void setValue(Metadata value);
+
+}

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java Fri Apr 24 16:40:47 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.CollectionMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableCollectionMetadata extends CollectionMetadata {
+
+    void setCollectionClass(Class clazz);
+
+    void setValueTypeName(String valueTypeName);
+
+    void addValue(Metadata value);
+
+    void removeValue(Metadata value);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableComponentMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,33 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableComponentMetadata extends ComponentMetadata {
+
+    void setId(String id);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableIdRefMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableIdRefMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableIdRefMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableIdRefMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,33 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.IdRefMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableIdRefMetadata extends IdRefMetadata {
+
+    public void setComponentId(String componentId);
+
+}

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableListener.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableListener.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableListener.java Fri Apr 24 16:40:47 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.Listener;
+import org.osgi.service.blueprint.reflect.Target;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableListener extends Listener {
+
+    void setListenerComponent(Target listenerComponent);
+
+    void setBindMethodName(String bindMethodName);
+
+    void setUnbindMethodName(String unbindMethodName);
+
+}

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapEntry.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapEntry.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapEntry.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapEntry.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,37 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.MapEntry;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.NonNullMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableMapEntry extends MapEntry {
+
+    void setKey(NonNullMetadata key);
+
+    void setValue(Metadata value);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,44 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.MapEntry;
+import org.osgi.service.blueprint.reflect.MapMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.NonNullMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableMapMetadata extends MapMetadata {
+
+    void setKeyTypeName(String keyTypeName);
+
+    void setValueTypeName(String valueTypeName);
+
+    void addEntry(MapEntry entry);
+
+    MapEntry addEntry(NonNullMetadata key, Metadata value);
+
+    void removeEntry(MapEntry entry);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutablePropsMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutablePropsMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutablePropsMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutablePropsMetadata.java Fri Apr 24 16:40:47 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.MapEntry;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.NonNullMetadata;
+import org.osgi.service.blueprint.reflect.PropsMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutablePropsMetadata extends PropsMetadata {
+
+    void addEntry(MapEntry entry);
+
+    MapEntry addEntry(NonNullMetadata key, Metadata value);
+
+    void removeEntry(MapEntry entry);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefCollectionMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefCollectionMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefCollectionMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefCollectionMetadata.java Fri Apr 24 16:40:47 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.RefCollectionMetadata;
+import org.osgi.service.blueprint.reflect.Target;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableRefCollectionMetadata extends RefCollectionMetadata, MutableServiceReferenceMetadata {
+
+    void setCollectionType(Class collectionType);
+
+    void setComparator(Target comparator);
+
+    void setOrderingBasis(int orderingBasis);
+
+    void setMemberType(int memberType);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRefMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,33 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.RefMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableRefMetadata extends RefMetadata {
+
+    public void setComponentId(String componentId);
+
+}

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableReferenceMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,33 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableReferenceMetadata extends ReferenceMetadata, MutableServiceReferenceMetadata {
+
+    void setTimeout(long timeout);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRegistrationListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRegistrationListener.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRegistrationListener.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableRegistrationListener.java Fri Apr 24 16:40:47 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.RegistrationListener;
+import org.osgi.service.blueprint.reflect.Target;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableRegistrationListener extends RegistrationListener {
+
+    void setListenerComponent(Target listenerComponent);
+
+    void setRegistrationMethodName(String registrationMethodName);
+
+    void setUnregistrationMethodName(String unregistrationMethodName);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,66 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.MapEntry;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.NonNullMetadata;
+import org.osgi.service.blueprint.reflect.RegistrationListener;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+import org.osgi.service.blueprint.reflect.Target;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableServiceMetadata extends ServiceMetadata, MutableComponentMetadata {
+
+    void setId(String id);
+
+    void setServiceComponent(Target serviceComponent);
+
+    void addInterfaceName(String interfaceName);
+
+    void removeInterfaceName(String interfaceName);
+
+    void setAutoExportMode(int autoExportMode);
+
+    void addServiceProperty(MapEntry serviceProperty);
+
+    MapEntry addServiceProperty(NonNullMetadata key, Metadata value);
+
+    void removeServiceProperty(MapEntry serviceProperty);
+
+    void setRanking(int ranking);
+
+    void addRegistrationListener(RegistrationListener listener);
+
+    RegistrationListener addRegistrationListener(Target listenerComponent,
+                                                 String registrationMethodName,
+                                                 String unregistrationMethodName);
+
+    void removeRegistrationListener(RegistrationListener listener);
+
+    void addExplicitDependency(String dependency);
+
+    void removeExplicitDependency(String dependency);
+
+}
\ No newline at end of file

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,49 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.Listener;
+import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
+import org.osgi.service.blueprint.reflect.Target;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableServiceReferenceMetadata extends ServiceReferenceMetadata, MutableComponentMetadata {
+
+    void setAvailability(int availability);
+
+    void addInterfaceName(String interfaceName);
+
+    void removeInterfaceName(String interfaceName);
+
+    void setComponentName(String componentName);
+
+    void addServiceListener(Listener listener);
+
+    Listener addServiceListener(Target listenerComponent,
+                                String bindMethodName,
+                                String unbindMethodName);
+
+    void removeServiceListener(Listener listener);
+
+}

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java?rev=768357&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java (added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java Fri Apr 24 16:40:47 2009
@@ -0,0 +1,35 @@
+/**
+ * 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.blueprint.mutable;
+
+import org.osgi.service.blueprint.reflect.ValueMetadata;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
+ * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
+ */
+public interface MutableValueMetadata extends ValueMetadata {
+
+    void setStringValue(String stringValue);
+
+    void setTypeName(String typeName);
+
+}

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanArgumentImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanArgumentImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanArgumentImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanArgumentImpl.java Fri Apr 24 16:40:47 2009
@@ -20,6 +20,7 @@
 
 import org.osgi.service.blueprint.reflect.BeanArgument;
 import org.osgi.service.blueprint.reflect.Metadata;
+import org.apache.geronimo.blueprint.mutable.MutableBeanArgument;
 
 /**
  * Implementation of BeanArgument
@@ -27,7 +28,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class BeanArgumentImpl implements BeanArgument {
+public class BeanArgumentImpl implements MutableBeanArgument {
 
     private Metadata value;
     private String valueType;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -26,6 +26,8 @@
 import org.osgi.service.blueprint.reflect.BeanMetadata;
 import org.osgi.service.blueprint.reflect.BeanProperty;
 import org.osgi.service.blueprint.reflect.Target;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.apache.geronimo.blueprint.mutable.MutableBeanMetadata;
 
 /**
  * Implementation of BeanMetadata
@@ -33,7 +35,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class BeanMetadataImpl extends ComponentMetadataImpl implements BeanMetadata {
+public class BeanMetadataImpl extends ComponentMetadataImpl implements MutableBeanMetadata {
 
     private String className;
     private String initMethodName;
@@ -120,6 +122,18 @@
         this.arguments.add(argument);
     }
 
+    public BeanArgument addArgument(Metadata value, String valueType, int index) {
+        BeanArgument arg = new BeanArgumentImpl(value, valueType, index);
+        addArgument(arg);
+        return arg;
+    }
+
+    public void removeArgument(BeanArgument argument) {
+        if (this.arguments != null) {
+            this.arguments.remove(argument);
+        }
+    }
+
     public List<BeanProperty> getProperties() {
         if (this.properties == null) {
             return Collections.emptyList();
@@ -139,6 +153,18 @@
         this.properties.add(property);
     }
 
+    public BeanProperty addProperty(String name, Metadata value) {
+        BeanProperty prop = new BeanPropertyImpl(name, value);
+        addProperty(prop);
+        return prop;
+    }
+
+    public void removeProperty(BeanProperty property) {
+        if (this.properties != null) {
+            this.properties.remove(property);
+        }
+    }
+
     public boolean isLazyInit() {
         return this.lazyInit;
     }
@@ -198,6 +224,12 @@
         this.explicitDependencies.add(explicitDependency);
     }
 
+    public void removeExplicitDependency(String dependency) {
+        if (this.explicitDependencies != null) {
+            this.explicitDependencies.remove(dependency);
+        }
+    }
+
     @Override
     public String toString() {
         return "BeanMetadata[" +

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanPropertyImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanPropertyImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanPropertyImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanPropertyImpl.java Fri Apr 24 16:40:47 2009
@@ -18,9 +18,9 @@
  */
 package org.apache.geronimo.blueprint.reflect;
 
-import org.osgi.service.blueprint.reflect.BeanArgument;
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.apache.geronimo.blueprint.mutable.MutableBeanProperty;
 
 /**
  * Implementation of BeanProperty
@@ -28,7 +28,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class BeanPropertyImpl implements BeanProperty {
+public class BeanPropertyImpl implements MutableBeanProperty {
 
     private String name;
     private Metadata value;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -19,12 +19,12 @@
 package org.apache.geronimo.blueprint.reflect;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Collections;
 
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.CollectionMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableCollectionMetadata;
 
 /**
  * Implementation of CollectionMetadata
@@ -32,7 +32,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class CollectionMetadataImpl implements CollectionMetadata {
+public class CollectionMetadataImpl implements MutableCollectionMetadata {
 
     private Class collectionClass;
     private String valueTypeName;
@@ -90,6 +90,12 @@
         this.values.add(value);
     }
 
+    public void removeValue(Metadata value) {
+        if (this.values != null) {
+            this.values.remove(value);
+        }
+    }
+
     @Override
     public String toString() {
         return "CollectionMetadata[" +

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ComponentMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -19,6 +19,7 @@
 package org.apache.geronimo.blueprint.reflect;
 
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableComponentMetadata;
 
 /**
  * Implementation of ComponentMetadata
@@ -26,7 +27,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class ComponentMetadataImpl implements ComponentMetadata {
+public class ComponentMetadataImpl implements MutableComponentMetadata {
 
     protected String id;
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/IdRefMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/IdRefMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/IdRefMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/IdRefMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -19,6 +19,7 @@
 package org.apache.geronimo.blueprint.reflect;
 
 import org.osgi.service.blueprint.reflect.IdRefMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableIdRefMetadata;
 
 /**
  * Implementation of IdRefMetadata
@@ -26,7 +27,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class IdRefMetadataImpl implements IdRefMetadata {
+public class IdRefMetadataImpl implements MutableIdRefMetadata {
 
     protected String componentId;
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ListenerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ListenerImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ListenerImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ListenerImpl.java Fri Apr 24 16:40:47 2009
@@ -20,6 +20,7 @@
 
 import org.osgi.service.blueprint.reflect.Listener;
 import org.osgi.service.blueprint.reflect.Target;
+import org.apache.geronimo.blueprint.mutable.MutableListener;
 
 /**
  * Implementation of Listener
@@ -27,7 +28,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class ListenerImpl implements Listener {
+public class ListenerImpl implements MutableListener {
 
     private Target listenerComponent;
     private String bindMethodName;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapEntryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapEntryImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapEntryImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapEntryImpl.java Fri Apr 24 16:40:47 2009
@@ -21,6 +21,7 @@
 import org.osgi.service.blueprint.reflect.MapEntry;
 import org.osgi.service.blueprint.reflect.NonNullMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
+import org.apache.geronimo.blueprint.mutable.MutableMapEntry;
 
 /**
  * Implementation of MapEntry
@@ -28,7 +29,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class MapEntryImpl implements MapEntry {
+public class MapEntryImpl implements MutableMapEntry {
 
     private NonNullMetadata key;
     private Metadata value;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -18,17 +18,15 @@
  */
 package org.apache.geronimo.blueprint.reflect;
 
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Map.Entry;
 
 import org.osgi.service.blueprint.reflect.MapMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.MapEntry;
+import org.osgi.service.blueprint.reflect.NonNullMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableMapMetadata;
 
 /**
  * Implementation of MapMetadata
@@ -36,7 +34,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class MapMetadataImpl implements MapMetadata {
+public class MapMetadataImpl implements MutableMapMetadata {
 
     private String keyTypeName;
     private String valueTypeName;
@@ -94,6 +92,18 @@
         this.entries.add(entry);
     }
 
+    public MapEntry addEntry(NonNullMetadata key, Metadata value) {
+        MapEntry entry = new MapEntryImpl(key, value);
+        addEntry(entry);
+        return entry;
+    }
+
+    public void removeEntry(MapEntry entry) {
+        if (this.entries != null) {
+            this.entries.remove(entry);
+        }
+    }
+
     @Override
     public String toString() {
         return "MapMetadata[" +

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MetadataUtil.java Fri Apr 24 16:40:47 2009
@@ -104,5 +104,37 @@
         return (Target) cloneMetadata(source);
     }
 
+    /**
+     * Create a new metadata instance of the given type
+     *
+     * @param type the class of the Metadata object to create
+     * @param <T>
+     * @return a new instance
+     */
+    public static <T extends Metadata> T createMetadata(Class<T> type) {
+        if (MapMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new MapMetadataImpl());
+        } else if (NullMetadata.class.isAssignableFrom(type)) {
+            return type.cast(NullMetadata.NULL);
+        } else if (PropsMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new PropsMetadataImpl());
+        } else if (RefMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new RefMetadataImpl());
+        } else if (IdRefMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new IdRefMetadataImpl());
+        } else if (ValueMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new ValueMetadataImpl());
+        } else if (BeanMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new BeanMetadataImpl());
+        } else if (RefCollectionMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new RefCollectionMetadataImpl());
+        } else if (ServiceMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new ServiceMetadataImpl());
+        } else if (ReferenceMetadata.class.isAssignableFrom(type)) {
+            return type.cast(new ReferenceMetadataImpl());
+        } else {
+            throw new IllegalArgumentException("Unsupport metadata type: " + (type != null ? type.getName() : null));
+        }
+    }
 }
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/PropsMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/PropsMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/PropsMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/PropsMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -18,14 +18,15 @@
  */
 package org.apache.geronimo.blueprint.reflect;
 
-import java.util.Properties;
 import java.util.List;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.Collections;
 
 import org.osgi.service.blueprint.reflect.PropsMetadata;
 import org.osgi.service.blueprint.reflect.MapEntry;
+import org.osgi.service.blueprint.reflect.NonNullMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.apache.geronimo.blueprint.mutable.MutablePropsMetadata;
 
 /**
  * Implementation of PropsMetadata
@@ -33,7 +34,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class PropsMetadataImpl implements PropsMetadata {
+public class PropsMetadataImpl implements MutablePropsMetadata {
 
     private List<MapEntry> entries;
 
@@ -69,6 +70,18 @@
         this.entries.add(entry);
     }
 
+    public MapEntry addEntry(NonNullMetadata key, Metadata value) {
+        MapEntry entry = new MapEntryImpl(key, value);
+        addEntry(entry);
+        return entry;
+    }
+
+    public void removeEntry(MapEntry entry) {
+        if (this.entries != null) {
+            this.entries.remove(entry);
+        }
+    }
+
     @Override
     public String toString() {
         return "PropsMetadata[" +

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefCollectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefCollectionMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefCollectionMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefCollectionMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -20,6 +20,7 @@
 
 import org.osgi.service.blueprint.reflect.RefCollectionMetadata;
 import org.osgi.service.blueprint.reflect.Target;
+import org.apache.geronimo.blueprint.mutable.MutableRefCollectionMetadata;
 
 /**
  * Implementation of RefCollectionMetadata 
@@ -27,7 +28,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class RefCollectionMetadataImpl extends ServiceReferenceMetadataImpl implements RefCollectionMetadata {
+public class RefCollectionMetadataImpl extends ServiceReferenceMetadataImpl implements MutableRefCollectionMetadata {
 
     private Class collectionType;
     private Target comparator;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -19,6 +19,7 @@
 package org.apache.geronimo.blueprint.reflect;
 
 import org.osgi.service.blueprint.reflect.RefMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableRefMetadata;
 
 /**
  * Implementation of RefMetadata
@@ -26,7 +27,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class RefMetadataImpl extends IdRefMetadataImpl implements RefMetadata {
+public class RefMetadataImpl extends IdRefMetadataImpl implements MutableRefMetadata {
 
     public RefMetadataImpl() {
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -19,6 +19,7 @@
 package org.apache.geronimo.blueprint.reflect;
 
 import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableReferenceMetadata;
 
 /**
  * Implementation of ReferenceMetadata
@@ -26,7 +27,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class ReferenceMetadataImpl extends ServiceReferenceMetadataImpl implements ReferenceMetadata {
+public class ReferenceMetadataImpl extends ServiceReferenceMetadataImpl implements MutableReferenceMetadata {
 
     private long timeout;
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RegistrationListenerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RegistrationListenerImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RegistrationListenerImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RegistrationListenerImpl.java Fri Apr 24 16:40:47 2009
@@ -20,6 +20,7 @@
 
 import org.osgi.service.blueprint.reflect.RegistrationListener;
 import org.osgi.service.blueprint.reflect.Target;
+import org.apache.geronimo.blueprint.mutable.MutableRegistrationListener;
 
 /**
  * Implementation of RegistrationListener.
@@ -27,7 +28,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class RegistrationListenerImpl implements RegistrationListener {
+public class RegistrationListenerImpl implements MutableRegistrationListener {
 
     private Target listenerComponent;
     private String registrationMethodName;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -20,9 +20,6 @@
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Set;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -30,6 +27,9 @@
 import org.osgi.service.blueprint.reflect.ServiceMetadata;
 import org.osgi.service.blueprint.reflect.MapEntry;
 import org.osgi.service.blueprint.reflect.Target;
+import org.osgi.service.blueprint.reflect.NonNullMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.apache.geronimo.blueprint.mutable.MutableServiceMetadata;
 
 /**
  * Implementation of ServiceMetadata
@@ -37,7 +37,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class ServiceMetadataImpl extends ComponentMetadataImpl implements ServiceMetadata {
+public class ServiceMetadataImpl extends ComponentMetadataImpl implements MutableServiceMetadata {
 
     private Target exportedComponent;
     private List<String> interfaceNames;
@@ -69,7 +69,7 @@
         return exportedComponent;
     }
 
-    public void setExportedComponent(Target exportedComponent) {
+    public void setServiceComponent(Target exportedComponent) {
         this.exportedComponent = exportedComponent;
     }
 
@@ -92,6 +92,12 @@
         this.interfaceNames.add(interfaceName);
     }
 
+    public void removeInterfaceName(String interfaceName) {
+        if (this.interfaceNames != null) {
+            this.interfaceNames.remove(interfaceName);
+        }
+    }
+
     public int getAutoExportMode() {
         return this.autoExportMode;
     }
@@ -118,7 +124,19 @@
         }
         this.serviceProperties.add(serviceProperty);
     }
-    
+
+    public MapEntry addServiceProperty(NonNullMetadata key, Metadata value) {
+        MapEntry serviceProperty = new MapEntryImpl(key, value);
+        addServiceProperty(serviceProperty);
+        return serviceProperty;
+    }
+
+    public void removeServiceProperty(MapEntry serviceProperty) {
+        if (this.serviceProperties != null) {
+            this.serviceProperties.remove(serviceProperty);
+        }
+    }
+
     public int getRanking() {
         return ranking;
     }
@@ -146,6 +164,18 @@
         this.registrationListeners.add(registrationListenerMetadata);
     }
 
+    public RegistrationListener addRegistrationListener(Target listenerComponent, String registrationMethodName, String unregistrationMethodName) {
+        RegistrationListener listener = new RegistrationListenerImpl(listenerComponent, registrationMethodName,  unregistrationMethodName);
+        addRegistrationListener(listener);
+        return listener;
+    }
+
+    public void removeRegistrationListener(RegistrationListener listener) {
+        if (this.registrationListeners != null) {
+            this.registrationListeners.remove(listener);
+        }
+    }
+
     public List<String> getExplicitDependencies() {
         return this.explicitDependencies;
     }
@@ -161,6 +191,12 @@
         this.explicitDependencies.add(explicitDependency);
     }
 
+    public void removeExplicitDependency(String dependency) {
+        if (this.explicitDependencies != null) {
+            this.explicitDependencies.remove(dependency);
+        }
+    }
+
     @Override
     public String toString() {
         return "ServiceMetadata[" +

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -25,6 +25,8 @@
 
 import org.osgi.service.blueprint.reflect.Listener;
 import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
+import org.osgi.service.blueprint.reflect.Target;
+import org.apache.geronimo.blueprint.mutable.MutableServiceReferenceMetadata;
 
 /**
  * Implementation of ServiceReferenceMetadata 
@@ -32,7 +34,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public abstract class ServiceReferenceMetadataImpl extends ComponentMetadataImpl implements ServiceReferenceMetadata {
+public abstract class ServiceReferenceMetadataImpl extends ComponentMetadataImpl implements MutableServiceReferenceMetadata {
 
     protected int availability;
     protected List<String> interfaceNames;
@@ -77,6 +79,12 @@
         this.interfaceNames.add(interfaceName);
     }
 
+    public void removeInterfaceName(String interfaceName) {
+        if (this.interfaceNames != null) {
+            this.interfaceNames.remove(interfaceName);
+        }
+    }
+
     public String getComponentName() {
         return componentName;
     }
@@ -112,4 +120,15 @@
         this.serviceListeners.add(bindingListenerMetadata);
     }
 
+    public Listener addServiceListener(Target listenerComponent, String bindMethodName, String unbindMethodName) {
+        Listener listener = new ListenerImpl(listenerComponent, bindMethodName, unbindMethodName);
+        addServiceListener(listener);
+        return listener;
+    }
+
+    public void removeServiceListener(Listener listener) {
+        if (this.serviceListeners != null) {
+            this.serviceListeners.remove(listener);
+        }
+    }
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ValueMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ValueMetadataImpl.java?rev=768357&r1=768356&r2=768357&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ValueMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ValueMetadataImpl.java Fri Apr 24 16:40:47 2009
@@ -19,6 +19,7 @@
 package org.apache.geronimo.blueprint.reflect;
 
 import org.osgi.service.blueprint.reflect.ValueMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableValueMetadata;
 
 /**
  * Implementation of ValueMetadata 
@@ -26,7 +27,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
  */
-public class ValueMetadataImpl implements ValueMetadata {
+public class ValueMetadataImpl implements MutableValueMetadata {
 
     private String stringValue;
     private String typeName;



Mime
View raw message