public class LanguageMenu extends SimpleMenu
SimpleMenu.GalleryGroup, SimpleMenu.GalleryItem, SimpleMenu.UnresolvedItem
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected I18nUtils |
_i18nUtils
The i18n utils
|
private boolean |
_languagesInitialized |
protected LanguagesManager |
_languagesManager
The language manager
|
protected static String |
_RESOURCES_PLUGIN
The plugin in which are the language resources (messages and icons).
|
_galleryItemManager, _galleryItems, _menuItemManager, _menuItems, _primaryMenuItem, _referencedClientSideElement, _ribbonControlManager, _smanager, _unresolvedMenuItems
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
LanguageMenu() |
Modifier and Type | Method and Description |
---|---|
private void |
_addChildrenToConf(DefaultConfiguration conf,
Map<String,Object> childrenAsMap) |
protected void |
_getGalleryItems(Map<String,Object> parameters,
Map<String,Object> contextualParameters)
Get the gallery items
|
protected Configuration |
_getLanguageItemConfiguration(String itemId,
Language language)
Get the configuration for a language item
|
private void |
_lazyInitializeLanguageGallery(Map<String,Object> contextualParameters) |
protected Map<String,Language> |
getAvailableLanguages(Map<String,Object> contextualParameters)
Get the available languages
|
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
void |
service(ServiceManager smanager) |
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getMenuItems, configure, getReferencedClientSideElements, getRights
_configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected static final String _RESOURCES_PLUGIN
protected LanguagesManager _languagesManager
protected I18nUtils _i18nUtils
private boolean _languagesInitialized
public LanguageMenu()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class SimpleMenu
ServiceException
protected void _getGalleryItems(Map<String,Object> parameters, Map<String,Object> contextualParameters)
SimpleMenu
_getGalleryItems
in class SimpleMenu
parameters
- Contextual the parameters given to the control script class.contextualParameters
- Contextual parameters transmitted by the environment.private void _lazyInitializeLanguageGallery(Map<String,Object> contextualParameters) throws ConfigurationException
ConfigurationException
protected Map<String,Language> getAvailableLanguages(Map<String,Object> contextualParameters)
contextualParameters
- The contextual parameterspublic 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 Configuration _getLanguageItemConfiguration(String itemId, Language language)
itemId
- The item idlanguage
- The languageprivate void _addChildrenToConf(DefaultConfiguration conf, Map<String,Object> childrenAsMap)