Class NonEmptyValidatingInputTable

java.lang.Object
io.deephaven.server.table.inputtables.AbstractBaseValidatingInputTable
io.deephaven.server.table.inputtables.NonEmptyValidatingInputTable
All Implemented Interfaces:
InputTableUpdater

@TestUseOnly public class NonEmptyValidatingInputTable extends AbstractBaseValidatingInputTable
This is an example of an InputTableUpdater that validates that the values in a String column are not empty.

This class wraps an existing input table, and before performing the underlying validation performs its own validation that the column does not contain empty strings.

This class is intended for testing and demonstrating validation functionality, it is not production ready and may be changed or removed at any time.

  • Method Details

    • make

      public static Table make(Table input, String column)
      Wrap input, which must be an input table into a new input table that validates that the values in column are not empty.
      Parameters:
      input - the table to wrap
      column - the column to validate, must be a String type
      Returns:
      a new input table that validates column is not empty
    • getColumnRestrictions

      @Nullable public @Nullable List<com.google.protobuf.Any> getColumnRestrictions(String columnName)
      Description copied from interface: InputTableUpdater
      If there are client-side defined restrictions on this column, return them as a list of protobuf Any messages. These restrictions are used by the client for properly displaying and validating the edit field.

      The restrictions are packed as google.protobuf.Any messages, which allows for different restriction types (e.g., IntegerRangeRestriction, DoubleRangeRestriction, StringListRestriction, etc.) to be sent to the client. The client is responsible for unpacking and interpreting these restrictions.

      Specified by:
      getColumnRestrictions in interface InputTableUpdater
      Specified by:
      getColumnRestrictions in class AbstractBaseValidatingInputTable
      Parameters:
      columnName - the column name to query
      Returns:
      a list of protobuf Any messages representing the restrictions for this column, or null if no client-side restrictions are supplied for this column
    • validateAddOrModify

      public void validateAddOrModify(Table tableToApply)
      Description copied from interface: InputTableUpdater
      Helper to check if a table is compatible with this table, so that it could be added as contents.
      Specified by:
      validateAddOrModify in interface InputTableUpdater
      Specified by:
      validateAddOrModify in class AbstractBaseValidatingInputTable
      Parameters:
      tableToApply - the table to check if it can used to add or modify this input table