Package jenkins.model
Class ModelObjectWithContextMenu.MenuItem
- java.lang.Object
-
- jenkins.model.ModelObjectWithContextMenu.MenuItem
-
- Enclosing interface:
- ModelObjectWithContextMenu
@ExportedBean public static class ModelObjectWithContextMenu.MenuItem extends Object
Menu item inModelObjectWithContextMenu.ContextMenu
-
-
Field Summary
Fields Modifier and Type Field Description String
displayName
Human readable caption of the menu item.String
icon
Optional URL to the icon image.boolean
post
True to make a POST request rather than GET.boolean
requiresConfirmation
True to require confirmation after a click.ModelObjectWithContextMenu.ContextMenu
subMenu
If this is a submenu, definition of subitems.ModelObjectWithContextMenu.MenuItemType
type
The type of menu itemString
url
Target of the link.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getIconXml()
ModelObjectWithContextMenu.MenuItem
withContextRelativeUrl(String url)
Sets the URL by passing in a URL relative to the context path of JenkinsModelObjectWithContextMenu.MenuItem
withDisplayName(ModelObject o)
ModelObjectWithContextMenu.MenuItem
withDisplayName(String displayName)
ModelObjectWithContextMenu.MenuItem
withIcon(BallColor color)
ModelObjectWithContextMenu.MenuItem
withIcon(String icon)
ModelObjectWithContextMenu.MenuItem
withIconClass(String iconClass)
ModelObjectWithContextMenu.MenuItem
withStockIcon(String icon)
Sets the icon from core's stock iconModelObjectWithContextMenu.MenuItem
withUrl(String url)
-
-
-
Field Detail
-
url
@Exported public String 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
@Exported public String displayName
Human readable caption of the menu item. Do not use HTML.
-
icon
@Exported public String icon
Optional URL to the icon image. Rendered as 24x24.
-
post
@Exported public boolean post
True to make a POST request rather than GET.- Since:
- 1.504
-
requiresConfirmation
@Exported public boolean requiresConfirmation
True to require confirmation after a click.- Since:
- 1.512
-
type
@Exported public ModelObjectWithContextMenu.MenuItemType type
The type of menu item- Since:
- 2.340
-
subMenu
@Exported(inline=true) public ModelObjectWithContextMenu.ContextMenu subMenu
If this is a submenu, definition of subitems.
-
-
Method Detail
-
getIconXml
@Exported public String getIconXml()
-
withUrl
public ModelObjectWithContextMenu.MenuItem withUrl(String url)
-
withContextRelativeUrl
public ModelObjectWithContextMenu.MenuItem withContextRelativeUrl(String url)
Sets the URL by passing in a URL relative to the context path of Jenkins
-
withIcon
public ModelObjectWithContextMenu.MenuItem withIcon(String icon)
-
withIcon
public ModelObjectWithContextMenu.MenuItem withIcon(BallColor color)
-
withStockIcon
public ModelObjectWithContextMenu.MenuItem withStockIcon(String icon)
Sets the icon from core's stock icon- Parameters:
icon
- String like "gear.png" that resolves to 24x24 stock icon in the core
-
withIconClass
public ModelObjectWithContextMenu.MenuItem withIconClass(String iconClass)
-
withDisplayName
public ModelObjectWithContextMenu.MenuItem withDisplayName(String displayName)
-
withDisplayName
public ModelObjectWithContextMenu.MenuItem withDisplayName(ModelObject o)
-
-