]
Davide Sottara commented on DROOLS-582:
---------------------------------------
I already have something in progress, please contact me in private, help is welcome
Davide
Have all declared type instance implement a helper interface
------------------------------------------------------------
Key: DROOLS-582
URL:
https://issues.jboss.org/browse/DROOLS-582
Project: Drools
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Benoit Voisin
Assignee: Mark Proctor
Following DROOLS-546, and to provide simple and safe access to FactType instances in Java
code, we could have each instance implement an interface looking like :
interface DeclaredFact {
boolean hasField(String name);
void setFieldValue(String name, Object value);
Object getFieldValue(String name);
FactType getKieFactType(); //RQ: possible on name collisions with existing kieFactType
field
}
The setField/getField should throw proper exceptions for unknown fields.