Class MaintenanceLink
java.lang.Object
hudson.model.ManagementLink
com.sap.prd.jenkins.plugins.agent_maintenance.MaintenanceLink
- All Implemented Interfaces:
ExtensionPoint,Action,ModelObject
Link on manage Jenkins page to list all maintenance windows of all agents.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.ManagementLink
ManagementLink.CategoryNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.ManagementLink
LIST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteMaintenance(String id, String computerName) Delete given maintenance window.String[]deleteMultiple(net.sf.json.JSONObject json) Delete selected maintenance windows.voiddoAdd(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Add a maintenance window to a list of machines.doAutoCompleteLabel(String value) doCheckLabel(String value) List of actions.getBadge()getError()The message of the last error that occured.UI method to fetch status about maintenance windows.booleanhasError()Methods inherited from class hudson.model.ManagementLink
all, getCategory, getCategoryName, getRequiresConfirmation, getRequiresPOST
-
Constructor Details
-
MaintenanceLink
public MaintenanceLink()
-
-
Method Details
-
getDescription
- Overrides:
getDescriptionin classManagementLink
-
getDisplayName
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction- Specified by:
getIconFileNamein classManagementLink
-
getUrlName
- Specified by:
getUrlNamein interfaceAction- Specified by:
getUrlNamein classManagementLink
-
getRequiredPermission
- Overrides:
getRequiredPermissionin classManagementLink
-
getAgents
List of actions.- Returns:
- List of actions
-
getError
The message of the last error that occured.- Returns:
- error message
-
hasError
public boolean hasError() -
getBadge
- Overrides:
getBadgein classManagementLink
-
deleteMaintenance
Delete given maintenance window.- Parameters:
id- The id of the maintenance to deletecomputerName- The name of the computer to which the maintenance belongs
-
deleteMultiple
Delete selected maintenance windows.- Parameters:
json- An json with maintenance ids to delete and corresponding computer names
-
getMaintenanceStatus
UI method to fetch status about maintenance windows.- Returns:
- A Map containing for each maintenance window whether it is active or not.
-
doCheckLabel
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckLabel(@QueryParameter String value) -
doAutoCompleteLabel
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public AutoCompletionCandidates doAutoCompleteLabel(@QueryParameter String value) -
doAdd
@POST public void doAdd(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Add a maintenance window to a list of machines.- Parameters:
req- StaplerRequest2rsp- StaplerResponse2- Throws:
IOException- when saving xml failedjakarta.servlet.ServletException- when reading the form failed
-
getMaintenanceWindowClass
-