You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "Steve Blackmon (JIRA)" <ji...@apache.org> on 2017/05/20 00:33:05 UTC

[jira] [Comment Edited] (JUNEAU-49) Support beans as arguments for GET calls using @RemoteableMethod

    [ https://issues.apache.org/jira/browse/JUNEAU-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16018208#comment-16018208 ] 

Steve Blackmon edited comment on JUNEAU-49 at 5/20/17 12:32 AM:
----------------------------------------------------------------

It should also be possible to select specific properties within the bean:
@Query("id") Bean bean 
would make bean.getId() (or whichever getter @BeanConstructor has identified as producing 'id') a query parameter

and in conjunction with JUNEAU-48:
@Path("id") Bean bean
would map bean.getId() (or whichever getter @BeanConstructor has identified as producing 'id') as a path parameter when preparing the URI to GET or POST


was (Author: steveblackmon):
It should also be possible to select specific properties within the bean:
@Query("id") Bean bean 
would make bean.getQuery() a query parameter

and in conjunction with JUNEAU-48:
@Path("id") Bean bean
would map bean.getId() (or whichever getter @BeanConstructor has identified as producing 'id') as a path parameter when preparing the URI to GET or POST

> Support beans as arguments for GET calls using @RemoteableMethod
> ----------------------------------------------------------------
>
>                 Key: JUNEAU-49
>                 URL: https://issues.apache.org/jira/browse/JUNEAU-49
>             Project: Juneau
>          Issue Type: Improvement
>            Reporter: Steve Blackmon
>
> The standard use case for wrapping a GET call with query parameters in a rest proxy is to enumerate each of the possible get params in order and attach @query to each.
> However, when the number of possible parameters becomes large and many are optional, the ability for the proxy to extract multiple params from a bean would make implementation much more readable.
> Enable pojo arguments annotated @Query("\*") or @QueryIfNE("\*”) in a method annotated @RemoteableMethod(httpMethod="GET") to serve as a source for multiple parameters (all query parameters for now)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)