public class TemplatesMenu extends SimpleMenu
SimpleMenu.GalleryGroup, SimpleMenu.GalleryItem, SimpleMenu.UnresolvedItem
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected I18nUtils |
_i18nUtils
The i18n utils
|
protected ServiceManager |
_manager
The service manager
|
protected AmetysObjectResolver |
_resolver
The Ametys object resolver
|
protected static String |
_RESOURCES_PLUGIN
The plugin in which are the templates resources (messages and icons).
|
protected SiteManager |
_siteManager
The site manager
|
protected SkinsManager |
_skinsManager
The skins manager
|
protected SourceResolver |
_sourceResolver
The source resolver
|
_galleryItemManager, _galleryItems, _menuItemManager, _menuItems, _primaryMenuItem, _referencedClientSideElement, _ribbonControlManager, _smanager, _unresolvedMenuItems
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
TemplatesMenu() |
Modifier and Type | Method and Description |
---|---|
protected void |
_getGalleryItems(Map<String,Object> parameters,
Map<String,Object> contextualParameters)
Get the gallery items
|
protected Configuration |
_getTemplateItemConfiguration(String itemId,
NewsletterTemplate template)
Get the configuration for a template item
|
private void |
_lazyInitializeTemplateGallery(Map<String,Object> contextualParameters) |
private boolean |
_templateExists(String skinId,
String id) |
protected Map<String,Object> |
getCategoryDefaultParameters(JCRCategory category)
Get the default category's parameters
|
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
Map<String,Object> |
getStatus(List<String> categoryIds)
Get the available templates for pages
|
List<String> |
getTemplate(List<String> categoryIds)
Get templates of newletter categories
|
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 SkinsManager _skinsManager
protected SiteManager _siteManager
protected SourceResolver _sourceResolver
protected ServiceManager _manager
protected I18nUtils _i18nUtils
protected AmetysObjectResolver _resolver
public TemplatesMenu()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class SimpleMenu
ServiceException
public Map<String,Object> getStatus(List<String> categoryIds)
categoryIds
- The ids of categoriesprotected Map<String,Object> getCategoryDefaultParameters(JCRCategory category)
category
- The categorypublic 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 List<String> getTemplate(List<String> categoryIds)
categoryIds
- the ids of categoriesprotected 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 _lazyInitializeTemplateGallery(Map<String,Object> contextualParameters) throws ConfigurationException
ConfigurationException
private boolean _templateExists(String skinId, String id) throws IOException
IOException
protected Configuration _getTemplateItemConfiguration(String itemId, NewsletterTemplate template)
itemId
- The item idtemplate
- The newsletter template