Package io.jenkins.plugins.monitoring
Class MonitorPortletFactory
java.lang.Object
io.jenkins.plugins.monitoring.MonitorPortletFactory
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
DemoPortlet.ExampleMonitorFactory
Defines the ExtensionPoint to register one or more new pull request monitoring portlets.
The getDisplayName() is shown in a dropdown list as optgroup. The children of the optgroup
are the registered portlets of getPortlets(Run).
Since an empty dashboard is always added by default, it is possible that the method getPortlets(Run) will
be called even though the current run may not be finished. It is therefore advisable to perform a null check on
the actions of the run required by your portlet and return an empty list if necessary.
(Example: code-coverage-api)
- Since:
- 1.6.0
- Author:
- Simon Symhoven
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringDefines the name of the factory.abstract Collection<MonitorPortlet> getPortlets(Run<?, ?> build) Get a collection ofMonitorPortletto display.
-
Constructor Details
-
MonitorPortletFactory
public MonitorPortletFactory()
-
-
Method Details
-
getPortlets
Get a collection ofMonitorPortletto display.- Parameters:
build- the referenceRun.- Returns:
- a collection of
MonitorPortlet.
-
getDisplayName
Defines the name of the factory.- Returns:
- the name to display for the factory.
-