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 StringdisplayNameHuman readable caption of the menu item.StringiconOptional URL to the icon image.booleanpostTrue to make a POST request rather than GET.booleanrequiresConfirmationTrue to require confirmation after a click.ModelObjectWithContextMenu.ContextMenusubMenuIf this is a submenu, definition of subitems.ModelObjectWithContextMenu.MenuItemTypetypeThe type of menu itemStringurlTarget of the link.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BadgegetBadge()The badge to display for the context menu itemStringgetIconXml()StringgetMessage()ModelObjectWithContextMenu.MenuItemwithContextRelativeUrl(String url)Sets the URL by passing in a URL relative to the context path of JenkinsModelObjectWithContextMenu.MenuItemwithDisplayName(ModelObject o)ModelObjectWithContextMenu.MenuItemwithDisplayName(String displayName)ModelObjectWithContextMenu.MenuItemwithIcon(BallColor color)ModelObjectWithContextMenu.MenuItemwithIcon(String icon)ModelObjectWithContextMenu.MenuItemwithIconClass(String iconClass)ModelObjectWithContextMenu.MenuItemwithStockIcon(String icon)Sets the icon from core's stock iconModelObjectWithContextMenu.MenuItemwithUrl(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()
-
getBadge
@Exported public Badge getBadge()
The badge to display for the context menu item- Since:
- 2.401
-
getMessage
@Exported public String getMessage()
-
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)
-
-