Interface ModelType

    • Method Detail

      • modelToApplication

        Object modelToApplication​(Serializable modelValue)
                           throws IllegalArgumentException
        Deprecated.
        Creates a representation of the provided model value that is intended for use in application code. For mutable values, this is typically a proxy that is directly connected to the underlying model value.
        Parameters:
        modelValue - the model value to convert
        Returns:
        a user-friendly representation of the provided model value
        Throws:
        IllegalArgumentException - if modelValue cannot be handled by the type
      • applicationToModel

        Serializable applicationToModel​(Object applicationValue,
                                        PropertyFilter filter)
        Deprecated.
        Creates a model value representation of the provided application value.

        For application values that contain properties (i.e. beans), the provided filter is used to determine which properties from the bean should be included in the model representation.

        Parameters:
        applicationValue - the user value to convert
        filter - the filter to use to determine which properties to include, not null
        Returns:
        a model value representation of the provided user value.
      • accepts

        boolean accepts​(Type applicationType)
        Deprecated.
        Checks whether this type can accept application values of the given type. The method only considers this actual type, not the types of sub properties or list items.
        Parameters:
        applicationType - the application type to check, not null
        Returns:
        true if the provided type is acceptable, false otherwise
      • getJavaType

        Type getJavaType()
        Deprecated.
        Gets the Java Type that this model encapsulates.
        Returns:
        the java type
      • getSupportedTypesString

        static String getSupportedTypesString()
        Deprecated.
        Gets a string explaining the supported property types in model.
        Returns:
        a string explaining supported property types
      • toJson

        elemental.json.JsonValue toJson()
        Deprecated.
        Creates a JSON representation of this model type.
        Returns:
        a JSON representation of this model type, not null
      • createInitialValue

        void createInitialValue​(StateNode node,
                                String property)
        Deprecated.
        Create initial value for the given property and set it for the node.
        Parameters:
        node - the node where the initial value should be set the property
        property - the property in the node whose initial value needs to be created