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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected ClassManagerprotected List<UiControllersConfiguration>static final Patternprotected org.springframework.core.env.Environmentprotected ExtendedEntitiesprotected booleanprotected ReadWriteLockprotected Metadataprotected AnnotationScanMetadataReaderFactoryprotected JmixModulesprotected Map<Class,WindowInfo> protected Map<Class,WindowInfo> protected Resourcesprotected Map<String,WindowInfo> protected ScreenXmlLoaderprotected UiControllersConfigurationSorterprotected UiPropertiesstatic final Stringprotected WindowAttributesProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected WindowInfo.TypeextractWindowInfoType(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.MetadataReaderFactoryprotected org.springframework.core.io.ResourceLoadergetWindowInfo(String id) Get screen information by screen ID.All registered screensbooleanprotected voidinit()protected org.springframework.core.type.classreading.MetadataReaderloadClassMetadata(String className) protected voidloadConfig(org.dom4j.Element rootElem) protected Class<? extends FrameOwner>loadDefinedScreenClass(String className) protected RouteDefinitionloadRouteDefinition(org.dom4j.Element screenElement) voidloadScreenClass(String className) Loads hot-deployedUiControllerscreens and registersUiControllersConfigurationcontaining newUiControllerDefinition.protected voidprotected voidprotected voidprotected voidregisterPrimaryEditor(WindowInfo windowInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) protected voidregisterPrimaryLookup(WindowInfo windowInfo, org.springframework.core.type.AnnotationMetadata annotationMetadata) protected voidregisterScreen(String id, WindowInfo windowInfo) protected voidregisterScreenRoute(String screenId, WindowInfo windowInfo) voidreset()Make the config to reload screens on next request.protected WindowInforesolveWindowInfo(WindowInfo windowInfo) protected booleanrouteOverrideAllowed(String newScreenId) Have to do this check due to Login/Main Screen are registered before legacy LoginWindow / AppMainWindow.voidsetConfigurations(List<UiControllersConfiguration> configurations)
-
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
-
uiControllersConfigurationSorter
-
initialized
protected volatile boolean initialized -
lock
-
windowAttributesProvider
-
-
Constructor Details
-
WindowConfig
public WindowConfig()
-
-
Method Details
-
setConfigurations
-
postConstruct
@PostConstruct protected void postConstruct() -
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-deployedUiControllerscreens and registersUiControllersConfigurationcontaining 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
-