ModuleRegistrationData¶
-
public class
ModuleRegistrationData
¶ Object used to registered a module withing the Motech UI system. Represents a module and is used for building the common user interface. All modules that wish to register within the UI system must either expose this class as a spring bean in their application context or manually register it through the
UIFrameworkService
OSGi service.See also:
UIFrameworkService
Constructors¶
ModuleRegistrationData¶
ModuleRegistrationData¶
-
public
ModuleRegistrationData
(String moduleName, Map<String, String> i18n)¶ Constructor for modules that just want to register i18n files (i.e. for tasks).
Parameters: - moduleName – the name of the module
- i18n – a map, where the keys are the names of the i18n files and values are their locations (HTTP locations)
ModuleRegistrationData¶
-
public
ModuleRegistrationData
(String moduleName, String url, List<String> angularModules, Map<String, String> i18n)¶ Constructor for modules that want to register their own panels in the UI.
Parameters: - moduleName – the name of the module
- url – the url under which this module can be accessed
- angularModules – the list of angular modules that should be loaded on the UI for this module
- i18n – a map, where the keys are the names of the i18n files and values are their locations (HTTP locations)
Methods¶
addAngularModule¶
addI18N¶
addSubMenu¶
-
public void
addSubMenu
(String url, String label, String roleForAccess)¶ Adds a submenu to this module. Submenu is a link on the left side of the UI.
Parameters: - url – the url to which the link will redirect to
- label – the label that will be displayed on the UI
- roleForAccess – the permission required to view this sub menu (will be hidden if the user doesn’t have the permission)
getAngularModules¶
getAngularModulesStr¶
getCriticalMessage¶
getDefaultURL¶
getDocumentationUrl¶
getI18n¶
getModuleName¶
getRestDocsPath¶
getRoleForAccess¶
getSettingsURL¶
getTabAccessMap¶
isNeedsAttention¶
-
public boolean
isNeedsAttention
()¶ Checks whether this module needs attention - meaning it requires a UI notification pointing to it.
Returns: true if the module needs attention, false otherwise
removeAngularModule¶
setBundle¶
setCriticalMessage¶
setDefaultURL¶
setModuleName¶
setNeedsAttention¶
-
public void
setNeedsAttention
(boolean needsAttention)¶ Sets whether this module needs attention - meaning it requires a UI notification pointing to it.
Parameters: - needsAttention – true if the module needs attention, false otherwise