|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface ERXProperties.Operator
Property operators work like array operators. In your properties, you can define keys like:
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.
Method Summary | |
---|---|
com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.String> |
compute(java.lang.String key,
java.lang.String value,
java.lang.String parameters)
Performs some computation on the key, value, and parameters and returns a dictionary of new properties. |
Method Detail |
---|
com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.String> compute(java.lang.String key, java.lang.String value, java.lang.String parameters)
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")
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |