You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by an...@apache.org on 2015/01/18 01:09:36 UTC
[2/5] incubator-tamaya git commit: TAMAYA-58: Added getTargetType to
PropertyConverter. Added implementations of converters for base types.
TAMAYA-58: Added getTargetType to PropertyConverter. Added implementations of converters for base types.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/4f5269ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/4f5269ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/4f5269ec
Branch: refs/heads/master
Commit: 4f5269ec6e1cba7ea59ddf81f5cd94467353ebf4
Parents: 578c873
Author: anatole <an...@apache.org>
Authored: Sun Jan 18 01:03:32 2015 +0100
Committer: anatole <an...@apache.org>
Committed: Sun Jan 18 01:09:25 2015 +0100
----------------------------------------------------------------------
.../org/apache/tamaya/spi/PropertySource.java | 11 ++++---
.../org.apache.tamaya.spi.PropertyConverter | 34 ++++++++++++++++++++
...tServiceContextTest$InvalidPriorityInterface | 19 +++++++++++
...efaultServiceContextTest$MultiImplsInterface | 20 ++++++++++++
...tServiceContextTest$InvalidPriorityInterface | 19 -----------
...efaultServiceContextTest$MultiImplsInterface | 20 ------------
6 files changed, 80 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4f5269ec/java8/api/src/main/java/org/apache/tamaya/spi/PropertySource.java
----------------------------------------------------------------------
diff --git a/java8/api/src/main/java/org/apache/tamaya/spi/PropertySource.java b/java8/api/src/main/java/org/apache/tamaya/spi/PropertySource.java
index 350759e..e91906a 100644
--- a/java8/api/src/main/java/org/apache/tamaya/spi/PropertySource.java
+++ b/java8/api/src/main/java/org/apache/tamaya/spi/PropertySource.java
@@ -84,11 +84,14 @@ public interface PropertySource {
/**
- * Get the name of the property source. The name should be unique for the type of source, whereas the id is used
- * to ensure unique identity, either locally or remotely.
- * @return the configuration's name, never null.
+ * Get the name of the property source. The name should be unique for the type of source, whereas multiple instances
+ * of the same type (and thus name) may exist in a system. Give a {@link org.apache.tamaya.spi.ConfigurationContext}
+ * the name of a PropertySource is unique.
+ * @return the property source's name, never null.
*/
- String getName();
+ default String getName(){
+ return getClass().getName();
+ }
/**
* Access a property.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4f5269ec/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
----------------------------------------------------------------------
diff --git a/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter b/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
new file mode 100644
index 0000000..964843c
--- /dev/null
+++ b/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
@@ -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 current 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.
+#
+org.apache.tamaya.core.internal.converters.BooleanConverter
+org.apache.tamaya.core.internal.converters.ByteConverter
+org.apache.tamaya.core.internal.converters.CharConverter
+org.apache.tamaya.core.internal.converters.DoubleConverter
+org.apache.tamaya.core.internal.converters.FloatConverter
+org.apache.tamaya.core.internal.converters.IntegerConverter
+org.apache.tamaya.core.internal.converters.LongConverter
+org.apache.tamaya.core.internal.converters.ShortConverter
+org.apache.tamaya.core.internal.converters.BigDecimalConverter
+org.apache.tamaya.core.internal.converters.BigIntegerConverter
+org.apache.tamaya.core.internal.converters.CurrencyConverter
+org.apache.tamaya.core.internal.converters.LocalDateConverter
+org.apache.tamaya.core.internal.converters.LocalDateTimeConverter
+org.apache.tamaya.core.internal.converters.LocalTimeConverter
+org.apache.tamaya.core.internal.converters.ZoneIdConverter
+org.apache.tamaya.core.internal.converters.NumberConverter
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4f5269ec/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface
----------------------------------------------------------------------
diff --git a/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface b/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface
new file mode 100644
index 0000000..62b9bd5
--- /dev/null
+++ b/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface
@@ -0,0 +1,19 @@
+# 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.
+
+org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityImpl1
+org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityImpl2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4f5269ec/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface
----------------------------------------------------------------------
diff --git a/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface b/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface
new file mode 100644
index 0000000..b144790
--- /dev/null
+++ b/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface
@@ -0,0 +1,20 @@
+# 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.
+
+org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImpl1
+org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImpl2
+org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImpl3
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4f5269ec/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$InvalidPriorityInterface
----------------------------------------------------------------------
diff --git a/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$InvalidPriorityInterface b/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$InvalidPriorityInterface
deleted file mode 100644
index 6f0ccc7..0000000
--- a/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$InvalidPriorityInterface
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.
-
-org.apache.tamaya.core.test.internal.DefaultServiceContextTest$InvalidPriorityImpl1
-org.apache.tamaya.core.test.internal.DefaultServiceContextTest$InvalidPriorityImpl2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4f5269ec/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$MultiImplsInterface
----------------------------------------------------------------------
diff --git a/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$MultiImplsInterface b/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$MultiImplsInterface
deleted file mode 100644
index 1168b01..0000000
--- a/java8/core/src/test/resources/META-INF/services/org.apache.tamaya.core.test.internal.DefaultServiceContextTest$MultiImplsInterface
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-org.apache.tamaya.core.test.internal.DefaultServiceContextTest$MultiImpl1
-org.apache.tamaya.core.test.internal.DefaultServiceContextTest$MultiImpl2
-org.apache.tamaya.core.test.internal.DefaultServiceContextTest$MultiImpl3
\ No newline at end of file