Class ValidationSubContext
java.lang.Object
com.onenetwork.platform.data.validation.ValidationSubContext
public class ValidationSubContext
extends java.lang.Object
Describes a validation "subcontext". A subcontext further qualifies data
which may be passed to a "context".
For example, a context like "ZBKS.OrderCancellation" might have a subcontext
for "OrderHeader" and another for "OrderLine", allowing validation rules
to examine both.
-
Constructor Summary
Constructors Constructor Description ValidationSubContext(java.lang.String name, boolean allowMultiple, java.util.List<Pair<java.lang.String,java.lang.String>> bindingKeyLabelKeyPairs)
ValidationSubContext(java.lang.String name, boolean allowMultiple, java.util.List<Pair<java.lang.String,java.lang.String>> bindingKeyLabelKeyPairs, java.util.List<java.lang.String> fieldNames)
-
Method Summary
Modifier and Type Method Description java.util.List<Pair<java.lang.String,java.lang.String>>
getBindingKeyLabelKeyPairs()
List of pairs, where first entry in each pair is a key bound for evaluation, and the second entry in each pair is an i18n label key for the same.java.util.List<java.lang.String>
getFieldNames()
java.lang.String
getName()
Name of the SubContextboolean
isAllowMultiple()
Indicates whether if multiple values may be bound to this subContext in a single execution.
-
Constructor Details
-
ValidationSubContext
public ValidationSubContext(java.lang.String name, boolean allowMultiple, java.util.List<Pair<java.lang.String,java.lang.String>> bindingKeyLabelKeyPairs)- Parameters:
name
- name of this SubContextallowMultiple
- true if multiple values may be bound to this subContext in a single execution. For example, for a context "OrderUpdate", you might have one subContext called "Order" with allowMultiple = false, and another subContext called "OrderLine" with allowMultiple = true, since there could be many lines per orderbindingKeyLabelKeyPairs
- list of pairs, where first entry in each pair is a key bound for evaluation, and the second entry in each pair is an i18n label key for the same
-
ValidationSubContext
public ValidationSubContext(java.lang.String name, boolean allowMultiple, java.util.List<Pair<java.lang.String,java.lang.String>> bindingKeyLabelKeyPairs, java.util.List<java.lang.String> fieldNames)- Parameters:
name
- name of this SubContextallowMultiple
- true if multiple values may be bound to this subContext in a single execution. For example, for a context "OrderUpdate", you might have one subContext called "Order" with allowMultiple = false, and another subContext called "OrderLine" with allowMultiple = true, since there could be many lines per orderbindingKeyLabelKeyPairs
- list of pairs, where first entry in each pair is a key bound for evaluation, and the second entry in each pair is an i18n label key for the samefieldNames
- is a list of fieldNames that can be registered by the modules to list field in the ValidationRules FieldNames combo
-
-
Method Details
-
getName
public java.lang.String getName()Name of the SubContext -
isAllowMultiple
public boolean isAllowMultiple()Indicates whether if multiple values may be bound to this subContext in a single execution. For example, for a context "OrderUpdate", you might have one subContext called "Order" with allowMultiple = false, and another subContext called "OrderLine" with allowMultiple = true, since there could be many lines per order -
getBindingKeyLabelKeyPairs
List of pairs, where first entry in each pair is a key bound for evaluation, and the second entry in each pair is an i18n label key for the same. -
getFieldNames
public java.util.List<java.lang.String> getFieldNames()- Returns:
- the fieldNames
-