camel git commit: CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in BlueprintPropertiesParser

2016-10-17 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 6f77007e0 -> a8fa3ebd3


CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in 
BlueprintPropertiesParser


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a8fa3ebd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a8fa3ebd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a8fa3ebd

Branch: refs/heads/camel-2.18.x
Commit: a8fa3ebd3d89e0ffc2270dbcaae629e6d97cb995
Parents: 6f77007
Author: lburgazzoli 
Authored: Mon Oct 17 13:05:46 2016 +0200
Committer: lburgazzoli 
Committed: Mon Oct 17 13:07:57 2016 +0200

--
 .../org/apache/camel/blueprint/BlueprintPropertiesParser.java| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a8fa3ebd/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
--
diff --git 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
index c04e31e..d16762a 100644
--- 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
+++ 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
@@ -96,11 +96,11 @@ public class BlueprintPropertiesParser extends 
DefaultPropertiesParser {
 
 if (method == null) {
 try {
-method = 
AbstractPropertyPlaceholder.class.getDeclaredMethod("getProperty", 
String.class);
+method = 
AbstractPropertyPlaceholder.class.getDeclaredMethod("retrieveValue", 
String.class);
 method.setAccessible(true);
 } catch (NoSuchMethodException e) {
 throw new IllegalStateException("Cannot add blueprint 
property placeholder: " + id
-+ " as the method getProperty is not accessible", 
e);
++ " as the method retrieveValue is not 
accessible", e);
 }
 }
 }



camel git commit: CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in BlueprintPropertiesParser

2016-10-17 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master 726bbdca9 -> d9e6f8261


CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in 
BlueprintPropertiesParser


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d9e6f826
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d9e6f826
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d9e6f826

Branch: refs/heads/master
Commit: d9e6f8261b3b8939bcbfc40f7b20ee15c17a2e32
Parents: 726bbdc
Author: lburgazzoli 
Authored: Mon Oct 17 13:05:46 2016 +0200
Committer: lburgazzoli 
Committed: Mon Oct 17 13:05:46 2016 +0200

--
 .../org/apache/camel/blueprint/BlueprintPropertiesParser.java| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d9e6f826/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
--
diff --git 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
index c04e31e..d16762a 100644
--- 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
+++ 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
@@ -96,11 +96,11 @@ public class BlueprintPropertiesParser extends 
DefaultPropertiesParser {
 
 if (method == null) {
 try {
-method = 
AbstractPropertyPlaceholder.class.getDeclaredMethod("getProperty", 
String.class);
+method = 
AbstractPropertyPlaceholder.class.getDeclaredMethod("retrieveValue", 
String.class);
 method.setAccessible(true);
 } catch (NoSuchMethodException e) {
 throw new IllegalStateException("Cannot add blueprint 
property placeholder: " + id
-+ " as the method getProperty is not accessible", 
e);
++ " as the method retrieveValue is not 
accessible", e);
 }
 }
 }



camel git commit: CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in BlueprintPropertiesParser

2016-10-14 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 6890e04e7 -> faec0ea81


CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in 
BlueprintPropertiesParser


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/faec0ea8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/faec0ea8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/faec0ea8

Branch: refs/heads/camel-2.18.x
Commit: faec0ea813b0004926121060023f30b61fc2b43e
Parents: 6890e04
Author: lburgazzoli 
Authored: Thu Oct 13 14:04:20 2016 +0200
Committer: lburgazzoli 
Committed: Fri Oct 14 16:22:25 2016 +0200

--
 .../component/properties/DefaultPropertiesParser.java | 14 +-
 .../camel/blueprint/BlueprintPropertiesParser.java| 11 +--
 2 files changed, 14 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/faec0ea8/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
 
b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
index 3ab0f73..54037bf 100644
--- 
a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
+++ 
b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
@@ -20,8 +20,6 @@ import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
 
