Package org.ametys.core.ui
Class RibbonConfigurationManager
- java.lang.Object
-
- org.ametys.core.ui.RibbonConfigurationManager
-
public class RibbonConfigurationManager extends Object
This class handles the ribbon configuration needed for client side display.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRibbonConfigurationManager.CONTROLSIZESize constants for controlsstatic classRibbonConfigurationManager.LAYOUTALIGNSize constants for controls
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>_controlsReferencesThe controls referenced by the ribbonprotected SourceResolver_resolverThe excalibur source resolverprotected RibbonConfiguration_ribbonConfigThe ribbon configuration, as read from the configuration sourceprotected RibbonControlsManager_ribbonControlManagerThe ribbon controls managerprotected RibbonImportManager_ribbonImportManagerThe ribbon import managerprotected RibbonManager_ribbonManagerThe ribbon control managerprotected RibbonManagerCache_ribbonManagerCacheThe ribbon manager Cacheprotected RibbonTabsManager_ribbonTabManagerThe ribbon tab extension pointprotected SAXClientSideElementHelper_saxClientSideElementHelperThe sax clientside element helperprotected Set<String>_tabsReferencesThe tabs referenced by the ribbon
-
Constructor Summary
Constructors Constructor Description RibbonConfigurationManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(RibbonManager ribbonManager, ClientSideElementDependenciesManager dependenciesManager, RibbonConfigurationSource config, String workspaceName)Configure the manager after being setup, to read and load the ribbons filesList<ClientSideElement>getControls(Map<String,Object> contextParameters)Retrieve the list of controls referenced by the ribbonList<ClientSideElement>getTabs()Retrieve the list of tabs referenced by the ribbonvoidsaxRibbonDefinition(ContentHandler handler, Map<String,Object> contextualParameters)Sax the the initial configuration of the ribbon.voidsetup(RibbonControlsManager ribbonControlManager, RibbonTabsManager ribbonTabManager, RibbonImportManager ribbonImportManager, SAXClientSideElementHelper saxClientSideElementHelper, SourceResolver resolver, RibbonManagerCache ribbonManagerCache)Setup the ribbon configuration manager with the required components.
-
-
-
Field Detail
-
_ribbonManager
protected RibbonManager _ribbonManager
The ribbon control manager
-
_ribbonTabManager
protected RibbonTabsManager _ribbonTabManager
The ribbon tab extension point
-
_saxClientSideElementHelper
protected SAXClientSideElementHelper _saxClientSideElementHelper
The sax clientside element helper
-
_resolver
protected SourceResolver _resolver
The excalibur source resolver
-
_ribbonConfig
protected RibbonConfiguration _ribbonConfig
The ribbon configuration, as read from the configuration source
-
_controlsReferences
protected Set<String> _controlsReferences
The controls referenced by the ribbon
-
_tabsReferences
protected Set<String> _tabsReferences
The tabs referenced by the ribbon
-
_ribbonControlManager
protected RibbonControlsManager _ribbonControlManager
The ribbon controls manager
-
_ribbonImportManager
protected RibbonImportManager _ribbonImportManager
The ribbon import manager
-
_ribbonManagerCache
protected RibbonManagerCache _ribbonManagerCache
The ribbon manager Cache
-
-
Constructor Detail
-
RibbonConfigurationManager
public RibbonConfigurationManager()
-
-
Method Detail
-
setup
public void setup(RibbonControlsManager ribbonControlManager, RibbonTabsManager ribbonTabManager, RibbonImportManager ribbonImportManager, SAXClientSideElementHelper saxClientSideElementHelper, SourceResolver resolver, RibbonManagerCache ribbonManagerCache)
Setup the ribbon configuration manager with the required components.- Parameters:
ribbonControlManager- The ribbon control managerribbonTabManager- the ribbon tab managerribbonImportManager- The ribbon import managersaxClientSideElementHelper- the helper to SAX client side elementresolver- the excalibur source resolverribbonManagerCache- The ribbon manager cache helper
-
configure
public void configure(RibbonManager ribbonManager, ClientSideElementDependenciesManager dependenciesManager, RibbonConfigurationSource config, String workspaceName)
Configure the manager after being setup, to read and load the ribbons files- Parameters:
ribbonManager- The ribbon manager for this configdependenciesManager- The dependencies managerconfig- the ribbon configurationworkspaceName- The current workspace name- Throws:
RuntimeException- if an error occurred
-
getControls
public List<ClientSideElement> getControls(Map<String,Object> contextParameters)
Retrieve the list of controls referenced by the ribbon- Parameters:
contextParameters- Contextuals parameters transmitted by the environment.- Returns:
- The list of controls
-
getTabs
public List<ClientSideElement> getTabs()
Retrieve the list of tabs referenced by the ribbon- Returns:
- The list of tabs
-
saxRibbonDefinition
public void saxRibbonDefinition(ContentHandler handler, Map<String,Object> contextualParameters) throws SAXException
Sax the the initial configuration of the ribbon.- Parameters:
handler- The content handler where to saxcontextualParameters- Contextuals parameters transmitted by the environment.- Throws:
SAXException- if an error occurs
-
-