-
Jan 28th, 2008, 10:11 PM
#1
can asjectJ handle the "block everything except certain call path pattern" ?
Hi,
suppose I have a DAO class:
class DAO {
... access methods...
}
and a specific controller class(say user info maintainance):
class MySpecificController {
DAO dao;
public updateUser() {
dao.update(userInfo);
}
}
Currently, I have a pointcut that basically block/check DAO.* and deny/limits read/write.
What I would like to do is that if the access is from within MySpecficController, I would let go of this constrain.
For the above simple case, I can use "call(public * DAO.*(..))" and access the pjp.getThis() which should be MySpecificController something.
But if I have a case like this :
MySpcificController.someMethod -> some genericClass.Method -> ... -> DAO.method. That is the access may not be a direct call but going through certain layer which ends up in the method I trap.
How would I be able to know that it is done in the 'allowable call path' and lex the constraint ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules