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
Modifier and TypeFieldDescriptionprotected ThreadSafeComponentManager<ClientSideElement>
The client side element component manager for menu items.protected List<ClientSideElement>
The menu itemsprotected ClientSideElement
The primary menu itemprotected RibbonControlsManager
The ribbon control managerprotected 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_configureItemsMenu
(Configuration configuration) Configure the items menuvoid
configure
(Configuration configuration) getReferencedClientSideElements
(Map<String, Object> contextParameters) This method returns theClientSideElement
referenced by the menu through its menu or gallery itemsgetScripts
(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 Details
-
_ribbonControlManager
The ribbon control manager -
_serviceManager
The service manager. -
_primaryMenuItem
The primary menu item
-
Constructor Details
-
SmartContentMenu
public SmartContentMenu()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSmartContentClientSideElement
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticFileImportsClientSideElement
- Throws:
ConfigurationException
-
_configureItemsMenu
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.
-