Interface ISequentialUpdating<TData,​TElement extends IWorkflowElementEntity,​TVersion extends Comparable<TVersion>>

    • Method Detail

      • getTransitions

        Map<TVersion,​IUpdateTransition> getTransitions()
        A map from the version where an update is required to that update. For example, if the properties model needs to be updated in version 1.1.7, 1.3.4, and 2.2.0, the returned map should have one entry for each of these three versions.
        Returns:
        A map from the version to the update for that version.
      • parseVersion

        TVersion parseVersion​(String version)
        Parses the version string into a comparable instance.
        Parameters:
        version - Version string to parse.
        Returns:
        The parsed version object. Must not be null, use a default, such as 0.0.0.
      • updateCustomParams

        default com.alibaba.fastjson.JSONObject updateCustomParams​(IUpdateCustomParametersParams params)
        Description copied from interface: ICustomParametersUpdateable
        Updates the custom parameters to the current IVersionedCustomParametersProviding.getCustomParametersVersion().

        The properties are stored as JSON, and the version is stored along with it. Later (such as after the software was updated), when this JSON needs to be retrieved again, the version is compared against the current version. When the versions are not equal, ICustomParametersUpdateable.updateCustomParams(IUpdateCustomParametersParams) is called on the raw JSON data, giving you a chance to update the properties before they are deserialized.

        Please note that the previous version is only guaranteed to be different from the current version. You must not assume the previous version is lower than the current one, e.g. when the software was downgraded. This is a low-level interface,

        The default implementation simply assumes there are not changes and return the data that was passed in.

        Specified by:
        updateCustomParams in interface ICustomParametersUpdateable
        Parameters:
        params - The JSON data to update, and the current and previous version.
        Returns:
        The updated JSON data. You may mutate the given JSON, or create a fresh JSON object.