[jboss-dev-forums] [Design of JBoss Portal] - PortletInvoker interception refactoring

julien@jboss.com do-not-reply at jboss.com
Wed Dec 13 05:50:21 EST 2006


I am willing to make a refactor of the portlet invoker interception. Today we only intercept render/action. We need to intercept all other business methods.

The goal is to provide interception of all methods, for example :
- security (all operations needs to be protected)
- it will make the implementation of the ProducerPortletInvoker turnable into an interceptor (which is what it is actually as it implements a subset of operations and let some of them go through to the delegate).

The change I intend to make are :

for each PortletInvoker operation (except action/render), create a subclass of PortletInvocation that contains the method parameters.


  | public class GetPropertiesInvocation extends PortletInvocation
  | {
  |    private PortletContext portletContext;
  |    private Set keys;
  |    // etc...
  | }
  | 

Provide a portlet invoker that detypes all operations and one that can dispatch all operations to the portlet invoker interface.

I know it is very similar to what AOP does, but I don't want to use AOP for the reason that I don't want to lose type safety which can break so easily in refactorings.

There should be no impact on the codebase except in portlet container and in the wiring of the different services that will need to be updated.

I will most likely do that next Thursday/Friday.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993330#3993330

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993330



More information about the jboss-dev-forums mailing list