You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2009/04/13 20:49:24 UTC
svn commit: r764556 [3/5] - in /geronimo/sandbox/gnodet/blueprint: ./
itests/ itests/src/ itests/src/test/ itests/src/test/java/
itests/src/test/java/org/ itests/src/test/java/org/apache/
itests/src/test/java/org/apache/felix/ itests/src/test/java/org/...
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/LocalComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/LocalComponentMetadataImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/LocalComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/LocalComponentMetadataImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,148 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Set;
+import java.util.HashSet;
+
+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.PropertyInjectionMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+import org.osgi.service.blueprint.reflect.ParameterSpecification;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class LocalComponentMetadataImpl extends ComponentMetadataImpl implements LocalComponentMetadata {
+
+ private String className;
+ private String scope;
+ private boolean isLazy;
+ private String initMethodName;
+ private String destroyMethodName;
+ private ConstructorInjectionMetadataImpl constructorInjectionMetadata;
+ private Collection<PropertyInjectionMetadata> propertyInjectionMetadata;
+ private Collection<MethodInjectionMetadata> methodInjectionMetadata;
+ private MethodInjectionMetadata factoryMethodMetadata;
+ private Value factoryComponent;
+
+ public LocalComponentMetadataImpl() {
+ constructorInjectionMetadata = new ConstructorInjectionMetadataImpl();
+ propertyInjectionMetadata = new ArrayList<PropertyInjectionMetadata>();
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public void setDependsOn(String dependsOn) {
+ Set<String> set = new HashSet<String>();
+ for (String dep : dependsOn.split(",")) {
+ dep = dep.trim();
+ if (dep.length() > 0) {
+ set.add(dep);
+ }
+ }
+ setExplicitDependencies(set);
+ }
+
+ public String getInitMethodName() {
+ return initMethodName;
+ }
+
+ public void setInitMethodName(String initMethodName) {
+ this.initMethodName = initMethodName;
+ }
+
+ public String getDestroyMethodName() {
+ return destroyMethodName;
+ }
+
+ public void setDestroyMethodName(String destroyMethodName) {
+ this.destroyMethodName = destroyMethodName;
+ }
+
+ public ConstructorInjectionMetadata getConstructorInjectionMetadata() {
+ return constructorInjectionMetadata;
+ }
+
+ public Collection<PropertyInjectionMetadata> getPropertyInjectionMetadata() {
+ return Collections.unmodifiableCollection(propertyInjectionMetadata);
+ }
+
+ public Collection<MethodInjectionMetadata> getMethodInjectionMetadata() {
+ return Collections.unmodifiableCollection(methodInjectionMetadata);
+ }
+
+ public void setMethodInjectionMetadata(Collection<MethodInjectionMetadata> methodInjectionMetadata) {
+ this.methodInjectionMetadata = methodInjectionMetadata;
+ }
+
+ public boolean isLazy() {
+ return isLazy;
+ }
+
+ public void setLazy(boolean lazy) {
+ isLazy = lazy;
+ }
+
+ public MethodInjectionMetadata getFactoryMethodMetadata() {
+ return factoryMethodMetadata;
+ }
+
+ public void setFactoryMethodMetadata(MethodInjectionMetadata factoryMethodMetadata) {
+ this.factoryMethodMetadata = factoryMethodMetadata;
+ }
+
+ public Value getFactoryComponent() {
+ return factoryComponent;
+ }
+
+ public void setFactoryComponent(Value factoryComponent) {
+ this.factoryComponent = factoryComponent;
+ }
+
+ public String getScope() {
+ return scope;
+ }
+
+ public void setScope(String scope) {
+ this.scope = scope;
+ }
+
+ public void addConsuctorArg(ParameterSpecification parameterSpecification) {
+ constructorInjectionMetadata.addParameterSpecification(parameterSpecification);
+ }
+
+ public void addProperty(PropertyInjectionMetadataImpl propertyInjectionMetadata) {
+ this.propertyInjectionMetadata.add(propertyInjectionMetadata);
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MapValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MapValueImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MapValueImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MapValueImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,69 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import java.util.Map;
+
+import org.osgi.service.blueprint.reflect.MapValue;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class MapValueImpl implements MapValue {
+
+ private String keyType;
+ private String valueType;
+ private Map<Object, Object> map;
+
+ public MapValueImpl() {
+ }
+
+ public MapValueImpl(String keyType, String valueType, Map<Object, Object> map) {
+ this.keyType = keyType;
+ this.valueType = valueType;
+ this.map = map;
+ }
+
+ public String getKeyType() {
+ return keyType;
+ }
+
+ public void setKeyType(String keyType) {
+ this.keyType = keyType;
+ }
+
+ public String getValueType() {
+ return valueType;
+ }
+
+ public void setValueType(String valueType) {
+ this.valueType = valueType;
+ }
+
+ public Map<Object, Object> getMap() {
+ return map;
+ }
+
+ public void setMap(Map<Object, Object> map) {
+ this.map = map;
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MethodInjectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MethodInjectionMetadataImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MethodInjectionMetadataImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/MethodInjectionMetadataImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,61 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.osgi.service.blueprint.reflect.MethodInjectionMetadata;
+import org.osgi.service.blueprint.reflect.ParameterSpecification;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class MethodInjectionMetadataImpl implements MethodInjectionMetadata {
+
+ private String name;
+ private List<ParameterSpecification> parameterSpecifications;
+
+ public MethodInjectionMetadataImpl() {
+ }
+
+ public MethodInjectionMetadataImpl(String name, List<ParameterSpecification> parameterSpecifications) {
+ this.name = name;
+ this.parameterSpecifications = parameterSpecifications;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public List<ParameterSpecification> getParameterSpecifications() {
+ return Collections.unmodifiableList(parameterSpecifications);
+ }
+
+ public void setParameterSpecifications(List<ParameterSpecification> parameterSpecifications) {
+ this.parameterSpecifications = parameterSpecifications;
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ParameterSpecificationImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,69 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import org.osgi.service.blueprint.reflect.ParameterSpecification;
+import org.osgi.service.blueprint.reflect.Value;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class ParameterSpecificationImpl implements ParameterSpecification {
+
+ private Value value;
+ private String typeName;
+ private int index;
+
+ public ParameterSpecificationImpl() {
+ }
+
+ public ParameterSpecificationImpl(Value value, String typeName, int index) {
+ this.value = value;
+ this.typeName = typeName;
+ this.index = index;
+ }
+
+ public Value getValue() {
+ return value;
+ }
+
+ public void setValue(Value value) {
+ this.value = value;
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertiesValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertiesValueImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertiesValueImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertiesValueImpl.java Mon Apr 13 18:49:20 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.felix.blueprint.reflect;
+
+import java.util.Properties;
+
+import org.osgi.service.blueprint.reflect.PropertiesValue;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class PropertiesValueImpl implements PropertiesValue {
+
+ private Properties propertiesValue;
+
+ public PropertiesValueImpl() {
+ }
+
+ public PropertiesValueImpl(Properties propertiesValue) {
+ this.propertiesValue = propertiesValue;
+ }
+
+ public Properties getPropertiesValue() {
+ return propertiesValue;
+ }
+
+ public void setPropertiesValue(Properties propertiesValue) {
+ this.propertiesValue = propertiesValue;
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertyInjectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertyInjectionMetadataImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertyInjectionMetadataImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/PropertyInjectionMetadataImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,59 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import org.osgi.service.blueprint.reflect.PropertyInjectionMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+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 String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Value getValue() {
+ return value;
+ }
+
+ public void setValue(Value value) {
+ this.value = value;
+ }
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceNameValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceNameValueImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceNameValueImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceNameValueImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,47 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import org.osgi.service.blueprint.reflect.ReferenceNameValue;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class ReferenceNameValueImpl implements ReferenceNameValue {
+
+ private String referenceName;
+
+ public ReferenceNameValueImpl() {
+ }
+
+ public ReferenceNameValueImpl(String referenceName) {
+ this.referenceName = referenceName;
+ }
+
+ public String getReferenceName() {
+ return referenceName;
+ }
+
+ public void setReferenceName(String referenceName) {
+ this.referenceName = referenceName;
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceValueImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceValueImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ReferenceValueImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,48 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import org.osgi.service.blueprint.reflect.ReferenceValue;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class ReferenceValueImpl implements ReferenceValue {
+
+ private String componentName;
+
+ public ReferenceValueImpl() {
+ }
+
+ public ReferenceValueImpl(String componentName) {
+ this.componentName = componentName;
+ }
+
+ public String getComponentName() {
+ return componentName;
+ }
+
+ public void setComponentName(String componentName) {
+ this.componentName = componentName;
+ }
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/RegistrationListenerMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/RegistrationListenerMetadataImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/RegistrationListenerMetadataImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/RegistrationListenerMetadataImpl.java Mon Apr 13 18:49:20 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.felix.blueprint.reflect;
+
+import org.osgi.service.blueprint.reflect.RegistrationListenerMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class RegistrationListenerMetadataImpl implements RegistrationListenerMetadata {
+
+ private Value listenerComponent;
+ private String registrationMethodName;
+ private String unregistrationMethodName;
+
+ public RegistrationListenerMetadataImpl() {
+ }
+
+ public RegistrationListenerMetadataImpl(Value listenerComponent, String registrationMethodName, String unregistrationMethodName) {
+ this.listenerComponent = listenerComponent;
+ this.registrationMethodName = registrationMethodName;
+ this.unregistrationMethodName = unregistrationMethodName;
+ }
+
+ public Value getListenerComponent() {
+ return listenerComponent;
+ }
+
+ public void setListenerComponent(Value listenerComponent) {
+ this.listenerComponent = listenerComponent;
+ }
+
+ public String getRegistrationMethodName() {
+ return registrationMethodName;
+ }
+
+ public void setRegistrationMethodName(String registrationMethodName) {
+ this.registrationMethodName = registrationMethodName;
+ }
+
+ public String getUnregistrationMethodName() {
+ return unregistrationMethodName;
+ }
+
+ public void setUnregistrationMethodName(String unregistrationMethodName) {
+ this.unregistrationMethodName = unregistrationMethodName;
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceExportComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceExportComponentMetadataImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceExportComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceExportComponentMetadataImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,119 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+import java.util.ArrayList;
+
+import org.osgi.service.blueprint.reflect.RegistrationListenerMetadata;
+import org.osgi.service.blueprint.reflect.ServiceExportComponentMetadata;
+import org.osgi.service.blueprint.reflect.Value;
+import org.osgi.service.blueprint.reflect.MapValue;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class ServiceExportComponentMetadataImpl extends ComponentMetadataImpl implements ServiceExportComponentMetadata {
+
+ private Value exportedComponent;
+ private Set<String> interfaceNames;
+ private int autoExportMode;
+ private Map serviceProperties;
+ private MapValue servicePropertiesValue;
+ private int ranking;
+ private Collection<RegistrationListenerMetadata> registrationListeners;
+ private String dependsOn;
+
+ public Value getExportedComponent() {
+ return exportedComponent;
+ }
+
+ public void setExportedComponent(Value exportedComponent) {
+ this.exportedComponent = exportedComponent;
+ }
+
+ public Set<String> getInterfaceNames() {
+ return Collections.unmodifiableSet(interfaceNames);
+ }
+
+ public void setInterfaceNames(Set<String> interfaceNames) {
+ this.interfaceNames = interfaceNames;
+ }
+
+ public int getAutoExportMode() {
+ return autoExportMode;
+ }
+
+ public void setAutoExportMode(int autoExportMode) {
+ this.autoExportMode = autoExportMode;
+ }
+
+ public String getDependsOn() {
+ return dependsOn;
+ }
+
+ public void setDependsOn(String dependsOn) {
+ this.dependsOn = dependsOn;
+ }
+
+ public Map getServiceProperties() {
+ return serviceProperties;
+ }
+
+ public void setServiceProperties(Map serviceProperties) {
+ this.serviceProperties = serviceProperties;
+ }
+
+ public MapValue getServicePropertiesValue() {
+ return servicePropertiesValue;
+ }
+
+ public void setServicePropertiesValue(MapValue servicePropertiesValue) {
+ this.servicePropertiesValue = servicePropertiesValue;
+ }
+
+ public int getRanking() {
+ return ranking;
+ }
+
+ public void setRanking(int ranking) {
+ this.ranking = ranking;
+ }
+
+ public Collection<RegistrationListenerMetadata> getRegistrationListeners() {
+ return Collections.unmodifiableCollection(registrationListeners);
+ }
+
+ public void setRegistrationListeners(Collection<RegistrationListenerMetadata> registrationListeners) {
+ this.registrationListeners = registrationListeners;
+ }
+
+ public void addRegistrationListener(RegistrationListenerMetadata registrationListenerMetadata) {
+ if (this.registrationListeners == null) {
+ this.registrationListeners = new ArrayList<RegistrationListenerMetadata>();
+ }
+ this.registrationListeners.add(registrationListenerMetadata);
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,86 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+import java.util.ArrayList;
+
+import org.osgi.service.blueprint.reflect.BindingListenerMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceComponentMetadata;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class ServiceReferenceComponentMetadataImpl extends ComponentMetadataImpl implements ServiceReferenceComponentMetadata {
+
+ private int serviceAvailabilitySpecification;
+ private Set<String> interfaceNames;
+ private String componentName;
+ private String filter;
+ private Collection<BindingListenerMetadata> bindingListeners;
+
+ public ServiceReferenceComponentMetadataImpl() {
+ bindingListeners = new ArrayList<BindingListenerMetadata>();
+ }
+
+ public int getServiceAvailabilitySpecification() {
+ return serviceAvailabilitySpecification;
+ }
+
+ public void setServiceAvailabilitySpecification(int serviceAvailabilitySpecification) {
+ this.serviceAvailabilitySpecification = serviceAvailabilitySpecification;
+ }
+
+ public Set<String> getInterfaceNames() {
+ return interfaceNames;
+ }
+
+ public void setInterfaceNames(Set<String> interfaceNames) {
+ this.interfaceNames = interfaceNames;
+ }
+
+ public String getComponentName() {
+ return componentName;
+ }
+
+ public void setComponentName(String componentName) {
+ this.componentName = componentName;
+ }
+
+ public String getFilter() {
+ return filter;
+ }
+
+ public void setFilter(String filter) {
+ this.filter = filter;
+ }
+
+ public Collection<BindingListenerMetadata> getBindingListeners() {
+ return Collections.unmodifiableCollection(bindingListeners);
+ }
+
+ public void addBindingListener(BindingListenerMetadata bindingListenerMetadata) {
+ bindingListeners.add(bindingListenerMetadata);
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/SetValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/SetValueImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/SetValueImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/SetValueImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,60 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import java.util.Set;
+
+import org.osgi.service.blueprint.reflect.SetValue;
+import org.osgi.service.blueprint.reflect.Value;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class SetValueImpl implements SetValue {
+
+ private String valueType;
+ private Set<Value> set;
+
+ public SetValueImpl() {
+ }
+
+ public SetValueImpl(String valueType, Set<Value> set) {
+ this.valueType = valueType;
+ this.set = set;
+ }
+
+ public String getValueType() {
+ return valueType;
+ }
+
+ public void setValueType(String valueType) {
+ this.valueType = valueType;
+ }
+
+ public Set<Value> getSet() {
+ return set;
+ }
+
+ public void setSet(Set<Value> set) {
+ this.set = set;
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/TypedStringValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/TypedStringValueImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/TypedStringValueImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/TypedStringValueImpl.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,61 @@
+/*
+ * 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.felix.blueprint.reflect;
+
+import org.osgi.service.blueprint.reflect.TypedStringValue;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class TypedStringValueImpl implements TypedStringValue {
+
+ private String stringValue;
+ private String typeName;
+
+ public TypedStringValueImpl() {
+ }
+
+ public TypedStringValueImpl(String stringValue) {
+ this.stringValue = stringValue;
+ }
+
+ public TypedStringValueImpl(String stringValue, String typeName) {
+ this.stringValue = stringValue;
+ this.typeName = typeName;
+ }
+
+ public String getStringValue() {
+ return stringValue;
+ }
+
+ public void setStringValue(String stringValue) {
+ this.stringValue = stringValue;
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/UnaryServiceReferenceComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/UnaryServiceReferenceComponentMetadataImpl.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/UnaryServiceReferenceComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/apache/felix/blueprint/reflect/UnaryServiceReferenceComponentMetadataImpl.java Mon Apr 13 18:49:20 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.felix.blueprint.reflect;
+
+import org.osgi.service.blueprint.reflect.UnaryServiceReferenceComponentMetadata;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Apache Felix Project</a>
+ * @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
+ */
+public class UnaryServiceReferenceComponentMetadataImpl extends ServiceReferenceComponentMetadataImpl implements UnaryServiceReferenceComponentMetadata {
+
+ private long timeout;
+
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ComponentDefinitionException.java Mon Apr 13 18:49:20 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.osgi.service.blueprint.context;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:32:10 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ComponentDefinitionException extends RuntimeException {
+
+ public ComponentDefinitionException(String explanation) {
+ super(explanation);
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContext.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContext.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContext.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,127 @@
+/*
+ * 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.osgi.service.blueprint.context;
+
+import java.util.Set;
+import java.util.Collection;
+
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.LocalComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceExportComponentMetadata;
+import org.osgi.framework.BundleContext;
+
+/**
+ * ModuleContext providing access to the components, service exports, and
+ * service references of a module. Only bundles in the ACTIVE state may
+ * have an associated ModuleContext. A given BundleContext has at most one associated
+ * ModuleContext.
+ * <p/>
+ * An instance of ModuleContext may be obtained from within a module context
+ * by implementing the ModuleContextAware interface on a component class.
+ * Alternatively you can look up ModuleContext services in the service registry.
+ * <p/>
+ * The Constants.BUNDLE_SYMBOLICNAME and Constants.BUNDLE_VERSION service
+ * properties can be used to determine which bundle the published ModuleContext
+ * service is associated with.
+ *
+ * @see org.osgi.framework.Constants
+ */
+public interface ModuleContext {
+
+ static int CONFIGURATION_ADMIN_OBJECT_DELETED = 1;
+
+ static int BUNDLE_STOPPING = 2;
+
+ /**
+ * The names of all the named components within the module context.
+ *
+ * @return an immutable set (of Strings) containing the names of all of the
+ * components within the module.
+ */
+ Set getComponentNames();
+
+ /**
+ * Get the component instance for a given named component. If the component has
+ * not yet been instantiated, calling this operation will cause the component instance
+ * to be created and initialized. If the component
+ * has a prototype scope then each call to getComponent will return a new
+ * component instance. If the component has a bundle scope then the component
+ * instance returned will be the instance for the caller's bundle (and that
+ * instance will be instantiated if it has not already been created).
+ *
+ * Note: calling getComponent from logic executing during the instantiation and
+ * configuration of a component, before the init method (if specified) has returned,
+ * may trigger a circular dependency (for a trivial example, consider a component
+ * that looks itself up by name during its init method). Implementations of the
+ * Blueprint Service are not required to support cycles in the dependency graph
+ * and may throw an exception if a cycle is detected. Implementations that can
+ * support certain kinds of cycles are free to do so.
+ *
+ * @param name the name of the component for which the instance is to be retrieved
+ * @return the component instance, the type of the returned object is dependent
+ * on the component definition, and may be determined by introspecting the
+ * component metadata.
+ * @throws NoSuchComponentException if the name specified is not the name of a
+ * component within the module.
+ */
+ Object getComponent(String name) throws NoSuchComponentException;
+
+ /**
+ * Get the component metadata for a given named component.
+ *
+ * @param name the name of the component for which the metadata is to be retrieved.
+ * @return the component metadata for the component.
+ * @throws NoSuchComponentException if the name specified is not the name of a
+ * component within the module.
+ */
+ ComponentMetadata getComponentMetadata(String name) throws NoSuchComponentException;
+
+ /**
+ * Get the service export metadata for every service exported by this
+ * module.
+ *
+ * @return an immutable collection of ServiceExportComponentMetadata, with one entry for each service export.
+ */
+ Collection getExportedServicesMetadata();
+
+ /**
+ * Get the metadata for all components defined locally within this module.
+ *
+ * @return an immutable collection of LocalComponentMetadata, with one entry for each component.
+ */
+ Collection getLocalComponentsMetadata();
+
+ /**
+ * Get the service reference metadata for every OSGi service referenced by
+ * this module.
+ *
+ * @return an immutable collection of ServiceReferenceComponentMetadata, with one entry for each referenced service.
+ */
+ Collection getReferencedServicesMetadata();
+
+ /**
+ * Get the bundle context of the bundle this module context is
+ * associated with.
+ *
+ * @return the module's bundle context
+ */
+ BundleContext getBundleContext();
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextEventConstants.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextEventConstants.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextEventConstants.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextEventConstants.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,43 @@
+/*
+ * 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.osgi.service.blueprint.context;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:26:16 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ModuleContextEventConstants {
+
+ String BUNDLE_VERSION = "bundle.version";
+ String EXTENDER_BUNDLE = "extender.bundle";
+ String EXTENDER_ID = "extender.bundle.id";
+ String EXTENDER_SYMBOLICNAME = "extender.bundle.symbolicName";
+ String TOPIC_BLUEPRINT_EVENTS = "org/osgi/service/blueprint";
+ String TOPIC_CREATING = TOPIC_BLUEPRINT_EVENTS + "/context/CREATING";
+ String TOPIC_CREATED = TOPIC_BLUEPRINT_EVENTS + "/context/CREATED";
+ String TOPIC_DESTROYED = TOPIC_BLUEPRINT_EVENTS + "/context/DESTROYED";
+ String TOPIC_DESTROYING = TOPIC_BLUEPRINT_EVENTS + "/context/DESTROYING";
+ String TOPIC_WAITING = TOPIC_BLUEPRINT_EVENTS + "/context/WAITING";
+ String TOPIC_FAILURE = TOPIC_BLUEPRINT_EVENTS + "/context/FAILURE";
+
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextListener.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextListener.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ModuleContextListener.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,27 @@
+/*
+ * 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.osgi.service.blueprint.context;
+
+public interface ModuleContextListener {
+
+ void contextCreated(String bundleSymbolicName);
+
+ void contextCreationFailed(String bundleSymbolicName, Throwable rootCause);
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/NoSuchComponentException.java Mon Apr 13 18:49:20 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.osgi.service.blueprint.context;
+
+public class NoSuchComponentException extends RuntimeException {
+
+ private final String componentName;
+
+ public NoSuchComponentException(String componentName) {
+ this.componentName = componentName;
+ }
+
+ public String getComponentName() {
+ return this.componentName;
+ }
+
+ public String getMessage() {
+ return "No component named '" + (this.componentName == null ? "<null>" :
+ this.componentName) +
+ "' could be found";
+ }
+}
+
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/ServiceUnavailableException.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,42 @@
+/*
+ * 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.osgi.service.blueprint.context;
+
+public class ServiceUnavailableException extends RuntimeException {
+
+ private final Class serviceType;
+ private final String filter;
+
+ public ServiceUnavailableException(
+ String message,
+ Class serviceType,
+ String filterExpression) {
+ super(message);
+ this.serviceType = serviceType;
+ this.filter = filterExpression;
+ }
+
+ public Class getServiceType() {
+ return serviceType;
+ }
+
+ public String getFilter() {
+ return filter;
+ }
+}
\ No newline at end of file
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/package.html
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/package.html?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/package.html (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/context/package.html Mon Apr 13 18:49:20 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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+Blueprint Service Context Package Version 1.0.
+
+Bundles wishing to use this package must list the package in the Import-Package
+header of the bundle's manifest. For example:
+
+<code>Import-Package: org.osgi.service.blueprint.context;version="[1.0,2.0)"</code>
+
+This package defines the primary interface to a module context, <code>ModuleContext</code>.
+An instance of this type is available inside a module context as an implicity defined
+component with name "moduleContext".
+
+This package also declares the supporting exceptions types, listener and constants for
+working with a module context.
+
+</body>
+</html>
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/ConversionService.java Mon Apr 13 18:49:20 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.osgi.service.blueprint.convert;
+
+/**
+ * Provides access to the type conversions (both predefined and user registered)
+ * that are defined for the module context
+ */
+public interface ConversionService {
+
+ /**
+ * Convert an object to an instance of the given class, using the built-in and
+ * user-registered type converters as necessary.
+ *
+ * @param fromValue the object to be converted
+ * @param toType the type that the instance is to be converted to
+ * @return an instance of the class 'toType'
+ * @throws Exception if the conversion cannot succeed. This exception is
+ * checked because callers should expect that not all source objects
+ * can be successfully converted.
+ */
+ Object convert(Object fromValue, Class toType) throws Exception;
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/Converter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/Converter.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/Converter.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/Converter.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,34 @@
+/*
+ * 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.osgi.service.blueprint.convert;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:34:21 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface Converter {
+
+ Object convert(Object source) throws Exception;
+
+ Class getTargetClass();
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/package.html
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/package.html?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/package.html (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/convert/package.html Mon Apr 13 18:49:20 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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+Blueprint Service Type Conversion Package Version 1.0.
+
+Bundles wishing to use this package must list the package in the Import-Package
+header of the bundle's manifest. For example:
+
+<code>Import-Package: org.osgi.service.blueprint.convert;version="[1.0,2.0)"</code>
+
+This package defines the <code>Converter</code> interface used to implement type converters,
+and the <code>ConversionService</code> interface that provides access to registered type
+converters. A module context contains an implicitly defined component "conversionService"
+that is an instance of <code>ConversionService</code>.
+
+</body>
+</html>
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentDefinitionRegistry.java Mon Apr 13 18:49:20 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.osgi.service.blueprint.namespace;
+
+import java.util.Set;
+
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:35:12 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ComponentDefinitionRegistry {
+
+ boolean containsComponentDefinition(String name);
+
+ ComponentMetadata getComponentDefinition(String name);
+
+ Set getComponentDefinitionNames();
+
+ void registerComponentDefinition(ComponentMetadata component) throws ComponentNameAlreadyInUseException;
+
+ void removeComponentDefinition(String name);
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ComponentNameAlreadyInUseException.java Mon Apr 13 18:49:20 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.osgi.service.blueprint.namespace;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:39:24 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ComponentNameAlreadyInUseException extends RuntimeException {
+
+ public ComponentNameAlreadyInUseException(String name) {
+ super(name);
+ }
+
+ public String getConflictingName() {
+ return super.getMessage();
+ }
+
+ public String getMessage() {
+ return "Component name already in use: " + getConflictingName();
+ }
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/NamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/NamespaceHandler.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/NamespaceHandler.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/NamespaceHandler.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,42 @@
+/*
+ * 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.osgi.service.blueprint.namespace;
+
+import java.net.URL;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:37:00 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface NamespaceHandler {
+
+ ComponentMetadata decorate(Node node, ComponentMetadata component, ParserContext context);
+
+ URL getSchemaLocation(String namespace);
+
+ ComponentMetadata parse(Element element, ParserContext context);
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ParserContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ParserContext.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ParserContext.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/ParserContext.java Mon Apr 13 18:49:20 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.osgi.service.blueprint.namespace;
+
+import org.w3c.dom.Node;
+
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:38:28 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ParserContext {
+
+ ComponentDefinitionRegistry getComponentDefinitionRegistry();
+
+ ComponentMetadata getEnclosingComponent();
+
+ Node getSourceNode();
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/package.html
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/package.html?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/package.html (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/namespace/package.html Mon Apr 13 18:49:20 2009
@@ -0,0 +1,32 @@
+<!--
+ 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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+Blueprint Namespace Package Version 1.0.
+
+Bundles wishing to use this package must list the package in the Import-Package
+header of the bundle's manifest. For example:
+
+<code>Import-Package: org.osgi.service.blueprint.namespace;version="[1.0,2.0)"</code>
+
+This package provides the top-level interfaces needed for implementing a namespace handler.
+
+</body>
+</html>
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ArrayValue.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ArrayValue.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ArrayValue.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/ArrayValue.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,34 @@
+/*
+ * 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.osgi.service.blueprint.reflect;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 2, 2009
+ * Time: 9:41:23 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ArrayValue extends Value {
+
+ Value[] getArray();
+
+ String getValueType();
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/BindingListenerMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/BindingListenerMetadata.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/BindingListenerMetadata.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/BindingListenerMetadata.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,55 @@
+/*
+ * 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.osgi.service.blueprint.reflect;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Mar 26, 2009
+ * Time: 11:47:40 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface BindingListenerMetadata {
+
+ /**
+ * 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.
+ */
+ Value getListenerComponent();
+
+ /**
+ * 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.
+ */
+ String getBindMethodName();
+
+ /**
+ * 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.
+ */
+ String getUnbindMethodName();
+
+}
Added: geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java?rev=764556&view=auto
==============================================================================
--- geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java (added)
+++ geronimo/sandbox/gnodet/blueprint/org.apache.felix.blueprint/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java Mon Apr 13 18:49:20 2009
@@ -0,0 +1,82 @@
+/*
+ * 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.osgi.service.blueprint.reflect;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Mar 26, 2009
+ * Time: 11:46:34 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface CollectionBasedServiceReferenceComponentMetadata extends
+ ServiceReferenceComponentMetadata {
+
+ /**
+ * Create natural ordering based on comparison on service objects.
+ */
+ public static final int ORDER_BASIS_SERVICES = 1;
+
+ /**
+ * Create natural ordering based on comparison of service reference objects.
+ */
+ public static final int ORDER_BASIS_SERVICE_REFERENCES = 2;
+
+ /**
+ * Collection contains service instances
+ */
+ public static final int MEMBER_TYPE_SERVICES = 1;
+
+ /**
+ * Collection contains service references
+ */
+ public static final int MEMBER_TYPE_SERVICE_REFERENCES = 2;
+
+ /**
+ * The type of collection to be created.
+ *
+ * @return Class object for the specified collection type (List, Set).
+ */
+ Class getCollectionType();
+
+ /**
+ * 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.
+ */
+ Value getComparator();
+
+ /**
+ * The basis on which to perform ordering, if specified.
+ *
+ * @return one of ORDER_BASIS_SERVICES and ORDER_BASIS_SERVICE_REFERENCES
+ */
+ int getOrderingComparisonBasis();
+
+ /**
+ * Whether the collection will contain service instances, or service references.
+ *
+ * @return one of MEMBER_TYPE_SERVICES and MEMBER_TYPE_SERVICE_REFERENCES
+ */
+ int getMemberType();
+
+}