Package org.ametys.cms.clientsideelement
Class FormEditionModeMenu
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.core.ui.SimpleMenu
-
- org.ametys.cms.clientsideelement.FormEditionModeMenu
-
- All Implemented Interfaces:
ClientSideElement
,MenuClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class FormEditionModeMenu extends SimpleMenu
This element creates a menu for the tag policy gallery. This gallery must be disabled is the current edited content does not contain any tab.
-
-
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 ContentTypeExtensionPoint
_contentTypeExtensionPoint
Content type extension point.protected ContentTypesHelper
_contentTypesHelper
Helper for content typesprotected AmetysObjectResolver
_resolver
The ametys resolver-
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 FormEditionModeMenu()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
_searchForTabFieldSet(List<AbstractMetadataSetElement> elements)
Determines if at least one tab in present in this list ofAbstractMetadataSetElement
Map<String,Object>
getStatus(String contentId, String metadataSetName, String fallbackMetadataSetName)
Return the current status of this menu.void
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.core.ui.SimpleMenu
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getGalleryItemManager, _getGalleryItems, _getGalleryItems, _getMenuItems, configure, getReferencedClientSideElements, getRights, getScripts
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureParameters, _configureScript, 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
The ametys resolver
-
_contentTypeExtensionPoint
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
Content type extension point.
-
_contentTypesHelper
protected ContentTypesHelper _contentTypesHelper
Helper for content types
-
-
Constructor Detail
-
FormEditionModeMenu
public FormEditionModeMenu()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSimpleMenu
- Throws:
ServiceException
-
getStatus
public Map<String,Object> getStatus(String contentId, String metadataSetName, String fallbackMetadataSetName)
Return the current status of this menu. It determines if the current content contain at least one tab in edition.- Parameters:
contentId
- The id of the contentmetadataSetName
- The name of the metadata set in which the search must be done.fallbackMetadataSetName
- The name of the fallback metadata set if the initial was not found. Can be null.- Returns:
- A Map with ("has-tab", true/false).
-
_searchForTabFieldSet
private boolean _searchForTabFieldSet(List<AbstractMetadataSetElement> elements)
Determines if at least one tab in present in this list ofAbstractMetadataSetElement
- Parameters:
elements
- The list ofAbstractMetadataSetElement
- Returns:
- true if one tab has been found.
-
-