Package org.ametys.web.clientsideelement
Class SetContentViewMenu
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.core.ui.SimpleMenu
-
- org.ametys.web.clientsideelement.SetContentViewMenu
-
- All Implemented Interfaces:
ClientSideElement
,MenuClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class SetContentViewMenu extends SimpleMenu
Menu giving the possibility to change the view rendering the content in a given ZoneItem.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.core.ui.SimpleMenu
SimpleMenu.GalleryGroup, SimpleMenu.GalleryItem, SimpleMenu.UnresolvedItem
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint
_contentTypeExtensionPoint
The content type extension point.protected ContentTypesHelper
_contentTypesHelper
The content types helperprotected ContentTypesAssignmentHandler
_cTypeHandler
The content types assignment handlerprivate boolean
_galleryInitialized
protected I18nUtils
_i18nUtils
The i18n utilsprotected ObservationManager
_observationManager
The observation managerprotected AmetysObjectResolver
_resolver
Repository content-
Fields inherited from class org.ametys.core.ui.SimpleMenu
_galleryItems, _menuItemManager, _menuItems, _primaryMenuItem, _ribbonControlManager, _smanager, _unresolvedMenuItems
-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description SetContentViewMenu()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_getGalleryItems(Map<String,Object> parameters, Map<String,Object> contextualParameters)
Get the gallery itemsprotected Configuration
_getMetadataSetItemConfiguration(String itemId, MetadataSet metadataSet, String cTypeId)
Get the configuration for a metadata set itemprivate void
_lazyInitializeContentViewGallery()
void
service(ServiceManager serviceManager)
void
setContentView(String zoneItemId, String metadataSetName)
Set the view of a content-
Methods inherited from class org.ametys.core.ui.SimpleMenu
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getGalleryItemManager, _getGalleryItems, _getMenuItems, configure, getReferencedClientSideElements, getRights, getScripts
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_contentTypeExtensionPoint
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
The content type extension point.
-
_cTypeHandler
protected ContentTypesAssignmentHandler _cTypeHandler
The content types assignment handler
-
_contentTypesHelper
protected ContentTypesHelper _contentTypesHelper
The content types helper
-
_resolver
protected AmetysObjectResolver _resolver
Repository content
-
_observationManager
protected ObservationManager _observationManager
The observation manager
-
_i18nUtils
protected I18nUtils _i18nUtils
The i18n utils
-
_galleryInitialized
private boolean _galleryInitialized
-
-
Constructor Detail
-
SetContentViewMenu
public SetContentViewMenu()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSimpleMenu
- Throws:
ServiceException
-
_getGalleryItems
protected void _getGalleryItems(Map<String,Object> parameters, Map<String,Object> contextualParameters)
Description copied from class:SimpleMenu
Get the gallery items- Overrides:
_getGalleryItems
in classSimpleMenu
- Parameters:
parameters
- Contextual the parameters given to the control script class.contextualParameters
- Contextual parameters transmitted by the environment.
-
_lazyInitializeContentViewGallery
private void _lazyInitializeContentViewGallery() throws ConfigurationException
- Throws:
ConfigurationException
-
_getMetadataSetItemConfiguration
protected Configuration _getMetadataSetItemConfiguration(String itemId, MetadataSet metadataSet, String cTypeId)
Get the configuration for a metadata set item- Parameters:
itemId
- The item idmetadataSet
- The metadata setcTypeId
- The content type id- Returns:
- The configuration
-
setContentView
public void setContentView(String zoneItemId, String metadataSetName)
Set the view of a content- Parameters:
zoneItemId
- the id of the zone itemmetadataSetName
- the name of the metadata set to use as a view
-
-