Hello,
I’ve created a new cdiext
project at github, initially with two extensions:
1. Stackable Security Interceptors, about which I blogged here and here. Example usage:
1 2 3 4 5 6 7 8 9 10 | @SecureBinding @Secure("#{loggedInUser.administrator}") public @interface AdministratorOnly { } public class SecureBean { @AdministratorOnly @Secure("#{additionalSecurityCheck}") public void doSecret() { ... } } |
2. Injectable ELEvaluator, which works both during a faces request and outside of one (e.g. during invocation of an MDB). Example usage:
1 2 3 4 5 6 7 8 9 | @Inject private ELEvaluator elEvaluator; void someMethod() { // ... Integer result = elEvaluator.evaluate( "#{testParam1 + 10 + testParam2}", Integer.class, params); // ... } |
Thanks to Dan Allen for helping out with this one.
There are also some tests done using Arquillian – looks like it’s going to be a great testing tool! :)
Adam