Package com.vaadin.componentfactory
Klasse TabConverter
java.lang.Object
com.vaadin.componentfactory.TabConverter
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.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic StringconvertIfNeeded(String deltaJson) Detects whether a delta JSON string contains old-format tab blots and converts if needed.static StringconvertToNewFormat(String oldDeltaJson) Converts a delta JSON string from the old ERTE tab format to the new prototype format.
-
Konstruktordetails
-
TabConverter
public TabConverter()
-
-
Methodendetails
-
convertIfNeeded
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
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
-