Class Diagnostics
- java.lang.Object
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.diagnostics.Diagnostics
-
- All Implemented Interfaces:
ModelObject
,ModelObjectWithChildren
,ModelObjectWithContextMenu
public class Diagnostics extends Object implements ModelObjectWithChildren, ModelObjectWithContextMenu
Sub page onGerritManagement
containing some diagnostic views.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
-
Constructor Summary
Constructors Constructor Description Diagnostics()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelObjectWithContextMenu.ContextMenu
doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
ModelObjectWithContextMenu.ContextMenu
doContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
void
doTriggerDebugEvent(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Triggers aManualPatchsetCreated
event with some random data for debug purposes in a dev environment.BuildMemoryReport
getBuildMemory()
A report of the currently coordinated builds.ModelObjectWithContextMenu.ContextMenu
getContextMenu(String context)
Helper method to produce the breadcrumb context menu.String
getDisplayName()
EventListenersReport
getEventListeners()
A report of all registeredGerritEventListener
s in the system.static Permission
getRequiredPermission()
The Jenkins permission required to view the diagnostic reports.boolean
isDebugMode()
Checks if the plugin is running in a development environment.
-
-
-
Method Detail
-
doChildrenContextMenu
public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws Exception
- Specified by:
doChildrenContextMenu
in interfaceModelObjectWithChildren
- Throws:
Exception
-
getContextMenu
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public ModelObjectWithContextMenu.ContextMenu getContextMenu(String context)
Helper method to produce the breadcrumb context menu.- Parameters:
context
- the url prefix to put on all urls.- Returns:
- the selectable reports.
- See Also:
doChildrenContextMenu(StaplerRequest, StaplerResponse)
,GerritManagement.doContextMenu(StaplerRequest, StaplerResponse)
-
getRequiredPermission
@NonNull public static Permission getRequiredPermission()
The Jenkins permission required to view the diagnostic reports.- Returns:
- the permission
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
-
getBuildMemory
@CheckForNull public BuildMemoryReport getBuildMemory()
A report of the currently coordinated builds.- Returns:
- the build memory coordination report.
- See Also:
BuildMemory.report()
-
getEventListeners
@CheckForNull public EventListenersReport getEventListeners()
A report of all registeredGerritEventListener
s in the system. Intended to be accessed via Stapler URL mapping.- Returns:
- the listeners report.
-
doContextMenu
public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws Exception
- Specified by:
doContextMenu
in interfaceModelObjectWithContextMenu
- Throws:
Exception
-
doTriggerDebugEvent
public void doTriggerDebugEvent(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
Triggers aManualPatchsetCreated
event with some random data for debug purposes in a dev environment.- Parameters:
request
- staplerresponse
- stapler- Throws:
IOException
- if so- See Also:
isDebugMode()
-
isDebugMode
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isDebugMode()
Checks if the plugin is running in a development environment.- Returns:
- true if debug
-
-