Class FormMigration
java.lang.Object
de.xima.fc.form.common.migration.FormMigration
A central location for form migration stuff to take place.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFooterIfNecessary(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 voidaddHeaderIfNecessary(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 voidprocess(com.alibaba.fastjson.JSONObject persist) Performs (general and item-specific) migrations.
-
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
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
-