Interface ICustomParametersUpdateable

    • Method Detail

      • updateCustomParams

        default com.alibaba.fastjson.JSONObject updateCustomParams​(IUpdateCustomParametersParams params)
        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, 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.

        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.