Class MaintenanceAction
java.lang.Object
com.sap.prd.jenkins.plugins.agent_maintenance.MaintenanceAction
- All Implemented Interfaces:
Action,ModelObject
Action to display link to maintenance window configuration.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanUI method to delete a maintenance window.String[]deleteMultiple(String[] ids) UI method to delete multiple maintenance windows.String[]deleteMultipleRecurring(String[] ids) UI method to delete multiple recurring maintenance windows.booleanUI method to delete a recurring maintenance window.org.kohsuke.stapler.HttpResponsedoAdd(org.kohsuke.stapler.StaplerRequest2 req) UI method to add a maintenance window.voiddoAddRecurring(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) UI method to add a recurring maintenance window.org.kohsuke.stapler.HttpResponsedoConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req) UI method to submit the configuration.voiddoDisable(org.kohsuke.stapler.StaplerResponse2 rsp) UI method to remove the retention strategy.voiddoEnable(org.kohsuke.stapler.StaplerResponse2 rsp) UI method to enable the retention strategy.static StringThe default end time shown in the UI when adding a new maintenance windows.static StringThe default start time shown in the UI when adding a new maintenance windows.UI method to fetch status about maintenance windows.Returns a list of maintenance windows.Returns a list of recurring maintenance windows.booleanReturn whether there are active maintenance windows.booleanReturn whether there are maintenance windows defined.booleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Action
getDescription, getEvent, getGroup, getSemantic, isVisibleInContextMenu
-
Field Details
-
CONFIGURE_AND_DISCONNECT
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final Permission[] CONFIGURE_AND_DISCONNECT
-
-
Constructor Details
-
MaintenanceAction
-
-
Method Details
-
getComputer
-
isVisible
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isVisible() -
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getMaintenanceWindowClass
-
getRecurringMaintenanceWindowClass
-
isEnabled
public boolean isEnabled() -
getDefaultStartTime
The default start time shown in the UI when adding a new maintenance windows. Current time.- Returns:
- end time
-
getDefaultEndTime
The default end time shown in the UI when adding a new maintenance windows. Current time + 1 day.- Returns:
- end time
-
hasMaintenanceWindows
public boolean hasMaintenanceWindows()Return whether there are maintenance windows defined.- Returns:
- true when there are maintenance windows defined.
-
hasActiveMaintenanceWindows
public boolean hasActiveMaintenanceWindows()Return whether there are active maintenance windows.- Returns:
- true when there are active maintenance windows defined.
-
getMaintenanceWindows
Returns a list of maintenance windows.- Returns:
- A list of maintenance windows
-
getRecurringMaintenanceWindows
Returns a list of recurring maintenance windows.- Returns:
- A list of recurring maintenance windows
-
doAdd
@POST public org.kohsuke.stapler.HttpResponse doAdd(org.kohsuke.stapler.StaplerRequest2 req) throws IOException, jakarta.servlet.ServletException UI method to add a maintenance window.- Parameters:
req- Stapler Request- Returns:
- Response containing the result of the add
- Throws:
IOException- when writing failsjakarta.servlet.ServletException- if an error occurs reading the form
-
doAddRecurring
@POST public void doAddRecurring(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException UI method to add a recurring maintenance window.- Parameters:
req- Stapler Requestrsp- Stapler Response- Throws:
IOException- when writing failsjakarta.servlet.ServletException- if an error occurs reading the form
-
deleteMultiple
UI method to delete multiple maintenance windows.- Parameters:
ids- A list of maintenance window ids to delete
-
getMaintenanceStatus
UI method to fetch status about maintenance windows.- Returns:
- A Map containing for each maintenance window whether it is active or not.
-
deleteMultipleRecurring
UI method to delete multiple recurring maintenance windows.- Parameters:
ids- A list of recurring maintenance window ids to delete
-
deleteMaintenance
UI method to delete a maintenance window.- Parameters:
id- The id of the maintenance to delete
-
deleteRecurringMaintenance
UI method to delete a recurring maintenance window.- Parameters:
id- The id of the maintenance to delete
-
doConfigSubmit
@POST public org.kohsuke.stapler.HttpResponse doConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req) throws IOException, jakarta.servlet.ServletException UI method to submit the configuration.- Parameters:
req- Stapler Request- Returns:
- Response containing the result of the add
- Throws:
IOException- when writing failsjakarta.servlet.ServletException- if an error occurs reading the form
-
doEnable
UI method to enable the retention strategy.- Parameters:
rsp- Stapler Response- Throws:
IOException- when something goes wrong
-
doDisable
UI method to remove the retention strategy.- Parameters:
rsp- Stapler Response- Throws:
IOException- when something goes wrong
-