Results 1 to 5 of 5

Thread: How work with generics and inheritance in Acegi ???

  1. #1

    Default 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. #2
    Join Date
    Aug 2005
    Location
    Bologna, Italy
    Posts
    79

    Default

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

  3. #3

    Default

    something like that!!!

    I implement the GenericDAO interface using the Hibernate3DaoSupport ..

  4. #4
    Join Date
    Aug 2005
    Location
    Bologna, Italy
    Posts
    79

    Default

    Quote 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.

  5. #5
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •