Package org.ametys.cms.clientsideelement
Class SmartContentMenu
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.cms.clientsideelement.SmartContentClientSideElement
-
- org.ametys.cms.clientsideelement.SmartContentMenu
-
- All Implemented Interfaces:
ClientSideElement
,MenuClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class SmartContentMenu extends SmartContentClientSideElement implements MenuClientSideElement
A smart menu to use for content
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description protected ThreadSafeComponentManager<ClientSideElement>
_menuItemManager
The client side element component manager for menu items.protected List<ClientSideElement>
_menuItems
The menu itemsprotected ClientSideElement
_primaryMenuItem
The primary menu itemprotected RibbonControlsManager
_ribbonControlManager
The ribbon control managerprotected ServiceManager
_serviceManager
The service manager.-
Fields inherited from class org.ametys.cms.clientsideelement.SmartContentClientSideElement
_contentHelper, _resolver, _smartHelper
-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description SmartContentMenu()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_configureItemsMenu(Configuration configuration)
Configure the items menuvoid
configure(Configuration configuration)
List<ClientSideElement>
getReferencedClientSideElements(Map<String,Object> contextParameters)
This method returns theClientSideElement
referenced by the menu through its menu or gallery itemsList<ClientSideElement.Script>
getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.void
service(ServiceManager serviceManager)
-
Methods inherited from class org.ametys.cms.clientsideelement.SmartContentClientSideElement
_getAllRightDescription, _getIncorrectWorkflowStepDescription, _getLockedDescription, _getNoModifiableDescription, _getNoRightDescription, _getWorkflowActionUnvailableDescription, _hasRight, _isAllRight, _isLocked, _isModifiable, _isWorkflowStepCorrect, _workflowAction, getContentDefaultParameters, getStatus
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_menuItemManager
protected ThreadSafeComponentManager<ClientSideElement> _menuItemManager
The client side element component manager for menu items.
-
_ribbonControlManager
protected RibbonControlsManager _ribbonControlManager
The ribbon control manager
-
_serviceManager
protected ServiceManager _serviceManager
The service manager.
-
_menuItems
protected List<ClientSideElement> _menuItems
The menu items
-
_primaryMenuItem
protected ClientSideElement _primaryMenuItem
The primary menu item
-
-
Constructor Detail
-
SmartContentMenu
public SmartContentMenu()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSmartContentClientSideElement
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticFileImportsClientSideElement
- Throws:
ConfigurationException
-
_configureItemsMenu
protected void _configureItemsMenu(Configuration configuration) throws ConfigurationException
Configure the items menu- Parameters:
configuration
- the configuration- Throws:
ConfigurationException
- If the configuration is not correct.
-
getScripts
public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
Description copied from interface:ClientSideElement
This method return the scripts that will be used on client side. This class will be parametrized by initial and current parameters.- Specified by:
getScripts
in interfaceClientSideElement
- Overrides:
getScripts
in classStaticFileImportsClientSideElement
- Parameters:
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The list of scripts or an empty list.
-
getReferencedClientSideElements
public List<ClientSideElement> getReferencedClientSideElements(Map<String,Object> contextParameters)
Description copied from interface:MenuClientSideElement
This method returns theClientSideElement
referenced by the menu through its menu or gallery items- Specified by:
getReferencedClientSideElements
in interfaceMenuClientSideElement
- Parameters:
contextParameters
- Contextuals parameters transmitted by the environment.- Returns:
- the referenced client side elements.
-
-