[aerogear-dev] Integrate custom route into "aerogear-android"

Sebastien Blanc scm.blanc at gmail.com
Wed Apr 10 03:54:10 EDT 2013


Not sure if it solves your problem but you shouldn't use a path param here
but a request param, like :

/aero/facilities/?username=user1

route().from("/facilities").on(RequestMethod.GET).consumes(JSON).produces(MediaType.JSON).to(MyAerogearFacade.class).getFacilityByUsername(param("username"));


and don't forget to set your base URL to /aero in the pipe

Hope that helps.

Seb




On Wed, Apr 10, 2013 at 9:27 AM, tomlux <tom at schuller.lu> wrote:

> Sorry, seems to be blocked in the mailing list:
>
> http://aerogear-dev.1069024.n5.nabble.com/Integrate-custom-route-into-quot-aerogear-android-quot-td2230.html
>
> Now, for the mailinglist:
>
> I created a custom route (non CRUD) in my aerogear facade.
>
> route().from("/aero/facilities/byUsername/{username}").on(RequestMethod.GET).consumes(JSON).produces(MediaType.JSON).to(MyAerogearFacade.class).getFacilityByUsername(param("username"));
>
>
> Using curl, I'm getting the expected results:
>
>  curl  --header "Accept: application/json" http://localhost:8080/farming/aero/facilities/byUsername/user1
>
>
>
> On Wed, Apr 10, 2013 at 9:19 AM, Sebastien Blanc [via aerogear-dev] <[hidden
> email] <http://user/SendEmail.jtp?type=node&node=2233&i=0>> wrote:
>
>> Hey,
>> We need a bit more info here ;)
>> What is the route you defined  and  Can you paste your CURL ?
>> Thx,
>> Seb
>>
>>
>>
>>
>>
>> On Wed, Apr 10, <a href="tel:2013" value="+3522013" target="_blank">2013
>> at 6:56 AM, tomlux <[hidden email]<http://user/SendEmail.jtp?type=node&node=2232&i=0>
>> > wrote:
>>
>>> Hy,
>>> I created a custom route (non CRUD) in my aerogear facade.
>>>
>>>
>>> Using curl, I'm getting the expected results:
>>>
>>>
>>> What is the easiest way to consume this route in "aerogear-android"?
>>> As far as I understand, the pipe concept is just valid for the predefined
>>> CRUD routes.
>>>
>>> I also tried to solve my problem with "ReadFilter.setWhere", but I don't
>>> know how I can/should configure this in the controller. The url was
>>> correctly build, but the where condition wasn't repectet.
>>>
>>> Thanks,
>>>  Tom
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://aerogear-dev.1069024.n5.nabble.com/Integrate-custom-route-into-aerogear-android-tp2230.html
>>> Sent from the aerogear-dev mailing list archive at Nabble.com.
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=2232&i=1>
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=2232&i=2>
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://aerogear-dev.1069024.n5.nabble.com/Integrate-custom-route-into-aerogear-android-tp2230p2232.html
>>  To unsubscribe from Integrate custom route into "aerogear-android", click
>> here.
>> NAML<http://aerogear-dev.1069024.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: [aerogear-dev] Integrate custom route
> into "aerogear-android"<http://aerogear-dev.1069024.n5.nabble.com/Integrate-custom-route-into-aerogear-android-tp2230p2233.html>
>
> Sent from the aerogear-dev mailing list archive<http://aerogear-dev.1069024.n5.nabble.com/>at Nabble.com.
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130410/0690d74d/attachment.html 


More information about the aerogear-dev mailing list