struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <>
Subject Re: [Idea] Add ability for decorator pattern in Actions
Date Tue, 16 Jul 2013 19:30:02 GMT

On Fri, Jul 12, 2013 at 11:42 AM, Miguel Almeida <> wrote:
> I'd like to discuss with you an idea that came up a while ago while
> trying to fulfil this need:
> As a developer
> I want to unit test annotations in my actions without having to run the
> method's body
> So that I can TDD more effectively and have quicker unit tests.
> Namely, imagine an action:
> @SecuredRoles("admin")
> public String adminStuff(){
> ...
> }
> It would be interesting to have a way to test the @SecuredRoles without
> having to run the method's body.
> It would be very interesting to support the Decorator Pattern in Struts
> actions. What are your thoughts on it?

I am currently unsure if it would be so much benefit over the
interceptors we already have.
I mean, you can mock interceptors with actions, they are testable.
Maybe you can elaborate a bit more on that, because I think i missed
your key point.

reading this message I was thinking if looking at AOP would make
sense. What are your feeling on
having an AOP plugin which supports some AOP framework?

or what were your ideas for the implementation inside struts?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message