Interface IFeatureComplexItemValueHandler

All Superinterfaces:
IItemValueHandler<IBoundObject>
All Known Subinterfaces:
IBoundDefinitionModelAssembly, IBoundDefinitionModelComplex, IBoundDefinitionModelFieldComplex, IBoundInstanceModelAssembly, IBoundInstanceModelFieldComplex, IBoundInstanceModelGroupedAssembly, IBoundInstanceModelGroupedField, IBoundInstanceModelGroupedNamed

public interface IFeatureComplexItemValueHandler extends IItemValueHandler<IBoundObject>
A feature interface for handling complex item values during binding operations.

Complex items are bound to Java classes and can contain flags and other nested model content.

  • Method Details

    • getDefinition

      @NonNull IBoundDefinitionModelComplex getDefinition()
      Get the Metaschema definition representing the bound complex data.
      Returns:
      the definition
    • getJsonProperties

      @NonNull Map<String,IBoundProperty<?>> getJsonProperties()
      Get the mapping of JSON property names to property bindings.
      Returns:
      the mapping
    • deepCopyItem

      @NonNull IBoundObject deepCopyItem(@NonNull IBoundObject item, @Nullable IBoundObject parentInstance) throws BindingException
      Description copied from interface: IItemValueHandler
      Create and return a deep copy of the provided item.
      Specified by:
      deepCopyItem in interface IItemValueHandler<IBoundObject>
      Parameters:
      item - the item to copy
      parentInstance - an optional parent object to use for serialization callbacks
      Returns:
      the new deep copy
      Throws:
      BindingException - if an error occurred while analyzing the bound objects
    • getBoundClass

      @NonNull Class<? extends IBoundObject> getBoundClass()
      The class this binding is to.
      Returns:
      the bound class
    • newInstance

      @NonNull default <CLASS extends IBoundObject> CLASS newInstance(@Nullable Supplier<IMetaschemaData> supplier)
      Gets a new instance of the bound class.
      Type Parameters:
      CLASS - the type of the bound class
      Parameters:
      supplier - the metaschema data generator used to capture parse information (i.e., location)
      Returns:
      a Java object for the class
      Throws:
      RuntimeException - if the instance cannot be created due to a binding error
    • callBeforeDeserialize

      void callBeforeDeserialize(@NonNull IBoundObject targetObject, @Nullable IBoundObject parentObject) throws BindingException
      Invoke the before-deserialize lifecycle callback on the target object.
      Parameters:
      targetObject - the object being deserialized
      parentObject - the parent object containing the target, or null if there is no parent
      Throws:
      BindingException - if an error occurs during the callback
    • callAfterDeserialize

      void callAfterDeserialize(@NonNull IBoundObject targetObject, @Nullable IBoundObject parentObject) throws BindingException
      Invoke the after-deserialize lifecycle callback on the target object.
      Parameters:
      targetObject - the object that was deserialized
      parentObject - the parent object containing the target, or null if there is no parent
      Throws:
      BindingException - if an error occurs during the callback