Class ScriptingNormalizer
java.lang.Object
org.iplass.mtp.entity.definition.NormalizerDefinition
org.iplass.mtp.entity.definition.normalizers.ScriptingNormalizer
- All Implemented Interfaces:
- Serializable
 This is the Normalizer definition by Script. 
 It is implemented to return the normalized value.
 When the asArray flag is set to true, if the validation target is an array,
 it will be passed as an array to the value of the Normalizer Script.
 
Variables that can be referenced from within the script
- entity:Instance of the Entity
- propertyName:The property name to be normalized of the Entity
- value:Value of the property of the Entity instance to be normalized
- context:An instance of ValidationContext
Script Code Example
 if (value == null) {
   return null;
 }
 if (!value.startsWith('p_') {
   return 'p_' + value;
 } else {
   return value;
 }
 - See Also:
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
ScriptingNormalizerpublic ScriptingNormalizer()
- 
ScriptingNormalizer
 
- 
- 
Method Details- 
isAsArraypublic boolean isAsArray()
- 
setAsArraypublic void setAsArray(boolean asArray) 
- 
getScript
- 
setScript
 
-