Class MaintenanceWindow

    • Constructor Detail

      • MaintenanceWindow

        @Deprecated
        public MaintenanceWindow​(String startTime,
                                 String endTime,
                                 String reason,
                                 boolean takeOnline,
                                 boolean keepUpWhenActive,
                                 int maxWaitMinutes,
                                 String userid,
                                 String id)
        Deprecated.
        Create a new maintenance window.
        Parameters:
        startTime - Start time
        endTime - End time
        reason - Reason
        takeOnline - Take online at end of maintenance
        keepUpWhenActive - Keep up while builds are running
        maxWaitMinutes - Max waiting time before canceling running builds.
        userid - Userid that created the maintenance window
        id - ID of the maintenance, use null to generate a new id
      • MaintenanceWindow

        @DataBoundConstructor
        public MaintenanceWindow​(String startTime,
                                 String endTime,
                                 String reason,
                                 boolean takeOnline,
                                 boolean keepUpWhenActive,
                                 String maxWaitMinutes,
                                 String userid,
                                 String id)
        Create a new maintenance window.
        Parameters:
        startTime - Start time
        endTime - End time
        reason - Reason
        takeOnline - Take online at end of maintenance
        keepUpWhenActive - Keep up while builds are running
        maxWaitMinutes - Max waiting time before canceling running builds. Can be a number or a string with a timespan, e.g. "1d 2h 15m"
        userid - Userid that created the maintenance window
        id - ID of the maintenance, use null to generate a new id
      • MaintenanceWindow

        public MaintenanceWindow​(LocalDateTime startTime,
                                 LocalDateTime endTime,
                                 String reason,
                                 boolean takeOnline,
                                 boolean keepUpWhenActive,
                                 String maxWaitMinutes,
                                 String userid,
                                 String id)
        Create a new maintenance window.
        Parameters:
        startTime - Start time
        endTime - End time
        reason - Reason
        takeOnline - Take online at end of maintenance
        keepUpWhenActive - Keep up while builds are running
        maxWaitMinutes - Max waiting time before canceling running builds. Can be a number or a string with a timespan, e.g. "1d 2h 15m"
        userid - Userid that created the maintenance window
        id - ID of the maintenance, use null to generate a new id
    • Method Detail

      • getId

        public String getId()
      • getUserid

        public String getUserid()
      • isKeepUpWhenActive

        public boolean isKeepUpWhenActive()
      • buildsHaveBeenAborted

        public boolean buildsHaveBeenAborted()
      • setAborted

        public void setAborted​(boolean aborted)
      • getMaxWaitMinutes

        public int getMaxWaitMinutes()
      • isTakeOnline

        public boolean isTakeOnline()
      • readResolve

        protected Object readResolve()
      • getStartTime

        public String getStartTime()
      • getEndTime

        public String getEndTime()
      • getReason

        public String getReason()
      • isMaxWaitTimeFinished

        public boolean isMaxWaitTimeFinished()
        Checks if max waiting time is finished.
        Returns:
        true when waiting is finished
      • isMaintenanceScheduled

        public boolean isMaintenanceScheduled()
        Return the status of the maintenance.
        Returns:
        true if the maintenance is active, false otherwise.
      • isMaintenanceOver

        public boolean isMaintenanceOver()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object