Public Member Functions | |
| NSDictionary< String, String > | compute (String key, String value, String parameters) |
er.extensions.akey.@someOperatorKey.aparameter=somevalue
Which will be processed by the someOperatorKey operator. Because properties get handled very early in the startup process, you should register operators somewhere like a static block in your Application class. For instance, if you wanted to register the forInstance operator, you might put the following your Application class:
static { ERXProperties.setOperatorForKey(new ERXProperties.InRangeOperator(100), ERXProperties.InRangeOperator.ForInstanceKey); }
It's important to note that property operators evaluate at load time, not access time, so the compute function should not depend on any runtime state to execute. Additionally, access to other properties inside the compute method should be very carefully considered because it's possible that the operators are evaluated before all of the properties in the system are loaded.
Performs some computation on the key, value, and parameters and returns a dictionary of new properties. If this method returns null, the original key and value will be used. If any other dictionary is returned, the properties in the dictionary will be copied into the destination properties.
| key | the key ("er.extensions.akey" in "er.extensions.akey.@someOperatorKey.aparameter=somevalue") | |
| value | ("somevalue" in "er.extensions.akey.@someOperatorKey.aparameter=somevalue") | |
| parameters | ("aparameter" in "er.extensions.akey.@someOperatorKey.aparameter=somevalue") |
Implemented in ERXProperties.InRangeOperator, and ERXProperties.EncryptedOperator.
1.5.8