Custom XML is transformed to Strings or Java collections by the following rules:
Elements with just text (no child elements or attributes) become Strings Elements with child elements or attributes become Maps containing data derived from their subelements Repeating elements (more than one of the same name at the same level) become Lists Sample XML: Map <validator>
<mapCustomProperty key1="value1" key2="value2" />
</validator>
List of String <validator>
<listCustomProperty>ListElement1</listCustomProperty>
<listCustomProperty>ListElement2</listCustomProperty> </validator>
List of Map <validator>
<mapCustomProperty key1="value1" key2="value2" />
<mapCustomProperty key1="value1" key2="value2" />
</validator>
java.lang.String
getProperty(java.lang.String property)
java.lang.Object
getScriptImports()
java.lang.String
getServerCondition()
java.lang.String
getType()
boolean
isClientOnly()
boolean
isServerOnly()
boolean
isStopIfFalse()
public java.lang.String getProperty(java.lang.String property)
property
- the name of the attributeValidator.getObjectProperty(String)
, Validator.getListProperty(String)
, Validator.getMapProperty(String)
public java.lang.Object getObjectProperty(java.lang.String property)
<validator>
<mapCustomProperty key1="value1" key2="value2" />
</validator>
List of String <validator>
<listCustomProperty>ListElement1</listCustomProperty>
<listCustomProperty>ListElement2</listCustomProperty> </validator>
List of Map <validator>
<mapCustomProperty key1="value1" key2="value2" />
<mapCustomProperty key1="value1" key2="value2" />
</validator>
property
- the name of the element(s)Validator.getProperty(String)
, Validator.getListProperty(String)
, Validator.getMapProperty(String)
public java.util.List getListProperty(java.lang.String property)
property
- the name of the attributejava.lang.ClassCastException
- if requested property is not instanceof ListValidator.getProperty(String)
, Validator.getObjectProperty(String)
, Validator.getMapProperty(String)
public java.util.Map getMapProperty(java.lang.String property)
property
- the name of the attributejava.lang.ClassCastException
- if requested property is not instanceof MapValidator.getProperty(String)
, Validator.getObjectProperty(String)
, Validator.getListProperty(String)
public boolean isClientOnly()
public boolean isServerOnly()
public boolean isStopIfFalse()
public java.lang.String getErrorMessage()
public java.lang.String getServerCondition()
public java.lang.Object getScriptImports()
public java.lang.String getLanguage()
public java.lang.String getType()
public void addErrorMessageVariable(java.lang.String name, java.lang.String value)
name
- the name to give the variable in the contextvalue
- the value to associate with the variablepublic java.util.Map getErrorMessageVariables()
public ErrorMessage evaluateErrorMessage(ErrorMessage error) throws java.lang.Exception
The
- message text to evaluatejava.lang.Exception