Package org.ametys.web.clientsideelement
Class ContentTypesGallery
-
- All Implemented Interfaces:
ClientSideElement
,MenuClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class ContentTypesGallery extends ContentTypesGallery
This element finally creates a gallery button with one item per content type
-
-
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 PageDAO
_pageDAO
The DAO for pagesprotected AmetysObjectResolver
_resolver
Repository content-
Fields inherited from class org.ametys.cms.clientsideelement.ContentTypesGallery
_contentTypeExtensionPoint, _i18nUtils, _languagesManager, _rootContentHelper
-
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 ContentTypesGallery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAvailableContentTypes(String pageId, String zoneName)
Get the available content types for given page and zoneprotected boolean
hasRight(ContentType cType)
Test if the current user has the right needed by the content type to create a content.void
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.cms.clientsideelement.ContentTypesGallery
_addContentTypeConfiguration, _addContentTypeIconsConfiguration, _addGroupContentTypeConfiguration, _addRightsOnContentTypeConfiguration, _configureScript, _getContentTypesByGroup, _getGalleryItems, _getI18nizableTextConfiguration, addContentType, getScripts, isValidContentType
-
Methods inherited from class org.ametys.core.ui.SimpleMenu
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getGalleryItemManager, _getGalleryItems, _getMenuItems, configure, getReferencedClientSideElements, getRights
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureParameters, 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
-
_resolver
protected AmetysObjectResolver _resolver
Repository content
-
-
Constructor Detail
-
ContentTypesGallery
public ContentTypesGallery()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentTypesGallery
- Throws:
ServiceException
-
getAvailableContentTypes
public List<String> getAvailableContentTypes(String pageId, String zoneName)
Get the available content types for given page and zone- Parameters:
pageId
- The page's idzoneName
- The zone's name- Returns:
- The available content types
-
hasRight
protected boolean hasRight(ContentType cType)
Description copied from class:ContentTypesGallery
Test if the current user has the right needed by the content type to create a content.- Overrides:
hasRight
in classContentTypesGallery
- Parameters:
cType
- the content type- Returns:
- true if the user has the right needed, false otherwise.
-
-