[
https://issues.apache.org/jira/browse/CXF-5038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vincent Tremblay updated CXF-5038:
----------------------------------
Description:
It would be useful to be able to handle how a beans are traduced into
QueryParams.
I can see something like a ParametersWriter<T> and a ParametersReader<T> to
achieve this goal.
Ex.
Let's say that you have the object "ComplexeObject" that you want to pass by a
"GET" call to a REST api. You could annotate the object with a @QueryParam in
the method signature and implement a ParametersWriter that will create the
parameters for you.
public class ParametersWriter<ComplexeObject> {
writeParameters(ComplexeObject object, Map<String, List<Object>> params) {
params.put(..., ...);
params.put(..., ...);
}
}
Then, on the server side, you could have a ParametersReader<ComplexeObject>
that can rebuild the object from the request's parameters.
was:
It would be useful to be able to handle how a bean is traduced into QueryParam.
I can see something like a ParametersWriter<T> and a ParametersReader<T> to
achieve this goal.
Ex.
Let's say that you have the object "ComplexeObject" that you want to pass to by
a "GET" call to a REST api as a set of parameters. You could annotate the
parameter with a @QueryParam and implement a ParametersWriter that will create
the parameters for you.
public class ParametersWriter<ComplexeObject> {
writeParameters(ComplexeObject object, Map<String, List<Object>> params) {
params.put(..., ...);
params.put(..., ...);
}
}
Then, on the server side, you could have a ParametersReader<ComplexeObject>
that can rebuild the object from the request's parameters.
> More flexible QueryParams
> -------------------------
>
> Key: CXF-5038
> URL: https://issues.apache.org/jira/browse/CXF-5038
> Project: CXF
> Issue Type: New Feature
> Reporter: Vincent Tremblay
>
> It would be useful to be able to handle how a beans are traduced into
> QueryParams.
> I can see something like a ParametersWriter<T> and a ParametersReader<T> to
> achieve this goal.
> Ex.
> Let's say that you have the object "ComplexeObject" that you want to pass by
> a "GET" call to a REST api. You could annotate the object with a @QueryParam
> in the method signature and implement a ParametersWriter that will create the
> parameters for you.
> public class ParametersWriter<ComplexeObject> {
>
> writeParameters(ComplexeObject object, Map<String, List<Object>> params) {
> params.put(..., ...);
> params.put(..., ...);
> }
> }
> Then, on the server side, you could have a ParametersReader<ComplexeObject>
> that can rebuild the object from the request's parameters.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira