Updated Branches: refs/heads/camel-2.11.x a01324c74 -> c9c74ecd1 refs/heads/camel-2.12.x 609998bb3 -> a0f0d38bf refs/heads/master 2f3e58688 -> 2e05ae0a1
CAMEL-6907: Added setProperties method to DefaultEndpoint just like we have in DefaultComponent that comes handy for component developers. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9041192b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9041192b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9041192b Branch: refs/heads/master Commit: 9041192bd3578d538262f316de4a2d39dd3bf294 Parents: 2f3e586 Author: Claus Ibsen <[email protected]> Authored: Mon Oct 28 13:17:35 2013 +0100 Committer: Claus Ibsen <[email protected]> Committed: Mon Oct 28 13:17:35 2013 +0100 ---------------------------------------------------------------------- .../java/org/apache/camel/impl/DefaultEndpoint.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/9041192b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java index b88d148..3dae289 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java @@ -269,6 +269,20 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint } /** + * Sets the bean properties on the given bean. + * <p/> + * This is the same logical implementation as {@link DefaultComponent#setProperties(Object, java.util.Map)} + * + * @param bean the bean + * @param parameters properties to set + */ + protected void setProperties(Object bean, Map<String, Object> parameters) throws Exception { + // set reference properties first as they use # syntax that fools the regular properties setter + EndpointHelper.setReferenceProperties(getCamelContext(), bean, parameters); + EndpointHelper.setProperties(getCamelContext(), bean, parameters); + } + + /** * A factory method to lazily create the endpointUri if none is specified */ protected String createEndpointUri() {
