Package jenkins.model
Class ModelObjectWithContextMenu.MenuItem
java.lang.Object
jenkins.model.ModelObjectWithContextMenu.MenuItem
- Enclosing interface:
ModelObjectWithContextMenu
Menu item in
ModelObjectWithContextMenu.ContextMenu-
Field Summary
FieldsModifier and TypeFieldDescriptionHuman readable caption of the menu item.Optional URL to the icon image.booleanTrue to make a POST request rather than GET.booleanTrue to require confirmation after a click.If this is a submenu, definition of subitems.The type of menu itemTarget of the link. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBadge()The badge to display for the context menu itemThe URL that this item's relative URLs resolve against, overriding the one of the menu it's shown in.getEvent()getGroup()Deprecated.Sets the URL by passing in a URL relative to the context path of JenkinswithDisplayName(String displayName) withIconClass(String iconClass) withIconXml(String icon) 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
public MenuItem()
-
-
Method Details
-
getIconXml
-
getBadge
The badge to display for the context menu item- Since:
- 2.401
-
getDescription
-
getGroup
-
getEvent
-
getSemantic
-
getBaseUrl
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Exported public String getBaseUrl()The URL that this item's relative URLs resolve against, overriding the one of the menu it's shown in. -
getMessage
Deprecated. -
withUrl
-
withContextRelativeUrl
Sets the URL by passing in a URL relative to the context path of Jenkins -
withIcon
-
withIconXml
-
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
-