Class FormMigration

java.lang.Object
de.xima.fc.form.common.migration.FormMigration

public class FormMigration extends Object
A central location for form migration stuff to take place.
  • Method Details

    • process

      public static void process(com.alibaba.fastjson.JSONObject persist)
      Performs (general and item-specific) migrations.
      Parameters:
      persist - the persistence JSON object of the form to be processed
    • addHeaderIfNecessary

      public static void addHeaderIfNecessary(XForm form, BiConsumer<XItem,XForm> headerAdder)
      Creates a header item for the passed form if the form version is older than MIN_TIMESTAMP_WITH_HEADER_AND_FOOTER.
      Parameters:
      form - the form to create the header for
      headerAdder - the operation that actually adds the new header to the form's items
    • addFooterIfNecessary

      public static void addFooterIfNecessary(XForm form, BiConsumer<XItem,XForm> footerAdder)
      Creates a footer item for the passed form if the form version is older than MIN_TIMESTAMP_WITH_HEADER_AND_FOOTER.
      Parameters:
      form - the form to create the footer for
      footerAdder - the operation that actually adds the new footer to the form's items