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
Menu giving the possibility to change the view rendering the content in a given ZoneItem.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder to get a view item configurationNested 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
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The Ametys object resolver instanceprotected ContentTypeExtensionPoint
The content type extension point.protected ContentTypesAssignmentHandler
The content types assignment handler instanceprotected ContentTypesHelper
The content types helperprotected ContentTypesAssignmentHandler
The content types assignment handlerprotected I18nUtils
The i18n utilsprotected ObservationManager
The observation managerprotected AmetysObjectResolver
Repository contentprotected SkinContentViewHelper
Helper for skin viewsprotected SkinsManager
The skins managerFields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Get the gallery itemsprotected Configuration
_getViewItemConfiguration
(String itemId, View view, String cTypeId) Get the configuration for a view itemprotected Configuration
_getViewItemConfiguration
(String itemId, SkinContentViewHelper.SkinContentView view, String cTypeId) Get the configuration for a skin view itemGet the list of the available views for the given zone item denoting a contentvoid
service
(ServiceManager serviceManager) void
setContentView
(String zoneItemId, String viewName) Set the view of a contentMethods inherited from class org.ametys.core.ui.SimpleMenu
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getGalleryItemManager, _getGalleryItems, _getMenuItems, _initializeGalleryItemManager, 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 Details
-
_contentTypeExtensionPoint
The content type extension point. -
_cTypeHandler
The content types assignment handler -
_contentTypesHelper
The content types helper -
_resolver
Repository content -
_skinContentViewHelper
Helper for skin views -
_observationManager
The observation manager -
_skinsManager
The skins manager -
_i18nUtils
The i18n utils -
_ametysObjectResolver
The Ametys object resolver instance -
_contentTypesAssignmentHandler
The content types assignment handler instance
-
-
Constructor Details
-
SetContentViewMenu
public SetContentViewMenu()
-
-
Method Details
-
service
- 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.
-
_getViewItemConfiguration
Get the configuration for a view item- Parameters:
itemId
- The item idview
- The viewcTypeId
- The content type id- Returns:
- The configuration
-
_getViewItemConfiguration
protected Configuration _getViewItemConfiguration(String itemId, SkinContentViewHelper.SkinContentView view, String cTypeId) Get the configuration for a skin view item- Parameters:
itemId
- The item idview
- The skin viewcTypeId
- The content type id- Returns:
- The configuration
-
setContentView
Set the view of a content- Parameters:
zoneItemId
- the id of the zone itemviewName
- the name of the view to use
-
getViews
Get the list of the available views for the given zone item denoting a content- Parameters:
zoneitemId
- The zone item id- Returns:
- The list of the view names by content type. Can be null or empty.
-