Class DynamicModelOperationRegistry

java.lang.Object
io.jmix.dynmodel.impl.DynamicModelOperationRegistry
All Implemented Interfaces:
org.springframework.beans.factory.SmartInitializingSingleton

@NullMarked @Component("dynmod_DynamicModelOperationRegistry") public class DynamicModelOperationRegistry extends Object implements org.springframework.beans.factory.SmartInitializingSingleton
Collects methods annotated with DynamicModelOperation from application beans and invokes them by name on behalf of dynamic view behavior handlers.
  • Field Details

    • applicationContext

      @Autowired protected org.springframework.context.ApplicationContext applicationContext
    • operations

      protected final Map<String,DynamicModelOperationRegistry.Operation> operations
    • conversionService

      protected final org.springframework.core.convert.ConversionService conversionService
  • Constructor Details

    • DynamicModelOperationRegistry

      public DynamicModelOperationRegistry()
  • Method Details

    • afterSingletonsInstantiated

      public void afterSingletonsInstantiated()
      Specified by:
      afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton
    • registerOperation

      protected void registerOperation(String beanName, Method method, String name)
    • findOperation

      public @Nullable DynamicModelOperationRegistry.Operation findOperation(String name)
    • getOperations

      Returns all registered operations in registration order. Used by the Admin UI to offer the operation names available to services.call in a handler expression.
    • invoke

      public @Nullable Object invoke(String name, List<@Nullable Object> args)
      Invokes the named operation with the given arguments, converting each argument to the declared parameter type when necessary.
    • convertArgument

      protected @Nullable Object convertArgument(String name, @Nullable Object arg, Class<?> parameterType)