You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Carsten Ziegeler <cz...@apache.org> on 2007/12/12 15:17:12 UTC

Change ResourceResolver interface

Hi, I think now that we have come to an agreement about the new Sling
API we should start thinking about a redesign...

(Ok, just kidding, more serious stuff below)
I think we should change the signature of the
ResourceResolver.resolve(ServletRequest) method to
ResourceResolver.resolve(HttpServletRequest).

All implementations so far directly cast (without a check) to
HttpServletRequest, so it seems to make more sense to directly demand a
HttpServletRequest object anyway.

WDYT?

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Change ResourceResolver interface

Posted by Carsten Ziegeler <cz...@apache.org>.
Alexander Klimetschek schrieb:
> Hi guys,
> 
> that sounds good. One of my greatest needs as a RESTful developer is
> direct and easy access to all the HTTP related stuff in my scripts and
> other application code. For example in Cocoon it's not that good, since
> the Cocoon API has it's own request information layer that makes it
> difficult to get to the HTTP servlet API objects.
Yepp, that's why we changed it with Cocoon 2.2 :) and took care to not
repeat this mistake again with Sling :) (To be fair, it wasn't a mistake
in Cocoon when we did this back in 2000)

Carsten
> It's good to write
> things like sendError(400, "Failure") in one line.
> 



-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Change ResourceResolver interface

Posted by Alexander Klimetschek <ak...@day.com>.
Hi guys,

that sounds good. One of my greatest needs as a RESTful developer is  
direct and easy access to all the HTTP related stuff in my scripts and  
other application code. For example in Cocoon it's not that good,  
since the Cocoon API has it's own request information layer that makes  
it difficult to get to the HTTP servlet API objects. It's good to  
write things like sendError(400, "Failure") in one line.

Just my 2 cents...
Alex


Am 12.12.2007 um 15:36 schrieb Bertrand Delacretaz:

> On Dec 12, 2007 3:17 PM, Carsten Ziegeler <cz...@apache.org>  
> wrote:
>
>> ...I think we should change the signature of the
>> ResourceResolver.resolve(ServletRequest) method to
>> ResourceResolver.resolve(HttpServletRequest)...
>
> +1
>
> -Bertrand

----------------------------< alexander.klimetschek@day.com >---
Alexander Klimetschek, Day Management AG, Barfuesserplatz 6,
CH - 4001 Basel, T +41 61 226 55 31, M +49 151 15 77 20 56
---------------------------------------< http://www.day.com >---

Xing: http://www.xing.com/go/invite/3268380.32d2d4
LinkedIn: http://www.linkedin.com/in/klimetschek
Blog: http://weblogs.goshaky.com/weblogs/alexkli/










Re: Change ResourceResolver interface

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Dec 12, 2007 3:17 PM, Carsten Ziegeler <cz...@apache.org> wrote:

> ...I think we should change the signature of the
> ResourceResolver.resolve(ServletRequest) method to
> ResourceResolver.resolve(HttpServletRequest)...

+1

-Bertrand

Re: Change ResourceResolver interface

Posted by Felix Meschberger <fm...@gmail.com>.
Am Mittwoch, den 12.12.2007, 15:17 +0100 schrieb Carsten Ziegeler:
> Hi, I think now that we have come to an agreement about the new Sling
> API we should start thinking about a redesign...
> 
> (Ok, just kidding, more serious stuff below)
> I think we should change the signature of the
> ResourceResolver.resolve(ServletRequest) method to
> ResourceResolver.resolve(HttpServletRequest).
> 
> All implementations so far directly cast (without a check) to
> HttpServletRequest, so it seems to make more sense to directly demand a
> HttpServletRequest object anyway.
> 
> WDYT?

+1

Makes sense.

Regards
Felix


Re: Change ResourceResolver interface

Posted by Carsten Ziegeler <cz...@apache.org>.
I changed the interface and impls.

Carsten

Carsten Ziegeler wrote:
> Hi, I think now that we have come to an agreement about the new Sling
> API we should start thinking about a redesign...
> 
> (Ok, just kidding, more serious stuff below)
> I think we should change the signature of the
> ResourceResolver.resolve(ServletRequest) method to
> ResourceResolver.resolve(HttpServletRequest).
> 
> All implementations so far directly cast (without a check) to
> HttpServletRequest, so it seems to make more sense to directly demand a
> HttpServletRequest object anyway.
> 
> WDYT?
> 
> Carsten


-- 
Carsten Ziegeler
cziegeler@apache.org