-import static java.lang.String.format;
-
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -139,7 +137,7 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 // If not found, ensure that there is no valid prefix token in the 
string
 if (suffix == -1) {
 if (getMatchingPrefixIndex(input, input.length()) != -1) {
-throw new IllegalArgumentException(format("Missing %s from 
the text: %s", suffixToken, input));
+throw new IllegalArgumentException(String.format("Missing 
%s from the text: %s", suffixToken, input));
 }
 return null;
 }
@@ -147,7 +145,7 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 // Find the index of the prefix token that matches the suffix token
 int prefix = getMatchingPrefixIndex(input, suffix);
 if (prefix == -1) {
-throw new IllegalArgumentException(format("Missing %s from the 
text: %s", prefixToken, input));
+throw new IllegalArgumentException(String.format("Missing %s 
from the text: %s", prefixToken, input));
 }
 
 String key = input.substring(prefix + prefixToken.length(), 
suffix);
@@ -233,6 +231,12 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 }
 }
 
+// first try to resolve the key as it is
+String value = parseProperty(key, null, properties);
+if (value != null) {
+return value;
+}
+
 // they key may have a get or else expression
 String defaultValue = null;
 if (key.contains(GET_OR_ELSE_TOKEN)) {
@@ -243,7 +247,7 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 String augmentedKey = getAugmentedKey(key);
 boolean shouldFallback = fallbackToUnaugmentedProperty && 
!key.equals(augmentedKey);
 
-String value = doGetPropertyValue(augmentedKey);
+value = doGetPropertyValue(augmentedKey);
 if (value == null && shouldFallback) {
 log.debug("Property with key [{}] not found, attempting with 
unaugmented key: {}", augmentedKey, key);
 value = doGetPropertyValue(key);

http://git-wip-us.apache.org/repos/asf/camel/blob/faec0ea8/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
--
diff --git 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
index c04e31e..3249e48 100644
--- 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
+++ 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
@@ -96,7 +96,7 @@ public class BlueprintPropertiesParser extends 
DefaultProperties

camel git commit: CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in BlueprintPropertiesParser

2016-10-14 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master e73815d14 -> 50081740d


CAMEL-10352: Optionally delegate to Aries PropertyEvaluator services in 
BlueprintPropertiesParser


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/50081740
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/50081740
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/50081740

Branch: refs/heads/master
Commit: 50081740d19a2081910b33ead3d3c65f9ecf1ab9
Parents: e73815d
Author: lburgazzoli 
Authored: Thu Oct 13 14:04:20 2016 +0200
Committer: lburgazzoli 
Committed: Fri Oct 14 16:11:25 2016 +0200

--
 .../component/properties/DefaultPropertiesParser.java | 14 +-
 .../camel/blueprint/BlueprintPropertiesParser.java| 11 +--
 2 files changed, 14 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/50081740/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
 
b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
index 3ab0f73..54037bf 100644
--- 
a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
+++ 
b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
@@ -20,8 +20,6 @@ import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
 
-import static java.lang.String.format;
-
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -139,7 +137,7 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 // If not found, ensure that there is no valid prefix token in the 
string
 if (suffix == -1) {
 if (getMatchingPrefixIndex(input, input.length()) != -1) {
-throw new IllegalArgumentException(format("Missing %s from 
the text: %s", suffixToken, input));
+throw new IllegalArgumentException(String.format("Missing 
%s from the text: %s", suffixToken, input));
 }
 return null;
 }
@@ -147,7 +145,7 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 // Find the index of the prefix token that matches the suffix token
 int prefix = getMatchingPrefixIndex(input, suffix);
 if (prefix == -1) {
-throw new IllegalArgumentException(format("Missing %s from the 
text: %s", prefixToken, input));
+throw new IllegalArgumentException(String.format("Missing %s 
from the text: %s", prefixToken, input));
 }
 
 String key = input.substring(prefix + prefixToken.length(), 
suffix);
@@ -233,6 +231,12 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 }
 }
 
+// first try to resolve the key as it is
+String value = parseProperty(key, null, properties);
+if (value != null) {
+return value;
+}
+
 // they key may have a get or else expression
 String defaultValue = null;
 if (key.contains(GET_OR_ELSE_TOKEN)) {
@@ -243,7 +247,7 @@ public class DefaultPropertiesParser implements 
AugmentedPropertyNameAwareProper
 String augmentedKey = getAugmentedKey(key);
 boolean shouldFallback = fallbackToUnaugmentedProperty && 
!key.equals(augmentedKey);
 
-String value = doGetPropertyValue(augmentedKey);
+value = doGetPropertyValue(augmentedKey);
 if (value == null && shouldFallback) {
 log.debug("Property with key [{}] not found, attempting with 
unaugmented key: {}", augmentedKey, key);
 value = doGetPropertyValue(key);

http://git-wip-us.apache.org/repos/asf/camel/blob/50081740/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
--
diff --git 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
index c04e31e..3249e48 100644
--- 
a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
+++ 
b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintPropertiesParser.java
@@ -96,7 +96,7 @@ public class BlueprintPropertiesParser extends 
DefaultPropertiesParser {