Class TableColumnAttributeBuilder

java.lang.Object
org.elasticsearch.xpack.core.common.table.TableColumnAttributeBuilder

public final class TableColumnAttributeBuilder extends Object
Helper to build RestTable display attributes
  • Constructor Details

    • TableColumnAttributeBuilder

      public TableColumnAttributeBuilder()
  • Method Details

    • builder

      public static TableColumnAttributeBuilder builder()
    • builder

      public static TableColumnAttributeBuilder builder(String description)
    • builder

      public static TableColumnAttributeBuilder builder(String description, boolean display)
    • setAliases

      public TableColumnAttributeBuilder setAliases(String... aliases)
      Set the various aliases available to this column The API consumer can supply one of these strings in the parameter flags instead of the full column name Default: no configured aliases
      Parameters:
      aliases - Non-null array of strings
    • setDisplayByDefault

      public TableColumnAttributeBuilder setDisplayByDefault(Boolean displayByDefault)
      Whether or not to display the column by default Default: true, always display the column
      Parameters:
      displayByDefault - When false, the user must specify to display the column in the REST request
    • setDescription

      public TableColumnAttributeBuilder setDescription(String description)
      Human readable description of the column. Consumed via the `help` REST call. Default: "not available"
      Parameters:
      description - Human readable description
    • setTextAlignment

      public TableColumnAttributeBuilder setTextAlignment(TableColumnAttributeBuilder.TextAlign textAlignment)
      Text alignment for the column when building the table Default: TableColumnAttributeBuilder.TextAlign.LEFT
      Parameters:
      textAlignment - The desired text alignment
    • setSibling

      public TableColumnAttributeBuilder setSibling(String sibling)
      The sibling column for this column If a normal column is included and the sibling is requested, then the sibling is included as well Example: Cat indices, requesting `pri` and wanting the `cs` columns (which have a sibling, pri.cs) GET _cat/indices?pri&h=cs&v ss pri.ss 290kb 290kb 230b 230b Default: No sibling
      Parameters:
      sibling - The sibling column prefix
    • build

      public String build()