I want to enforce model rules using EL, so I might have something like
@CONSTRAINT("#{doorSet.count == 4}")
public void getDoorSet(){
[...]
In this way, the rule itself is not some super secret validator someplace. It's a straight evaluation.
Second, I would like to dynamically create an EL statement, in a string buffer. Is there a way I can evaluate this object against this constraint? I looked at using the EL tools that Seam now uses, but I don't see anything like an eval statement. I was hoping to get something like:
boolean result = ELFactory,getInstance().evaluateEL(elStatement, MyClass.Home.getInstance() );
Thoughts? Can I do anything like this now, or am I SOW?