You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Juergen Zimmermann (JIRA)" <ji...@apache.org> on 2009/12/11 11:33:18 UTC

[jira] Created: (WINK-239) Support for generics as return type

Support for generics as return type
-----------------------------------

                 Key: WINK-239
                 URL: https://issues.apache.org/jira/browse/WINK-239
             Project: Wink
          Issue Type: New Feature
            Reporter: Juergen Zimmermann
             Fix For: 1.0


It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.

@GET
@Path("/customers")
@Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
public List<Customer> findCustomers(...)

The Jersey solution: Use classname + "s", e.g. <Customers>
The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"

Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-239) Support for generics as return type

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792486#action_12792486 ] 

Hudson commented on WINK-239:
-----------------------------

Integrated in Wink-Trunk-JDK1.6-itests #53 (See [http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK1.6-itests/53/])
    [#] Add wink-jaxbcollection-provider module to wink-providers pom


> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WINK-239) Support for generics as return type

Posted by "Jesse Ramos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Ramos updated WINK-239:
-----------------------------

    Component/s: Providers

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-239) Support for generics as return type

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792452#action_12792452 ] 

Hudson commented on WINK-239:
-----------------------------

Integrated in Wink-Trunk-JDK1.5-itests #52 (See [http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK1.5-itests/52/])
    [#] Add wink-jaxbcollection-provider module to wink-providers pom


> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-239) Support for generics as return type

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792084#action_12792084 ] 

Michael Elman commented on WINK-239:
------------------------------------

One question regarding the packaging: what was the reason for creating a separate module under wink-providers for this functionality?
I briefly looked at the code and didn't see any additional dependencies...
I think that we decided to create new modules only for providers that need dependencies that were not already included in wink-server/wink-common.
I mean: if wink-common contains enough dependencies for the provider - put it there.
Otherwise if wink-server contains enough dependencies - put it there.
Otherwise put it in a separate module.

May be I'm missing something though...

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-239) Support for generics as return type

Posted by "Jesse Ramos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796808#action_12796808 ] 

Jesse Ramos commented on WINK-239:
----------------------------------

I went ahead and moved the providers into the wink-common module. The changes were made with revisions 896181 and 896183

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (WINK-239) Support for generics as return type

Posted by "Jesse Ramos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on WINK-239 started by Jesse Ramos.

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-239) Support for generics as return type

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792098#action_12792098 ] 

Hudson commented on WINK-239:
-----------------------------

Integrated in Wink-Trunk-JDK1.5 #250 (See [http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK1.5/250/])
    [#] Add wink-jaxbcollection-provider module to wink-providers pom


> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-239) Support for generics as return type

Posted by "Jesse Ramos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792088#action_12792088 ] 

Jesse Ramos commented on WINK-239:
----------------------------------

I think the primary motivation for creating a new module was simply that we weren't planning on this being a default provider. I'm not opposed to moving it if others agree that's the correct thing to do in this case.

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WINK-239) Support for generics as return type

Posted by "Jesse Ramos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Ramos reassigned WINK-239:
--------------------------------

    Assignee: Jesse Ramos

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-239) Support for generics as return type

Posted by "Michael Elman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792104#action_12792104 ] 

Michael Elman commented on WINK-239:
------------------------------------

If you don't want it to be registered by default, just don't add it to a relevant 'wink-providers' file.
IMO, if there is no reason for creating a separate jar - do not create it.

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WINK-239) Support for generics as return type

Posted by "Jesse Ramos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Ramos resolved WINK-239.
------------------------------

    Resolution: Fixed

I've made an initial drop of the jaxb collection support. We went with the Jersey style since we added providers for both Collections and arrays.

> Support for generics as return type
> -----------------------------------
>
>                 Key: WINK-239
>                 URL: https://issues.apache.org/jira/browse/WINK-239
>             Project: Wink
>          Issue Type: New Feature
>          Components: Providers
>            Reporter: Juergen Zimmermann
>            Assignee: Jesse Ramos
>             Fix For: 1.0
>
>
> It would be good if Wink supports generics as a return type of resource methods (as does Jersey and RESTEasy), e.g.
> @GET
> @Path("/customers")
> @Produces({APPLICATION_XML, TEXT_XML, APPLICATION_JSON})
> public List<Customer> findCustomers(...)
> The Jersey solution: Use classname + "s", e.g. <Customers>
> The RESTEasy solution: Use classname + "Collection", e.g. "CustomerCollection"
> Actually I'd prefer the RESTEasy naming. The Jersey naming is also fine - it's more important that Wink supports generics at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.