Bharat, You can create a property (with get/set) methods in your route builder and initialize it in your beans.xml file:
<bean id="sampleroute" class="sampleroute.SampleRouteBuilder"> <property name="numberOfDays" value="30" /> </bean> Does that work for you? Fernando On Tue, May 31, 2011 at 3:19 PM, Bharat Goyal <bha...@adchemy.com> wrote: > Yes, startDate is the current date and I can use ${date:now:dd/MMM/yyyy} > > For end date, it will be for e.g. start date - 30 days (but 30 will be read > from a property file) > > > > > ****************************************************************************************** > “CONFIDENTIALITY NOTICE: The information transmitted in this message and > its attachments (if any) is intended only for the person or entity to whom > or which it is addressed and may contain confidential and/or privileged > material. Any review, retransmission, dissemination or other use of, or > taking of any action in reliance upon this information, by persons or > entities other than the intended recipient is prohibited. If you have > received this in error, please contact the sender and delete this e-mail and > associated material from any computer. The intended recipient of this e-mail > may only use, reproduce, disclose, or distribute the information contained > in this e-mail and any attached files with the permission of the sender.” > > ----- Original Message ----- > From: "Fernando Ribeiro" <webmas...@fernandoribeiro.eti.br> > To: users@camel.apache.org > Sent: Tuesday, May 31, 2011 11:18:07 AM GMT -08:00 US/Canada Pacific > Subject: Re: date functions/URL params for http endpoint > > You mean you need to be able to get the current date (for startDate) and a > date in a configuration (endDate) in your route, right? > > On Tue, May 31, 2011 at 3:13 PM, Bharat Goyal <bha...@adchemy.com> wrote: > > > Hello, > > We have the requirement to pull data from a http URL on specific dates of > > the month. > > > > Requirements: > > 1. There are 2 URL params in the http call, startDate and endDate that > > takes date expr in dd/MMM/YYYY (e.g. 05/JAN/2011) and are used to fetch > data > > between those 2 dates. > > 2. Our camel-cron/quartz setup will need to run on specific dates, and > then > > route to the http endpoint that can retrieve this data. > > 3. the startDate has to be the current date (whenever the quartz job > ran), > > but the endDate needs to be startDate - {some configured value}. How do > we > > do this via spring/camel config without writing a custom processor? Are > > there any date functions available to subtract dates for e.g? > > > > Thanks, > > Bharat > > >