Class UpdateTransitions


  • public final class UpdateTransitions
    extends Object
    Utility methods for creating the update transitions map for the update enums in the sub packages.
    Since:
    7.0.1
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • createForEnum

        public static <T extends Enum<T> & IUpdateTransition & ISemVerProviding> com.google.common.collect.ImmutableMap<com.vdurmont.semver4j.Semver,​IUpdateTransition> createForEnum​(Class<? extends Enum<T>> enumType)
        Type Parameters:
        T - Type of the update enum.
        Parameters:
        enumType - Type of the update enum.
        Returns:
        A map with all transitions of all enums.
      • formProvision820Downgrade

        public static void formProvision820Downgrade​(com.alibaba.fastjson.JSONObject json,
                                                     String property)
        Version 8.2.0 adds a new model class FileProvision to store the configuration how created files should be handled. Previously it was stored on the model instance itself, which makes it hard to add new properties, especially for plugins. This update moves the properties from the nested object to the model class.

        This method may be used by plugins.

        Parameters:
        json - JSON object to update.
        property - Name of the model property that stores the FileProvision.
      • formProvision820Upgrade

        public static void formProvision820Upgrade​(com.alibaba.fastjson.JSONObject json,
                                                   String property)
        Version 8.2.0 adds a new model class FileProvision to store the configuration how created files should be handled. Previously it was stored on the model instance itself, which makes it hard to add new properties, especially for plugins. This update moves the properties from the model class a nested object.

        This method may be used by plugins.

        Parameters:
        json - JSON object to update.
        property - Name of the model property that stores the FileProvision.
      • receiver840Upgrade

        public static void receiver840Upgrade​(com.alibaba.fastjson.JSONObject json,
                                              String chatMemberProp,
                                              String receiverProp)
        Version 8.4.0 changes how the receiver of form record messages is stored. Previously it was stored as simply a type string (target chat member), now it is stored as a nested object with a type and additional properties such as the selection mode.

        This method may be used by plugins.

        Parameters:
        json - JSON object to update.
        chatMemberProp - Name of the property that stores the target chat member in the old format.
        receiverProp - Name of the property that stores the receiver in the new format.