Class ScreenRegistry

java.lang.Object
io.jmix.flowui.screen.ScreenRegistry

@Component("flowui_ScreenRegistry") public class ScreenRegistry extends Object
  • Field Details

  • Constructor Details

    • ScreenRegistry

      public ScreenRegistry()
  • Method Details

    • setMetadata

      @Autowired public void setMetadata(Metadata metadata)
    • setResources

      @Autowired public void setResources(Resources resources)
    • setClassManager

      @Autowired public void setClassManager(ClassManager classManager)
    • setExtendedEntities

      @Autowired public void setExtendedEntities(ExtendedEntities extendedEntities)
    • setMetadataReaderFactory

      @Autowired public void setMetadataReaderFactory(AnnotationScanMetadataReaderFactory metadataReaderFactory)
    • setConfigurations

      @Autowired(required=false) public void setConfigurations(List<UiControllersConfiguration> configurations)
    • reset

      public void reset()
      Make the registry to reload screens on next request.
    • checkInitialized

      protected void checkInitialized()
    • init

      protected void init()
    • loadScreenConfigurations

      protected void loadScreenConfigurations()
    • registerScreen

      protected void registerScreen(String id, ScreenInfo screenInfo)
    • registerPrimaryEditor

      protected void registerPrimaryEditor(ScreenInfo screenInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata)
    • registerPrimaryLookup

      protected void registerPrimaryLookup(ScreenInfo screenInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata)
    • loadClassMetadata

      protected org.springframework.core.type.classreading.MetadataReader loadClassMetadata(String className)
    • loadDefinedScreenClass

      protected Class<? extends Screen<?>> loadDefinedScreenClass(String className)
      Loads hot-deployed UiController screens and registers UiControllersConfiguration containing new UiControllerDefinition.
      Parameters:
      className - the fully qualified name of the screen class to load
    • resolveTemplatePath

      @Nullable protected String resolveTemplatePath(Class<? extends Screen<?>> controllerClass)
    • findScreenInfo

      public Optional<ScreenInfo> findScreenInfo(String id)
      Returns screen information by screen id.
      Parameters:
      id - screen id as set in the UiController annotation
      Returns:
      screen's registration information
    • getScreenInfo

      public ScreenInfo getScreenInfo(String id)
      Returns screen information by screen id.
      Parameters:
      id - screen id as set in the UiController annotation
      Returns:
      screen's registration information
      Throws:
      NoSuchScreenException - if the screen with specified id is not registered
    • hasScreen

      public boolean hasScreen(String id)
      Returns:
      true if the registry contains a screen with provided id
    • getScreens

      public Collection<ScreenInfo> getScreens()
    • getMetaClassScreenId

      public String getMetaClassScreenId(MetaClass metaClass, String suffix)
    • getBrowseScreenId

      public String getBrowseScreenId(MetaClass metaClass)
    • getLookupScreenId

      public String getLookupScreenId(MetaClass metaClass)
    • getEditorScreenId

      public String getEditorScreenId(MetaClass metaClass)
    • getEditorScreen

      public ScreenInfo getEditorScreen(MetaClass metaClass)
    • getEditorScreen

      public ScreenInfo getEditorScreen(Class<?> entityClass)
    • getEditorScreen

      public ScreenInfo getEditorScreen(Object entity)
    • getLookupScreen

      public ScreenInfo getLookupScreen(MetaClass metaClass)
    • getLookupScreen

      public ScreenInfo getLookupScreen(Class<?> entityClass)
      Get available lookup screen by class of entity
      Parameters:
      entityClass - entity class
      Returns:
      id of lookup screen
      Throws:
      NoSuchScreenException - if the screen with specified ID is not registered
    • getLookupScreen

      public ScreenInfo getLookupScreen(Object entity)
    • getAvailableLookupScreenId

      public String getAvailableLookupScreenId(MetaClass metaClass)