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 SubContext
    boolean isAllowMultiple()
    Indicates whether if multiple values may be bound to this subContext in a single execution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 SubContext
      allowMultiple - 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 order
      bindingKeyLabelKeyPairs - 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 SubContext
      allowMultiple - 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 order
      bindingKeyLabelKeyPairs - 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
      fieldNames - 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

      public 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.
    • getFieldNames

      public java.util.List<java.lang.String> getFieldNames()
      Returns:
      the fieldNames