Package de.xima.fc.form.common.migration
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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.static void
process(com.alibaba.fastjson.JSONObject persist)
Performs (general and item-specific) migrations.
-
-
-
Method Detail
-
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 forheaderAdder
- 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 forfooterAdder
- the operation that actually adds the new footer to the form's items
-
-