public class ServiceMenu extends AbstractPageMenu
Modifier and Type | Class and Description |
---|---|
(package private) class |
ServiceMenu.I18nizableTextComparator |
(package private) class |
ServiceMenu.ServiceComparator |
SimpleMenu.GalleryGroup, SimpleMenu.GalleryItem, SimpleMenu.UnresolvedItem
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected I18nUtils |
_i18nUtils
The i18n utils
|
protected PageDAO |
_pageDAO
The service assignment handler
|
protected ServiceExtensionPoint |
_serviceExtensionPoint
The list of content types
|
private boolean |
_servicesInitialized |
_resolver, _synchronizeComponent
_galleryItemManager, _galleryItems, _menuItemManager, _menuItems, _primaryMenuItem, _referencedClientSideElement, _ribbonControlManager, _smanager, _unresolvedMenuItems
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
ServiceMenu() |
Modifier and Type | Method and Description |
---|---|
protected ClientSideElement.Script |
_configureScript(Configuration configuration)
Configure the script
|
protected void |
_getGalleryItems(Map<String,Object> parameters,
Map<String,Object> contextualParameters)
Get the gallery items
|
protected Configuration |
_getServiceConfiguration(String id,
Service service)
Get the configuration of the service item
|
protected Map<I18nizableText,Set<Service>> |
_getServicesByGroup()
Get the list of services classified by groups
|
private void |
_lazyInitializeServiceGallery() |
protected void |
addService(Service service,
Map<I18nizableText,Set<Service>> groups)
Add service to groups
|
Map<String,Object> |
getAvailableServices(String pageId,
String zoneName)
Get the available templates for pages
|
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(Service service,
Page page)
Test if the current user has the right needed by the service to create it.
|
protected boolean |
isValidService(Service service)
Determines if the service is a valid service for the gallery
|
void |
service(ServiceManager smanager) |
getAllRightPageDescription, getNoModifiablePageDescription, getNoRightPageDescription, getPageDefaultParameters, hasRight
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getMenuItems, configure, getReferencedClientSideElements, getRights
_configureParameters, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected ServiceExtensionPoint _serviceExtensionPoint
protected I18nUtils _i18nUtils
private boolean _servicesInitialized
public ServiceMenu()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class AbstractPageMenu
ServiceException
protected ClientSideElement.Script _configureScript(Configuration configuration) throws ConfigurationException
StaticFileImportsClientSideElement
_configureScript
in class StaticClientSideElement
configuration
- the global configurationConfigurationException
- The configuration is incorrectpublic 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.public Map<String,Object> getAvailableServices(String pageId, String zoneName)
pageId
- The id of the pagezoneName
- the name of the zoneprotected 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 _lazyInitializeServiceGallery() throws ConfigurationException
ConfigurationException
protected Map<I18nizableText,Set<Service>> _getServicesByGroup()
protected void addService(Service service, Map<I18nizableText,Set<Service>> groups)
service
- The servicegroups
- The groupsprotected boolean isValidService(Service service)
service
- The serviceprotected Configuration _getServiceConfiguration(String id, Service service)
id
- The id of itemservice
- The service