>Have you researched on using CDI interceptors for this?
No, I've not looked at a solution that involved CDI interceptors for this.
>So what about injecting pagination info via CDI?
I think that it makes sense for users to be able to simply use their existing classes with AeroGear Controller by configuring their routes and not have to touch existing code. This is what I liked about liked with Bruno's suggestion. Using any of the suggestions here, and my previous suggestion with having a specific response type, all have this disadvantage. But this might just be wishful thinking and we might simply discover that this is required when more functionality is added hence might as well do this now.
>Another option would be to have the method receiving the PaginationInfo
>parameter, which would eliminate the need for annotations and stuff - if>you put the parameter on the signature, the response will be wrapped
>automagically.I that case I think it makes more sense to go with a solution of having a specific return type on the method. The information in PaginationInfo would already be available to the target endpoint methods as parameters (offset/limit) and it would use something like was suggested earlier in this thread. I just think that might be more clear about what is actually going on.
I'll start looking into using an CDI interceptor solution and see how this would work. I'll also take a look at the other approach with using PaginationInfo. As we don't have much time here it would be great if we as a team can decide on one solution by the end of today (2012-0122).
>We already got rid of total :)
Glad to hear that :)