public class ContentTypesMenuItem extends SimpleMenu
Modifier and Type | Class and Description |
---|---|
(package private) class |
ContentTypesMenuItem.ContentTypeComparator |
(package private) class |
ContentTypesMenuItem.I18nizableTextComparator |
SimpleMenu.GalleryGroup, SimpleMenu.GalleryItem, SimpleMenu.UnresolvedItem
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
private Set<String> |
_addedComponents |
protected ContentTypeExtensionPoint |
_contentTypeExtensionPoint
The list of content types
|
private boolean |
_contentTypesInitialized |
protected I18nUtils |
_i18nUtils
The i18n utils
|
protected RootContentHelper |
_rootContentHelper
Helper for root content
|
_galleryItemManager, _galleryItems, _menuItemManager, _menuItems, _primaryMenuItem, _referencedClientSideElement, _ribbonControlManager, _smanager, _unresolvedMenuItems
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
ContentTypesMenuItem() |
Modifier and Type | Method and Description |
---|---|
protected Configuration |
_getContentTypeConfiguration(String id,
ContentType cType)
Get the configuration of the content type item
|
protected Map<I18nizableText,Set<ContentType>> |
_getContentTypesByGroup()
Get the list of content types classified by groups
|
private void |
_lazyInitializeContentTypeMenu() |
protected void |
addContentType(ContentType contentType,
Map<I18nizableText,Set<ContentType>> groups)
Add content to groups
|
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
protected boolean |
hasRight(ContentType cType)
Test if the current user has the right needed by the content type to create a content.
|
protected boolean |
isValidContentType(ContentType contentType)
Determines if the content type is a valid content type for the gallery
|
void |
service(ServiceManager smanager) |
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getGalleryItems, _getMenuItems, configure, getReferencedClientSideElements, getRights
_configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
protected I18nUtils _i18nUtils
protected RootContentHelper _rootContentHelper
private boolean _contentTypesInitialized
private Set<String> _addedComponents
public ContentTypesMenuItem()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class SimpleMenu
ServiceException
private void _lazyInitializeContentTypeMenu()
protected Configuration _getContentTypeConfiguration(String id, ContentType cType)
id
- The id of itemcType
- The content typeprotected Map<I18nizableText,Set<ContentType>> _getContentTypesByGroup()
protected void addContentType(ContentType contentType, Map<I18nizableText,Set<ContentType>> groups)
contentType
- The content typegroups
- The groupspublic List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
ClientSideElement
getScripts
in interface ClientSideElement
getScripts
in class SimpleMenu
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.protected boolean isValidContentType(ContentType contentType)
contentType
- The coententprotected boolean hasRight(ContentType cType)
cType
- the content type