Class MaintenanceLink

    • Constructor Detail

      • MaintenanceLink

        public MaintenanceLink()
    • Method Detail

      • getDisplayName

        public String getDisplayName()
      • getError

        public String getError()
        The message of the last error that occured.
        Returns:
        error message
      • hasError

        public boolean hasError()
      • deleteMaintenance

        @JavaScriptMethod
        public boolean deleteMaintenance​(String id,
                                         String computerName)
                                  throws IOException,
                                         javax.servlet.ServletException
        Delete given maintenance window.
        Parameters:
        id - The id of the maintenance to delete
        computerName - The name of the computer to which the maintenance belongs
        Throws:
        IOException
        javax.servlet.ServletException
      • deleteMultiple

        @JavaScriptMethod
        public String[] deleteMultiple​(net.sf.json.JSONObject json)
                                throws IOException,
                                       javax.servlet.ServletException
        Delete selected maintenance windows.
        Parameters:
        json - An json with maintenance ids to delete and corresponding computer names
        Throws:
        IOException
        javax.servlet.ServletException
      • getMaintenanceStatus

        @JavaScriptMethod
        public Map<String,​Boolean> 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.StaplerRequest req,
                          org.kohsuke.stapler.StaplerResponse rsp)
                   throws IOException,
                          javax.servlet.ServletException
        Add a maintenance window to a list of machines.
        Parameters:
        req - StaplerRequest
        rsp - StaplerResponse
        Throws:
        IOException - when saving xml failed
        javax.servlet.ServletException - when reading the form failed