Package de.espirit.firstspirit.server
Interface MaintenanceModeInfo
public interface MaintenanceModeInfo
Provides current information about an active 
MaintenanceModeTask.- Since:
- 5.2.518, 5.2.605
- 
Method SummaryModifier and TypeMethodDescriptionIndicates if other tasks may be executed while the maintenance mode is active.@Nullable MaintenanceModeTask.MaintenanceStageA maintenance mode task consists of up to five stages, from an initial preparation period up to activating the actual maintenance mode.@NotNull StringThe description of this maintenance mode.@NotNull MaintenanceModeTask.DisconnectModeIndicates the handling of existing sessions once the stageMaintenanceModeTask.MaintenanceStage.MAINTENANCE_MODE_ACTIVEbegins.longgetDurationOfStageInMillis(@NotNull MaintenanceModeTask.MaintenanceStage stage) Each stage has a duration after which the next stage is started.longgetId()The automatically assigned, internal id.@NotNull MaintenanceModeTask.MaintenanceScopeIndicates the scope of this maintenance task, i.e. if only certain projects or the whole server is affected.@NotNull StringThe message which is displayed to all users once the task has been started.Indicates how the message is displayed to the users.All projects affected by the maintenance task.longThe id of the related schedule entry.@NotNull ZonedDateTimegetStartingTimeOfStage(@NotNull MaintenanceModeTask.MaintenanceStage stage) EachMaintenanceModeTask.MaintenanceStageis started at a particular time if the task is not stopped prematurely.@NotNull DategetStartingTimeOfStageAsDate(@NotNull MaintenanceModeTask.MaintenanceStage stage) Deprecated, for removal: This API element is subject to removal in a future version.This method may be used to determine the remaining duration of the currently active stage.longDeprecated, for removal: This API element is subject to removal in a future version.since 5.2.180703 - useremainingDurationOfCurrentStage()instead
- 
Method Details- 
getIdlong getId()The automatically assigned, internal id.- Returns:
- the id of the maintenance mode.
- Since:
- 5.2.518, 5.2.605
 
- 
getScheduleEntryIdlong getScheduleEntryId()The id of the related schedule entry.- Returns:
- the id of the related schedule entry.
- Since:
- 5.2.801
- See Also:
 
- 
getDescriptionThe description of this maintenance mode.- Returns:
- the name of this maintenance mode, never null.
- Since:
- 5.2.518, 5.2.605
 
- 
getMessageThe message which is displayed to all users once the task has been started.- Returns:
- the message to display, never null.
- Since:
- 5.2.518, 5.2.605
 
- 
getCurrentStageA maintenance mode task consists of up to five stages, from an initial preparation period up to activating the actual maintenance mode. This method returns the currently active stage.- Returns:
- the stage which is currently active or nullif the maintenance mode has been completed or stopped.
- Since:
- 5.2.518, 5.2.605
 
- 
remainingDurationOfCurrentStageThis method may be used to determine the remaining duration of the currently active stage.- Returns:
- the remaining duration or an empty Optionalif the maintenance mode has been finished or stopped.
- Since:
- 5.2.180703
 
- 
remainingDurationOfCurrentStageInMillisDeprecated, for removal: This API element is subject to removal in a future version.since 5.2.180703 - useremainingDurationOfCurrentStage()insteadThis method may be used to determine the remaining duration of the currently active stage.- Returns:
- the remaining duration in milliseconds or -1 if the maintenance mode has been finished or stopped.
- Since:
- 5.2.518, 5.2.605
 
- 
getStartingTimeOfStageAsDate@Deprecated(forRemoval=true) @NotNull @NotNull Date getStartingTimeOfStageAsDate(@NotNull @NotNull MaintenanceModeTask.MaintenanceStage stage) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.180703 - usegetStartingTimeOfStage(MaintenanceStage)insteadEachMaintenanceModeTask.MaintenanceStageis started at a particular time if the task is not stopped prematurely. This method returns the estimated starting time for future stages and past starting times for previous stages.- Parameters:
- stage- The stage for which the starting time should be returned, must not be- null.
- Returns:
- the (estimated) starting time of the given stage, must not be null.
- Since:
- 5.2.518, 5.2.605
 
- 
getStartingTimeOfStage@NotNull @NotNull ZonedDateTime getStartingTimeOfStage(@NotNull @NotNull MaintenanceModeTask.MaintenanceStage stage) EachMaintenanceModeTask.MaintenanceStageis started at a particular time if the task is not stopped prematurely. This method returns the estimated starting time for future stages and past starting times for previous stages.- Parameters:
- stage- The stage for which the starting time should be returned, must not be- null.
- Returns:
- the (estimated) starting time of the given stage, never null.
- Since:
- 5.2.180703
 
- 
getMessageDisplayTypeIndicates how the message is displayed to the users.- Returns:
- The type of display, never null.
- Since:
- 5.2.518, 5.2.605
 
- 
getDisconnectModeIndicates the handling of existing sessions once the stageMaintenanceModeTask.MaintenanceStage.MAINTENANCE_MODE_ACTIVEbegins.- Returns:
- The disconnect mode, never null.
- Since:
- 5.2.518, 5.2.605
 
- 
getMaintenanceScopeIndicates the scope of this maintenance task, i.e. if only certain projects or the whole server is affected.- Returns:
- the maintenance scope, never null.
- Since:
- 5.2.518, 5.2.605
 
- 
getConcurrentTaskHandlingIndicates if other tasks may be executed while the maintenance mode is active.- Returns:
- an enum describing how concurrent tasks are handled, never null.
- Since:
- 5.2.518, 5.2.605
 
- 
getDurationOfStageInMillisEach stage has a duration after which the next stage is started. This method returns the duration for a specific stage or 0 if the stage is disabled.- Parameters:
- stage- the stage for which to query the duration, must not be- null.
- Returns:
- the duration in milliseconds or 0 if the stage is disabled.
- Since:
- 5.2.518, 5.2.605
 
- 
getProjectIdsAll projects affected by the maintenance task. May only be called if the task scope is not global.- Returns:
- an unmodifiable list of ids of all affected projects. Will never be empty or null.
- Throws:
- IllegalStateException- if the scope is- MaintenanceModeTask.MaintenanceScope.GLOBAL
- Since:
- 5.2.518, 5.2.605
- See Also:
 
 
- 
getStartingTimeOfStage(MaintenanceStage)instead