Announcement Announcement Module
Collapse
No announcement yet.
How work with generics and inheritance in Acegi ??? Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How work with generics and inheritance in Acegi ???

    This is my problem


    I have a abstract GenericDao and all my DAO's extended from him...

    So how do i configure Acegi to do the MethodSecurityIntercptor works with my concrete DAO's???

    <bean id="securityInterceptor" class="org.acegisecurity.intercept.method.aopallia nce.MethodSecurityInterceptor">
    ......
    <property name="objectDefinitionSource">
    <value> services.ClientDAO.makePersistent=ROLE_CLIENT_CREA TE <- DONT WORK
    service.GenericDAO.makeTransient=ROLE_CLIENTE_DELE TE <- WORK'S FINE</value>
    </property>
    </bean>

    the problem that i can't do roles works with generic's.... if i have a ProductDAO and a role ROLE_PRODUCT, he will work in ClientDAO because both only works with the GenericDAO....

    Any solution???

    AHhh, i have a problem too...

    If i have a GenericDAO interface, e a GenericDAOAbstract abstract class that implement the method's of him and finaly a concrete class that extends GenericDAOAbstract, like ClientDAO and ProductDAO i can't do this ;

    services.ClientDAO.makePersistent=ROLE_CREATE

    because teh Spring tells that the ClientDAO dont have the makePersistent method (inherited from the GenericDAOAbstract that implements GenericDAO)... If a just override and call super() then the Spring don't acuse any error...




    OBS: Sorry if my english is bad, ok?

  • #2
    You are using this pattern http://www.hibernate.org/328.html ?

    Comment


    • #3
      something like that!!!

      I implement the GenericDAO interface using the Hibernate3DaoSupport ..

      Comment


      • #4
        Originally posted by angelogalvao
        something like that!!!

        I implement the GenericDAO interface using the Hibernate3DaoSupport ..
        I've sent you a private message that's about your implementation not on the issue at hand.

        Comment


        • #5
          See also http://opensource2.atlassian.com/pro.../browse/SEC-99

          Comment

          Working...
          X