Class ThemeToFormVersionUpdate

  • All Implemented Interfaces:
    IOrderable, ISystemUpdate, Comparable<IOrderable>

    public class ThemeToFormVersionUpdate
    extends Object
    implements ISystemUpdate
    A new column was added to the FormVersion entity: FormVersion.getTheme(). Up until version 5, the theme reference was stored directly inside the persist JSON. Starting with version 6, the theme reference receives its own database column, which makes it easier and faster to read the theme, as it does not require accessing the persist JSON file data and parsing the JSON. This update iterates over each form version without a theme (database column theme set to null), attempts to parse the persist JSON and retrieve the theme, and updates the db column theme.
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • ThemeToFormVersionUpdate

        public ThemeToFormVersionUpdate()
    • Method Detail

      • getUUID

        public String getUUID()
        Description copied from interface: ISystemUpdate
        Gets an String for identifying an update. This String should not be longer than 36 chars and should not be changed, otherwise the update may run multiple times!
        Specified by:
        getUUID in interface ISystemUpdate
        Returns:
        String UUID of the update
      • needsToRun

        public boolean needsToRun()
        Description copied from interface: ISystemUpdate
        Checks if an update needs to run at all. If not, the update will be marked as run and never performed at all.
        Specified by:
        needsToRun in interface ISystemUpdate
        Returns:
        Boolean if the update is needed
      • exec

        public void exec()
        Description copied from interface: ISystemUpdate
        Executes the system update
        Specified by:
        exec in interface ISystemUpdate