Class ViewTemplateControllerClassFactory
java.lang.Object
io.jmix.flowui.view.template.impl.ViewTemplateControllerClassFactory
@Component("flowui_ViewTemplateControllerClassFactory")
public class ViewTemplateControllerClassFactory
extends Object
Generates dedicated controller classes for template-based views.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateClassName(MetaClass entityMetaClass, ViewTemplateType type) protected net.bytebuddy.dynamic.DynamicType.Builder<? extends View<?>> createControllerClassBuilder(MetaClass entityMetaClass, ViewTemplateType type, Class<? extends View<?>> superclass, String viewId, String descriptorPath, String routePath) createDefaultRoutePath(String viewId, ViewTemplateType type) Creates the default route path for a template view when the annotation does not provide one.createDetailViewControllerClass(MetaClass entityMetaClass, String viewId, String descriptorPath, String routePath, String editedEntityContainerId) Returns a generated controller class for the specified detail template view.createDetailViewControllerClassInternal(MetaClass entityMetaClass, String viewId, String descriptorPath, String routePath, String editedEntityContainerId) createListViewControllerClass(MetaClass entityMetaClass, String viewId, String descriptorPath, String routePath, String lookupComponentId) Returns a generated controller class for the specified list template view.createListViewControllerClassInternal(MetaClass entityMetaClass, String viewId, String descriptorPath, String routePath, String lookupComponentId) protected StringcreateRouteSlug(String value) protected @Nullable Class<?> findLoadedClass(String className, ClassLoader classLoader)
-
Field Details
-
GENERATED_PACKAGE_SUFFIX
- See Also:
-
NON_ROUTE_CHARS
-
EDGE_SEPARATORS
-
controllerClasses
-
-
Constructor Details
-
ViewTemplateControllerClassFactory
public ViewTemplateControllerClassFactory()
-
-
Method Details
-
createListViewControllerClass
public Class<? extends View<?>> createListViewControllerClass(MetaClass entityMetaClass, String viewId, String descriptorPath, String routePath, String lookupComponentId) Returns a generated controller class for the specified list template view.- Parameters:
entityMetaClass- entity meta-class that owns the generated viewviewId- view id to expose throughViewControllerdescriptorPath- descriptor path exposed throughViewDescriptorroutePath- route path exposed throughRoutelookupComponentId- lookup component id used by the generated controller- Returns:
- generated controller class
-
createDetailViewControllerClass
public Class<? extends View<?>> createDetailViewControllerClass(MetaClass entityMetaClass, String viewId, String descriptorPath, String routePath, String editedEntityContainerId) Returns a generated controller class for the specified detail template view.- Parameters:
entityMetaClass- entity meta-class that owns the generated viewviewId- view id to expose throughViewControllerdescriptorPath- descriptor path exposed throughViewDescriptorroutePath- route path exposed throughRouteeditedEntityContainerId- edited entity container id used by the generated controller- Returns:
- generated controller class
-
createListViewControllerClassInternal
-
createDetailViewControllerClassInternal
-
createControllerClassBuilder
-
createDefaultRoutePath
Creates the default route path for a template view when the annotation does not provide one.- Parameters:
viewId- template view idtype- template view type- Returns:
- generated route path
-
createClassName
-
createRouteSlug
-
findLoadedClass
-