You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2009/04/10 13:33:28 UTC
svn commit: r763912 [2/2] - in /geronimo/sandbox/gawor/rfc124:
extender/src/main/java/org/apache/geronimo/osgi/context/
extender/src/main/java/org/apache/geronimo/osgi/reflect/
rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/
Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java Fri Apr 10 11:33:27 2009
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.osgi.reflect;
+
+import java.util.LinkedHashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.osgi.service.blueprint.reflect.*;
+
+public class SetValueImpl implements SetValue {
+ private Set set;
+ private String valueType;
+
+ public SetValueImpl(Set set) {
+ this.set = set;
+ }
+
+ public SetValueImpl(SetValue source) {
+ // this maintains the iteration order of the original
+ this.set = new LinkedHashSet();
+ Iterator i = source.getSet().iterator();
+ while (i.hasNext()) {
+ set.add(MetadataUtil.cloneValue((Value)i.next()));
+ }
+ valueType = source.getValueType();
+ }
+
+ /**
+ * The Set (of Value objects) for this set-based value
+ */
+ public Set getSet() {
+ return set;
+ }
+
+ /**
+ * The value-type specified for the list elements, or null if none given
+ */
+ public String getValueType() {
+ return valueType;
+ }
+
+ public void setValueType(String type) {
+ valueType = type;
+ }
+}
+
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/SetValueImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java Fri Apr 10 11:33:27 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.apache.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.TypedStringValue;
+
+
+public class TypedStringValueImpl implements TypedStringValue {
+ private String stringValue;
+ private String typeName;
+
+ public TypedStringValueImpl(String value) {
+ this.stringValue = value;
+ this.typeName = null;
+ }
+
+ public TypedStringValueImpl(String value, String name) {
+ this.stringValue = value;
+ this.typeName = name;
+ }
+
+ public TypedStringValueImpl(TypedStringValue source) {
+ this.stringValue = source.getStringValue();
+ this.typeName = source.getTypeName();
+ }
+
+ /**
+ * The string value (unconverted) of this value).
+ */
+ public String getStringValue() {
+ return stringValue;
+ }
+ /**
+ * The name of the type to which this value should be coerced. May be null.
+ */
+ public String getTypeName() {
+ return typeName;
+ }
+}
+
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/TypedStringValueImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java?rev=763912&view=auto
==============================================================================
--- geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java (added)
+++ geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java Fri Apr 10 11:33:27 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.apache.geronimo.osgi.reflect;
+
+import org.osgi.service.blueprint.reflect.UnaryServiceReferenceComponentMetadata;
+
+
+public class UnaryServiceReferenceComponentMetadataImpl extends ServiceReferenceComponentMetadataImpl implements UnaryServiceReferenceComponentMetadata {
+ private long timeout = 300000;
+
+ public UnaryServiceReferenceComponentMetadataImpl() {
+ this((String)null);
+ }
+
+ public UnaryServiceReferenceComponentMetadataImpl(String name) {
+ super(name);
+ }
+
+
+ public UnaryServiceReferenceComponentMetadataImpl(UnaryServiceReferenceComponentMetadata source) {
+ super(source);
+ timeout = source.getTimeout();
+ }
+
+ /**
+ * Timeout for service invocations when a matching backing service
+ * is unavailable.
+ *
+ * @return service invocation timeout in milliseconds
+ */
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+}
+
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/gawor/rfc124/extender/src/main/java/org/apache/geronimo/osgi/reflect/UnaryServiceReferenceComponentMetadataImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java?rev=763912&r1=763911&r2=763912&view=diff
==============================================================================
--- geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java (original)
+++ geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionBasedServiceReferenceComponentMetadata.java Fri Apr 10 11:33:27 2009
@@ -17,21 +17,21 @@
package org.osgi.service.blueprint.reflect;
public interface CollectionBasedServiceReferenceComponentMetadata extends ServiceReferenceComponentMetadata {
-
+
static final int MEMBER_TYPE_SERVICE_REFERENCES = 2;
-
+
static final int MEMBER_TYPE_TYPE_SERVICES = 1;
-
+
static final int ORDER_BASIC_SERVICE_REFERENCES = 2;
-
+
static final int ORDER_BASIC_SERVICES = 1;
-
+
Class getCollectionType();
-
+
Value getComparator();
-
+
int getMemberType();
-
- int getOrderingComparatorBasis();
-
+
+ int getOrderingComparisonBasis();
+
}
Modified: geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/LocalComponentMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/LocalComponentMetadata.java?rev=763912&r1=763911&r2=763912&view=diff
==============================================================================
--- geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/LocalComponentMetadata.java (original)
+++ geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/LocalComponentMetadata.java Fri Apr 10 11:33:27 2009
@@ -21,27 +21,27 @@
public interface LocalComponentMetadata extends ComponentMetadata {
static final String SCOPE_BUNDLE = "bundle";
-
+
static final String SCOPE_PROTOTYPE = "prototype";
-
+
static final String SCOPE_SINGLETON = "singleton";
-
+
String getClassName();
-
+
ConstructorInjectionMetadata getConstructorInjectionMetadata();
-
+
String getDestroyMethodName();
-
+
Value getFactoryComponent();
-
+
MethodInjectionMetadata getFactoryMethodMetadata();
-
+
String getInitMethodName();
-
- Collection getPropertyInjectionMethadata();
-
+
+ Collection getPropertyInjectionMetadata();
+
String getScope();
-
+
boolean isLazy();
-
+
}
Copied: geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertyInjectionMetadata.java (from r763906, geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertiesInjectionMetadata.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertyInjectionMetadata.java?p2=geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertyInjectionMetadata.java&p1=geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertiesInjectionMetadata.java&r1=763906&r2=763912&rev=763912&view=diff
==============================================================================
--- geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertiesInjectionMetadata.java (original)
+++ geronimo/sandbox/gawor/rfc124/rfc124-api/src/main/java/org/osgi/service/blueprint/reflect/PropertyInjectionMetadata.java Fri Apr 10 11:33:27 2009
@@ -16,10 +16,10 @@
*/
package org.osgi.service.blueprint.reflect;
-public interface PropertiesInjectionMetadata {
+public interface PropertyInjectionMetadata {
String getName();
-
+
Value getValue();
-
+
}