Package io.jmix.dynmodel.impl
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.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected final org.springframework.core.convert.ConversionServiceprotected final Map<String, DynamicModelOperationRegistry.Operation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected @Nullable ObjectconvertArgument(String name, @Nullable Object arg, Class<?> parameterType) @Nullable DynamicModelOperationRegistry.OperationfindOperation(String name) Returns all registered operations in registration order.@Nullable ObjectInvokes the named operation with the given arguments, converting each argument to the declared parameter type when necessary.protected voidregisterOperation(String beanName, Method method, String name)
-
Field Details
-
applicationContext
@Autowired protected org.springframework.context.ApplicationContext applicationContext -
operations
-
conversionService
protected final org.springframework.core.convert.ConversionService conversionService
-
-
Constructor Details
-
DynamicModelOperationRegistry
public DynamicModelOperationRegistry()
-
-
Method Details
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
registerOperation
-
findOperation
-
getOperations
Returns all registered operations in registration order. Used by the Admin UI to offer the operation names available toservices.callin a handler expression. -
invoke
Invokes the named operation with the given arguments, converting each argument to the declared parameter type when necessary. -
convertArgument
-