geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1831791 - in /geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config: ConfigImpl.java ConfigSnapshotImpl.java ConfigValueImpl.java
Date Thu, 17 May 2018 15:39:22 GMT
Author: struberg
Date: Thu May 17 15:39:22 2018
New Revision: 1831791

URL: http://svn.apache.org/viewvc?rev=1831791&view=rev
Log:
update to revised ConfigJSR ConfigValue -> ConfigAccessor rename

Modified:
    geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
    geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigSnapshotImpl.java
    geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigValueImpl.java

Modified: geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java?rev=1831791&r1=1831790&r2=1831791&view=diff
==============================================================================
--- geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
(original)
+++ geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
Thu May 17 15:39:22 2018
@@ -44,7 +44,7 @@ import org.apache.geronimo.config.conver
 import org.apache.geronimo.config.converters.URLConverter;
 import javax.config.Config;
 import javax.config.ConfigSnapshot;
-import javax.config.ConfigValue;
+import javax.config.ConfigAccessor;
 import javax.config.spi.ConfigSource;
 import javax.config.spi.Converter;
 
@@ -103,15 +103,15 @@ public class ConfigImpl implements Confi
     }
 
     @Override
-    public ConfigSnapshot snapshotFor(ConfigValue<?>... configValues) {
+    public ConfigSnapshot snapshotFor(ConfigAccessor<?>... configValues) {
         // we implement kind of optimistic Locking
         // Means we try multiple time to resolve all the given values
         // until the config didn't change inbetween.
         for (int tries = 1; tries < 5; tries++)
         {
-            Map<ConfigValue<?>, Object> resolved = new HashMap<>();
+            Map<ConfigAccessor<?>, Object> resolved = new HashMap<>();
             long startReadLastChanged = lastChanged;
-            for (ConfigValue configValue : configValues)
+            for (ConfigAccessor configValue : configValues)
             {
                 resolved.put(configValue, configValue.getValue());
             }

Modified: geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigSnapshotImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigSnapshotImpl.java?rev=1831791&r1=1831790&r2=1831791&view=diff
==============================================================================
--- geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigSnapshotImpl.java
(original)
+++ geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigSnapshotImpl.java
Thu May 17 15:39:22 2018
@@ -21,19 +21,19 @@ package org.apache.geronimo.config;
 import java.util.Map;
 
 import javax.config.ConfigSnapshot;
-import javax.config.ConfigValue;
+import javax.config.ConfigAccessor;
 
 
 public class ConfigSnapshotImpl implements ConfigSnapshot
 {
-    private final Map<ConfigValue<?>, Object> configValues;
+    private final Map<ConfigAccessor<?>, Object> configValues;
 
-    public ConfigSnapshotImpl(Map<ConfigValue<?>, Object> configValues)
+    public ConfigSnapshotImpl(Map<ConfigAccessor<?>, Object> configValues)
     {
         this.configValues = configValues;
     }
 
-    public Map<ConfigValue<?>, Object> getConfigValues()
+    public Map<ConfigAccessor<?>, Object> getConfigValues()
     {
         return configValues;
     }

Modified: geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigValueImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigValueImpl.java?rev=1831791&r1=1831790&r2=1831791&view=diff
==============================================================================
--- geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigValueImpl.java
(original)
+++ geronimo/components/config/branches/ConfigJSR/impl/src/main/java/org/apache/geronimo/config/ConfigValueImpl.java
Thu May 17 15:39:22 2018
@@ -17,7 +17,7 @@
 package org.apache.geronimo.config;
 
 import javax.config.ConfigSnapshot;
-import javax.config.ConfigValue;
+import javax.config.ConfigAccessor;
 import javax.config.spi.Converter;
 
 import java.util.ArrayList;
@@ -35,7 +35,7 @@ import javax.enterprise.inject.Typed;
  * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
  */
 @Typed
-public class ConfigValueImpl<T> implements ConfigValue<T> {
+public class ConfigValueImpl<T> implements ConfigAccessor<T> {
     private static final Logger logger = Logger.getLogger(ConfigValueImpl.class.getName());
 
     private final ConfigImpl config;
@@ -79,9 +79,9 @@ public class ConfigValueImpl<T> implemen
     }
 
     @Override
-    public ConfigValue<List<T>> asList() {
+    public ConfigAccessor<List<T>> asList() {
         isList = true;
-        ConfigValue<List<T>> listTypedResolver = (ConfigValue<List<T>>)
this;
+        ConfigAccessor<List<T>> listTypedResolver = (ConfigAccessor<List<T>>)
this;
 
         if (defaultValue == null)
         {
@@ -93,9 +93,9 @@ public class ConfigValueImpl<T> implemen
     }
 
     @Override
-    public ConfigValue<Set<T>> asSet() {
+    public ConfigAccessor<Set<T>> asSet() {
         isSet = true;
-        ConfigValue<Set<T>> listTypedResolver = (ConfigValue<Set<T>>)
this;
+        ConfigAccessor<Set<T>> listTypedResolver = (ConfigAccessor<Set<T>>)
this;
 
         if (defaultValue == null)
         {
@@ -107,14 +107,14 @@ public class ConfigValueImpl<T> implemen
     }
 
     @Override
-    public ConfigValue<T> withDefault(T value) {
+    public ConfigAccessor<T> withDefault(T value) {
         defaultValue = value;
         withDefault = true;
         return this;
     }
 
     @Override
-    public ConfigValue<T> withStringDefault(String value) {
+    public ConfigAccessor<T> withStringDefault(String value) {
         if (value == null || value.isEmpty()) {
             throw new RuntimeException("Empty String or null supplied as string-default value
for property "
                     + keyOriginal);
@@ -136,7 +136,7 @@ public class ConfigValueImpl<T> implemen
     }
 
     @Override
-    public ConfigValue<T> useConverter(Converter<T> converter) {
+    public ConfigAccessor<T> useConverter(Converter<T> converter) {
         this.converter = converter;
         return this;
     }
@@ -230,7 +230,7 @@ public class ConfigValueImpl<T> implemen
 
         if (!snapshotImpl.getConfigValues().containsKey(this))
         {
-            throw new IllegalArgumentException("The TypedResolver for key " + getKey() +
+            throw new IllegalArgumentException("The TypedResolver for key " + getPropertyName()
+
                     " does not belong the given ConfigSnapshot!");
         }
 
@@ -352,12 +352,12 @@ public class ConfigValueImpl<T> implemen
     }
 
     //X @Override
-    public String getKey() {
+    public String getPropertyName() {
         return keyOriginal;
     }
 
     //X @Override
-    public String getResolvedKey() {
+    public String getResolvedPropertyName() {
         return keyResolved;
     }
 



Mime
View raw message