First, i'm not from a country that's speak english , so if my english is bad, estranged sorry, ok?
I'm try to use Generics interfaces (I use the generics of Java 5 too, but that is not i'm talking about), but i think that is work with Acegi. I'm newbie in Acegi, if you can help me...
The problem is this:
I have a GenericDAO (GenericService with this problem too) interface and a AbstractGenericDAO and finalya concrete class, like ClientDAO, USerDAO, so on...
I what to secure the concrete class but i cant, i think that i can't do. Look at the xml:
<property name="objectDefinitionSource">
<value>
services.ClientDAO.makePersistent=ROLE_CLIENT_CREATE <- DON'T WORK
service.GenericDAO.makeTransient=ROLE_CLIENTE_DELETE <- THIS WORK
</value>
</property>
I think this work's that way beacuse my Service (that works with dao) uses teh GenericDAOInterface:
private GenericDAO dao;
@SuppressWarnings("unchecked")
public T makePersistent(T entity) {
return (T) dao.makePersistent(entity);
}
@SuppressWarnings("unchecked")
public void makeTransient(ID id) {
Object entity = dao.findById(id,true);
dao.makeTransient(entity);
}
// others methods.
The same problem occurs with the web -> service ....
What can i do to resolv this problem??? - Please, dont make read the documentation(again), she is not simple to understand!!!
- [Acegisecurity-developer] GENERICS WITH ACEGI Angelo Luis
