PDA

View Full Version : Pointcut syntax with polymorphism



persapiens
Jul 14th, 2005, 12:45 PM
I have a class ToyManager with two methods: insertCar and insertBall. The pointcut is defined below:

<bean id="modelSecurityInterceptor" class="net.sf.acegisecurity.intercept.method.aopalliance. MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="modelAuthenticationManager"/></property>
<property name="accessDecisionManager"><ref bean="httpRequestAccessDecisionManager"/></property>
<property name="objectDefinitionSource">
<value>
ToyManager.insertCar=ROLE_CAR
ToyManager.insertBall=ROLE_BALL
</value>
</property>
</bean>

I want to use polymorphism. Changing method signatures, the methods become insert, with different arguments: insert(Car car) and insert(Ball ball). How can I rewrite the pointcut above to use polymorphism?