From: <Chr...@ge...> - 2001-08-31 15:04:42
|
Hi Folks, we are currently trying to use Jython to give users the possibility to enter python scripts to automate some steps in a Java application we are developing. We want to provide the users an API with Java Classes. But we want to restrict the user that he can only use these public Classes from the API. For this we first set Options.respectJavaAccessibility to true. To be able to restrict the user to the API the introduced a new interface JavaAccessInterceptor and made some small changes to class PyJavaClass. Mainly a new method setJavaAccessInterceptor(JavaAccessInterceptor anInterceptor) to set an interceptor and a call of the interceptor in the methods getAccessibleConstructors, getAccessibleFields and getAccessibleMethods. I did this changes in the python version 2.0. but I think it is also possible in the version 2.1a3. We think the change can be useful for other jython users and would like if you are able to ingrate the changes or provide something similar. What do you think about this ? Probably it would be better to call the interceptor also in the case when Options.respectJavaAccessibility is set to false..... Regards Christian. (See attached file: src.jar) |