@Component(value="cuba_WindowConfig")
public class WindowConfig
extends java.lang.Object
screens.xml
screens.Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
ENTITY_SCREEN_PATTERN |
static java.lang.String |
NAME |
static java.lang.String |
WINDOW_CONFIG_XML_PROP |
Constructor and Description |
---|
WindowConfig() |
Modifier and Type | Method and Description |
---|---|
WindowInfo |
findWindowInfo(java.lang.String id) |
WindowInfo |
findWindowInfo(java.lang.String id,
DeviceInfo deviceInfo)
Get screen information by screen ID.
|
java.lang.String |
getAvailableLookupScreenId(MetaClass metaClass) |
java.lang.String |
getBrowseScreenId(MetaClass metaClass) |
WindowInfo |
getEditorScreen(Entity entity) |
java.lang.String |
getEditorScreenId(MetaClass metaClass) |
WindowInfo |
getLookupScreen(java.lang.Class<? extends Entity> entityClass)
Get available lookup screen by class of entity
|
java.lang.String |
getLookupScreenId(MetaClass metaClass) |
java.lang.String |
getMetaClassScreenId(MetaClass metaClass,
java.lang.String suffix) |
WindowInfo |
getWindowInfo(java.lang.String id)
Get screen information by screen ID.
|
WindowInfo |
getWindowInfo(java.lang.String id,
DeviceInfo deviceInfo)
Get screen information by screen ID.
|
java.util.Collection<WindowInfo> |
getWindows()
All registered screens
|
boolean |
hasWindow(java.lang.String id) |
void |
reset()
Make the config to reload screens on next request.
|
public static final java.lang.String NAME
public static final java.lang.String WINDOW_CONFIG_XML_PROP
public static final java.util.regex.Pattern ENTITY_SCREEN_PATTERN
public void reset()
public WindowInfo findWindowInfo(java.lang.String id)
@Nullable public WindowInfo findWindowInfo(java.lang.String id, @Nullable DeviceInfo deviceInfo)
id
- screen ID as set up in screens.xml
deviceInfo
- target device infopublic WindowInfo getWindowInfo(java.lang.String id)
id
- screen ID as set up in screens.xml
NoSuchScreenException
- if the screen with specified ID is not registeredpublic WindowInfo getWindowInfo(java.lang.String id, DeviceInfo deviceInfo)
id
- screen ID as set up in screens.xml
deviceInfo
- device infoNoSuchScreenException
- if the screen with specified ID is not registeredpublic boolean hasWindow(java.lang.String id)
public java.util.Collection<WindowInfo> getWindows()
public java.lang.String getMetaClassScreenId(MetaClass metaClass, java.lang.String suffix)
public java.lang.String getBrowseScreenId(MetaClass metaClass)
public java.lang.String getLookupScreenId(MetaClass metaClass)
public java.lang.String getEditorScreenId(MetaClass metaClass)
public WindowInfo getEditorScreen(Entity entity)
public WindowInfo getLookupScreen(java.lang.Class<? extends Entity> entityClass)
entityClass
- entity classNoSuchScreenException
- if the screen with specified ID is not registeredpublic java.lang.String getAvailableLookupScreenId(MetaClass metaClass)