Package io.jmix.ui
Class WindowConfig
java.lang.Object
io.jmix.ui.WindowConfig
GenericUI class holding information about all registered in
screens.xml
screens.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected ClassManager
protected List<UiControllersConfiguration>
static final Pattern
protected org.springframework.core.env.Environment
protected ExtendedEntities
protected boolean
protected ReadWriteLock
protected Metadata
protected AnnotationScanMetadataReaderFactory
protected JmixModules
protected Map<Class,
WindowInfo> protected Map<Class,
WindowInfo> protected Resources
protected Map<String,
WindowInfo> protected ScreenXmlLoader
protected UiProperties
static final String
protected WindowAttributesProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected WindowInfo.Type
extractWindowInfoType
(WindowInfo windowInfo, Class<? extends FrameOwner> controllerClass) Find route by screen id.findWindowInfo
(String id) Get screen information by screen ID.findWindowInfoByRoute
(String route) Get screen information by route.getAvailableLookupScreenId
(MetaClass metaClass) getBrowseScreenId
(MetaClass metaClass) getEditorScreen
(Object entity) getEditorScreenId
(MetaClass metaClass) getLookupScreen
(Class<?> entityClass) Get available lookup screen by class of entitygetLookupScreenId
(MetaClass metaClass) getMetaClassScreenId
(MetaClass metaClass, String suffix) protected org.springframework.core.type.classreading.MetadataReaderFactory
protected org.springframework.core.io.ResourceLoader
getWindowInfo
(String id) Get screen information by screen ID.All registered screensboolean
protected void
init()
protected org.springframework.core.type.classreading.MetadataReader
loadClassMetadata
(String className) protected void
loadConfig
(org.dom4j.Element rootElem) protected Class<? extends FrameOwner>
loadDefinedScreenClass
(String className) protected RouteDefinition
loadRouteDefinition
(org.dom4j.Element screenElement) void
loadScreenClass
(String className) Loads hot-deployedUiController
screens and registersUiControllersConfiguration
containing newUiControllerDefinition
.protected void
protected void
protected void
registerPrimaryEditor
(WindowInfo windowInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) protected void
registerPrimaryLookup
(WindowInfo windowInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) protected void
registerScreen
(String id, WindowInfo windowInfo) protected void
registerScreenRoute
(String screenId, WindowInfo windowInfo) void
reset()
Make the config to reload screens on next request.protected WindowInfo
resolveWindowInfo
(WindowInfo windowInfo) protected boolean
routeOverrideAllowed
(String newScreenId) Have to do this check due to Login/Main Screen are registered before legacy LoginWindow / AppMainWindow.
-
Field Details
-
WINDOW_CONFIG_XML_PROP
- See Also:
-
ENTITY_SCREEN_PATTERN
-
LOGIN_SCREEN_IDS
-
MAIN_SCREEN_IDS
-
screens
-
routes
-
-
primaryLookups
-
configurations
-
resources
-
classManager
-
metadata
-
extendedEntities
-
screenXmlLoader
-
uiProperties
-
environment
@Autowired protected org.springframework.core.env.Environment environment -
applicationContext
@Autowired protected org.springframework.context.ApplicationContext applicationContext -
metadataReaderFactory
-
modules
-
initialized
protected volatile boolean initialized -
lock
-
windowAttributesProvider
-
-
Constructor Details
-
WindowConfig
public WindowConfig()
-
-
Method Details
-
resolveWindowInfo
-
getMetadataReaderFactory
protected org.springframework.core.type.classreading.MetadataReaderFactory getMetadataReaderFactory() -
getResourceLoader
protected org.springframework.core.io.ResourceLoader getResourceLoader() -
extractWindowInfoType
protected WindowInfo.Type extractWindowInfoType(WindowInfo windowInfo, Class<? extends FrameOwner> controllerClass) -
loadDefinedScreenClass
-
checkInitialized
protected void checkInitialized() -
init
protected void init() -
loadScreenConfigurations
protected void loadScreenConfigurations() -
loadScreensXml
protected void loadScreensXml() -
loadConfig
protected void loadConfig(org.dom4j.Element rootElem) -
loadRouteDefinition
-
registerScreen
-
registerScreenRoute
-
routeOverrideAllowed
Have to do this check due to Login/Main Screen are registered before legacy LoginWindow / AppMainWindow. -
registerPrimaryEditor
protected void registerPrimaryEditor(WindowInfo windowInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) -
registerPrimaryLookup
protected void registerPrimaryLookup(WindowInfo windowInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) -
loadClassMetadata
protected org.springframework.core.type.classreading.MetadataReader loadClassMetadata(String className) -
loadScreenClass
Loads hot-deployedUiController
screens and registersUiControllersConfiguration
containing newUiControllerDefinition
.- Parameters:
className
- the fully qualified name of the screen class to load
-
reset
public void reset()Make the config to reload screens on next request. -
findWindowInfo
Get screen information by screen ID.- Parameters:
id
- screen ID as set up inscreens.xml
- Returns:
- screen's registration information or null if not found
-
getWindowInfo
Get screen information by screen ID.- Parameters:
id
- screen ID as set up inscreens.xml
- Returns:
- screen's registration information
- Throws:
NoSuchScreenException
- if the screen with specified ID is not registered
-
findWindowInfoByRoute
Get screen information by route.- Parameters:
route
- route- Returns:
- screen's registration information or null if not found
-
findRoute
Find route by screen id.- Parameters:
id
- screen id- Returns:
- registered route or null if no route for screen
-
hasWindow
- Returns:
- true if the configuration contains a screen with provided ID
-
getWindows
All registered screens -
getMetaClassScreenId
-
getBrowseScreenId
-
getLookupScreenId
-
getEditorScreenId
-
getEditorScreen
-
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
-
getAvailableLookupScreenId
-