Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 50022 invoked from network); 6 Jan 2009 11:54:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jan 2009 11:54:28 -0000 Received: (qmail 74785 invoked by uid 500); 6 Jan 2009 11:54:28 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 74765 invoked by uid 500); 6 Jan 2009 11:54:28 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 74754 invoked by uid 99); 6 Jan 2009 11:54:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 03:54:28 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 11:54:26 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B0D55234C47E for ; Tue, 6 Jan 2009 03:54:05 -0800 (PST) Message-ID: <406492226.1231242845722.JavaMail.jira@brutus> Date: Tue, 6 Jan 2009 03:54:05 -0800 (PST) From: "Atle Prange (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1226) String formatter / interpolator for dsl uris In-Reply-To: <1172938782.1231167426367.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48498#action_48498 ] Atle Prange commented on CAMEL-1226: ------------------------------------ I have seen so many different ways of representing the placeholder, but why not use a java API standard. Other examples are EL: #{0}, #{1}; StringFormat: %s, %s... > String formatter / interpolator for dsl uris > -------------------------------------------- > > Key: CAMEL-1226 > URL: https://issues.apache.org/activemq/browse/CAMEL-1226 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Reporter: Atle Prange > Priority: Minor > > Often one ends up with dsl expressions that build strings like: > {code} > from("direct:start").to("ldap:localhost:" + port + "?base=" + query); > {code} > Would in not be better to write > {code} > from("direct:start").to("ldps:localhost:{1}?base={2}", port, query); > {code} > , where "{1}" means "the first argument in the string varargs following. ( "{1}" could of course be replaced by some expression that you like the format of) > To implementent this one could overload the from() and to() methods to accept a vararg array of Strings following the uri argument, and interpolate the uri with the varargs... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.