Package io.jmix.flowui.screen
Class ScreenRegistry
java.lang.Object
io.jmix.flowui.screen.ScreenRegistry
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected ClassManager
protected List<UiControllersConfiguration>
static final String
static final Pattern
protected ExtendedEntities
protected boolean
protected ReadWriteLock
static final String
protected Metadata
protected AnnotationScanMetadataReaderFactory
protected Map<Class<?>,
ScreenInfo> protected Map<Class<?>,
ScreenInfo> protected Resources
protected Map<String,
ScreenInfo> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
findScreenInfo
(String id) Returns screen information by screen id.getAvailableLookupScreenId
(MetaClass metaClass) getBrowseScreenId
(MetaClass metaClass) getEditorScreen
(MetaClass metaClass) getEditorScreen
(Class<?> entityClass) getEditorScreen
(Object entity) getEditorScreenId
(MetaClass metaClass) getLookupScreen
(MetaClass metaClass) getLookupScreen
(Class<?> entityClass) Get available lookup screen by class of entitygetLookupScreen
(Object entity) getLookupScreenId
(MetaClass metaClass) getMetaClassScreenId
(MetaClass metaClass, String suffix) getScreenInfo
(String id) Returns screen information by screen id.boolean
protected void
init()
protected org.springframework.core.type.classreading.MetadataReader
loadClassMetadata
(String className) loadDefinedScreenClass
(String className) Loads hot-deployedUiController
screens and registersUiControllersConfiguration
containing newUiControllerDefinition
.protected void
protected void
registerPrimaryEditor
(ScreenInfo screenInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) protected void
registerPrimaryLookup
(ScreenInfo screenInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) protected void
registerScreen
(String id, ScreenInfo screenInfo) void
reset()
Make the registry to reload screens on next request.protected String
resolveTemplatePath
(Class<? extends Screen<?>> controllerClass) void
setClassManager
(ClassManager classManager) void
setConfigurations
(List<UiControllersConfiguration> configurations) void
setExtendedEntities
(ExtendedEntities extendedEntities) void
setMetadata
(Metadata metadata) void
setMetadataReaderFactory
(AnnotationScanMetadataReaderFactory metadataReaderFactory) void
setResources
(Resources resources)
-
Field Details
-
ENTITY_SCREEN_PATTERN
-
BROWSE_SCREEN_SUFFIX
- See Also:
-
LOOKUP_SCREEN_SUFFIX
- See Also:
-
EDITOR_SCREEN_SUFFIX
- See Also:
-
metadata
-
resources
-
classManager
-
extendedEntities
-
metadataReaderFactory
-
screens
-
-
primaryLookups
-
configurations
-
initialized
protected volatile boolean initialized -
lock
-
-
Constructor Details
-
ScreenRegistry
public ScreenRegistry()
-
-
Method Details
-
setMetadata
-
setResources
-
setClassManager
-
setExtendedEntities
-
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
-
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
Loads hot-deployedUiController
screens and registersUiControllersConfiguration
containing newUiControllerDefinition
.- Parameters:
className
- the fully qualified name of the screen class to load
-
resolveTemplatePath
-
findScreenInfo
Returns screen information by screen id.- Parameters:
id
- screen id as set in theUiController
annotation- Returns:
- screen's registration information
-
getScreenInfo
Returns screen information by screen id.- Parameters:
id
- screen id as set in theUiController
annotation- Returns:
- screen's registration information
- Throws:
NoSuchScreenException
- if the screen with specified id is not registered
-
hasScreen
- Returns:
true
if the registry contains a screen with provided id
-
getScreens
-
getMetaClassScreenId
-
getBrowseScreenId
-
getLookupScreenId
-
getEditorScreenId
-
getEditorScreen
-
getEditorScreen
-
getEditorScreen
-
getLookupScreen
-
getLookupScreen
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
-
getAvailableLookupScreenId
-