Klasse TabConverter

java.lang.Object
com.vaadin.componentfactory.TabConverter

public class TabConverter extends Object
Converter for transforming old ERTE tab delta format to the new prototype format.

This class handles the conversion of legacy tab-related blots (tab, line-part, tabs-cont, pre-tab) to the simplified new format while preserving all other content and formatting.

  • Konstruktordetails

    • TabConverter

      public TabConverter()
  • Methodendetails

    • convertIfNeeded

      public static String convertIfNeeded(String deltaJson)
      Detects whether a delta JSON string contains old-format tab blots and converts if needed. Returns the value unchanged if it does not contain old-format markers. Handles both array format ([{...}]) and object format ({"ops":[{...}]}).
      Parameter:
      deltaJson - the delta JSON string (may be old or new format)
      Gibt zurück:
      the converted delta JSON string, or the original if no conversion needed
    • convertToNewFormat

      public static String convertToNewFormat(String oldDeltaJson)
      Converts a delta JSON string from the old ERTE tab format to the new prototype format.
      Parameter:
      oldDeltaJson - the old delta JSON string
      Gibt zurück:
      the converted delta JSON string in the new format