|
|
|
I didn't read this as a request to allow the names to differ, but more as a request for an additional startup-time sanity check. For example, doing
public final static String PROPERTY_ID = "id"; @InputProperty(name=PROPERTY_ID) public void setSomeOtherPropertyName(int id) { } would throw a configuration error during RIFE's inital parsing of the site structure. Right now you can declare a property name as a static string and refer to it from other classes, but there is nothing to prevent that property name from referring to some property that isn't even present on the element. Autolinking doesn't take care of that problem entirely, because it still relies on keeping names in sync by hand. If I have an autolink and I change a property name on one side, that property will simply silently stop being linked. Mike, do I have your intent right? This idea, if it happens, should also be applied to submission handlers; see
Steven,
You are right. The main idea is to have all constants for property names automatically checked. That makes sense then and shouldn't be very hard to implement.
Implemented for all property related annotations, not just input and output.
| |||||||||||||||||||||||||||||||||||||||||||||||||
However, to be able to support this annotation, there need to be another mapping layer that links the data entity names to the actual setter and getter names. This is needed because people can specify a different name through this annotation.
While this can be added, I'm not sure that the additional layer of complexity is warranted in reality (since it has to be added to the lowest layer, which is the one that performs the bijection). I'm saying this because I implemented
RIFE-269today and I think that you actually might end up using that instead. What do you think?