Class CmsContextMenuEntry
- java.lang.Object
-
- org.opencms.gwt.client.ui.contextmenu.CmsContextMenuEntry
-
- All Implemented Interfaces:
I_CmsContextMenuEntry
public class CmsContextMenuEntry extends java.lang.Object implements I_CmsContextMenuEntry
Implementation for a context menu entry.- Since:
- version 8.0.0
-
-
Constructor Summary
Constructors Constructor Description CmsContextMenuEntry(I_CmsContextMenuHandler handler, org.opencms.util.CmsUUID structureId, I_CmsContextMenuCommand menuCommand)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Executes the context menu action.A_CmsContextMenuItem
generateMenuItem()
Generates the context menu item.org.opencms.gwt.shared.CmsContextMenuEntryBean
getBean()
Returns the bean.java.lang.String
getIconClass()
Returns a CSS class which should be used to display an icon, or null if no icon is required.java.lang.String
getJspPath()
Returns the JSP path for the command generation.java.lang.String
getLabel()
Returns the label (text) for the menu entry.java.lang.String
getName()
Returns the name of the entry.java.lang.String
getReason()
Returns the reason if the entry is de-activated .java.util.List<I_CmsContextMenuEntry>
getSubMenu()
Returns a list ofI_CmsContextMenuEntry
objects.boolean
hasSubMenu()
Returnstrue
if this menu entry has a sub menufalse
otherwise.boolean
isActive()
Returnstrue
if this menu entry is activefalse
otherwise.boolean
isSeparator()
Returnstrue
if this menu entry is a separatorfalse
otherwise.boolean
isVisible()
Returnstrue
if this menu entry is visiblefalse
otherwise.void
setBean(org.opencms.gwt.shared.CmsContextMenuEntryBean bean)
Sets the bean.void
setMenuCommand(I_CmsContextMenuCommand command)
Sets the command.void
setSubMenu(java.util.List<I_CmsContextMenuEntry> subMenu)
Sets the sub menu.
-
-
-
Constructor Detail
-
CmsContextMenuEntry
public CmsContextMenuEntry(I_CmsContextMenuHandler handler, org.opencms.util.CmsUUID structureId, I_CmsContextMenuCommand menuCommand)
Constructor.- Parameters:
handler
- the context menu handlerstructureId
- the structure idmenuCommand
- the menu command
-
-
Method Detail
-
execute
public void execute()
Description copied from interface:I_CmsContextMenuEntry
Executes the context menu action.- Specified by:
execute
in interfaceI_CmsContextMenuEntry
- See Also:
I_CmsContextMenuEntry.execute()
-
generateMenuItem
public A_CmsContextMenuItem generateMenuItem()
Description copied from interface:I_CmsContextMenuEntry
Generates the context menu item.- Specified by:
generateMenuItem
in interfaceI_CmsContextMenuEntry
- Returns:
- the context menu item
- See Also:
I_CmsContextMenuEntry.generateMenuItem()
-
getBean
public org.opencms.gwt.shared.CmsContextMenuEntryBean getBean()
Returns the bean.- Returns:
- the bean
-
getIconClass
public java.lang.String getIconClass()
Description copied from interface:I_CmsContextMenuEntry
Returns a CSS class which should be used to display an icon, or null if no icon is required.- Specified by:
getIconClass
in interfaceI_CmsContextMenuEntry
- Returns:
- the CSS class for the icon
- See Also:
I_CmsContextMenuEntry.getIconClass()
-
getJspPath
public java.lang.String getJspPath()
Description copied from interface:I_CmsContextMenuEntry
Returns the JSP path for the command generation.- Specified by:
getJspPath
in interfaceI_CmsContextMenuEntry
- Returns:
- the JSP path
- See Also:
I_CmsContextMenuEntry.getJspPath()
-
getLabel
public java.lang.String getLabel()
Description copied from interface:I_CmsContextMenuEntry
Returns the label (text) for the menu entry.- Specified by:
getLabel
in interfaceI_CmsContextMenuEntry
- Returns:
- the label
- See Also:
I_CmsContextMenuEntry.getLabel()
-
getName
public java.lang.String getName()
Description copied from interface:I_CmsContextMenuEntry
Returns the name of the entry.- Specified by:
getName
in interfaceI_CmsContextMenuEntry
- Returns:
- the name of the entry
- See Also:
I_CmsContextMenuEntry.getName()
-
getReason
public java.lang.String getReason()
Description copied from interface:I_CmsContextMenuEntry
Returns the reason if the entry is de-activated .- Specified by:
getReason
in interfaceI_CmsContextMenuEntry
- Returns:
- the reason
- See Also:
I_CmsContextMenuEntry.getReason()
-
getSubMenu
public java.util.List<I_CmsContextMenuEntry> getSubMenu()
Description copied from interface:I_CmsContextMenuEntry
Returns a list ofI_CmsContextMenuEntry
objects.- Specified by:
getSubMenu
in interfaceI_CmsContextMenuEntry
- Returns:
- the sub menu entries
- See Also:
I_CmsContextMenuEntry.getSubMenu()
-
hasSubMenu
public boolean hasSubMenu()
Description copied from interface:I_CmsContextMenuEntry
Returnstrue
if this menu entry has a sub menufalse
otherwise.- Specified by:
hasSubMenu
in interfaceI_CmsContextMenuEntry
- Returns:
true
if this menu entry has a sub menufalse
otherwise- See Also:
I_CmsContextMenuEntry.hasSubMenu()
-
isActive
public boolean isActive()
Description copied from interface:I_CmsContextMenuEntry
Returnstrue
if this menu entry is activefalse
otherwise.- Specified by:
isActive
in interfaceI_CmsContextMenuEntry
- Returns:
true
if this menu entry is activefalse
otherwise- See Also:
I_CmsContextMenuEntry.isActive()
-
isSeparator
public boolean isSeparator()
Description copied from interface:I_CmsContextMenuEntry
Returnstrue
if this menu entry is a separatorfalse
otherwise.- Specified by:
isSeparator
in interfaceI_CmsContextMenuEntry
- Returns:
true
if this menu entry is a separatorfalse
otherwise- See Also:
I_CmsContextMenuEntry.isSeparator()
-
isVisible
public boolean isVisible()
Description copied from interface:I_CmsContextMenuEntry
Returnstrue
if this menu entry is visiblefalse
otherwise.- Specified by:
isVisible
in interfaceI_CmsContextMenuEntry
- Returns:
true
if this menu entry is visiblefalse
otherwise- See Also:
I_CmsContextMenuEntry.isVisible()
-
setBean
public void setBean(org.opencms.gwt.shared.CmsContextMenuEntryBean bean)
Sets the bean.- Parameters:
bean
- the bean to set
-
setMenuCommand
public void setMenuCommand(I_CmsContextMenuCommand command)
Sets the command.- Parameters:
command
- the command to set
-
setSubMenu
public void setSubMenu(java.util.List<I_CmsContextMenuEntry> subMenu)
Sets the sub menu.- Parameters:
subMenu
- the sub menu to set
-
-