Package jenkins.model
Class ModelObjectWithContextMenu.MenuItem
java.lang.Object
jenkins.model.ModelObjectWithContextMenu.MenuItem
- Enclosing interface:
- ModelObjectWithContextMenu
Menu item in
ModelObjectWithContextMenu.ContextMenu
-
Field Summary
Modifier and TypeFieldDescriptionHuman readable caption of the menu item.Optional URL to the icon image.boolean
True to make a POST request rather than GET.boolean
True to require confirmation after a click.If this is a submenu, definition of subitems.The type of menu itemTarget of the link. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBadge()
The badge to display for the context menu itemSets the URL by passing in a URL relative to the context path of JenkinswithDisplayName
(String displayName) withIconClass
(String iconClass) withStockIcon
(String icon) Sets the icon from core's stock icon
-
Field Details
-
url
Target of the link. This can start with '/', but it must not be a relative URL, since you cannot really tell which page this context menu is used. -
displayName
Human readable caption of the menu item. Do not use HTML. -
icon
Optional URL to the icon image. Rendered as 24x24. -
post
@Exported public boolean postTrue to make a POST request rather than GET.- Since:
- 1.504
-
requiresConfirmation
@Exported public boolean requiresConfirmationTrue to require confirmation after a click.- Since:
- 1.512
-
type
The type of menu item- Since:
- 2.340
-
subMenu
If this is a submenu, definition of subitems.
-
-
Constructor Details
-
MenuItem
-
MenuItem
public MenuItem()
-
-
Method Details
-
getIconXml
-
getBadge
The badge to display for the context menu item- Since:
- 2.401
-
getMessage
-
withUrl
-
withContextRelativeUrl
Sets the URL by passing in a URL relative to the context path of Jenkins -
withIcon
-
withIcon
-
withStockIcon
Sets the icon from core's stock icon- Parameters:
icon
- String like "gear.png" that resolves to 24x24 stock icon in the core
-
withIconClass
-
withDisplayName
-
withDisplayName
-