Class AbstractStatusesColumn

All Implemented Interfaces:
ExtensionPoint, Describable<ListViewColumn>
Direct Known Subclasses:
AllStatusesColumn, LastStableAndUnstableColumn, LastSuccessAndFailedColumn

public abstract class AbstractStatusesColumn extends AbstractCompactColumn
  • Field Details

  • Constructor Details

    • AbstractStatusesColumn

      public AbstractStatusesColumn(String colorblindHint, String timeAgoTypeString)
  • Method Details

    • getBuilds

      public static List<BuildInfo> getBuilds(Job<?,?> job, Locale locale, boolean isFailedShownOnlyIfLast, boolean isUnstableShownOnlyIfLast, boolean isOnlyShowLastStatus, boolean isShowColorblindUnderlineHint, AbstractStatusesColumn.TimeAgoType timeAgoType, int hideDays)
    • getLastFailedBuild

      public static BuildInfo getLastFailedBuild(Job<?,?> job, Locale locale, boolean onlyIfLastCompleted, boolean isShowColorblindUnderlineHint, boolean isFirst, AbstractStatusesColumn.TimeAgoType timeAgoType)
      Parameters:
      onlyIfLastCompleted - When the statuses aren't sorted, we only show the last failed when it is also the latest completed build.
    • getLastStableBuild

      public static BuildInfo getLastStableBuild(Job<?,?> job, Locale locale, boolean isShowColorblindUnderlineHint, boolean isFirst, AbstractStatusesColumn.TimeAgoType timeAgoType)
    • getLastUnstableBuild

      public static BuildInfo getLastUnstableBuild(Job<?,?> job, Locale locale, boolean isUnstableShownOnlyIfLast, boolean isShowColorblindUnderlineHint, boolean isFirst, AbstractStatusesColumn.TimeAgoType timeAgoType)
    • getTimeAgoString

      protected static String getTimeAgoString(Locale locale, long timestamp, boolean isMultiple, AbstractStatusesColumn.TimeAgoType timeAgoType)
    • getBuildTimeString

      protected static String getBuildTimeString(long timeMs, Locale locale)
    • getBuildTimeString

      protected static String getBuildTimeString(long timeMs, Locale locale, boolean addDate, boolean addTime, boolean useDefaultFormat)
    • formatDate

      protected static String formatDate(TemporalAccessor date, Locale locale)
      I want to use 4-digit years (for clarity), and that doesn't work out of the box...
    • formatDateTime

      protected static String formatDateTime(TemporalAccessor date, Locale locale)
    • formatTime

      protected static String formatTime(TemporalAccessor date, Locale locale)
    • getShortTimestamp

      protected static String getShortTimestamp(float time)
      Avoids having "2 days 3 hours" and instead does "2.1 days".

      Additional strategy details:

      • < 1 sec = 0 sec
      • < 10 of anything = x.y of that (scale 1)
      • >= 10 of anything = x (scale 0)
    • getRoundedNumber

      protected static float getRoundedNumber(float number)
    • getAbortedMessage

      public static final String getAbortedMessage()
    • getFailedMessage

      public static final String getFailedMessage()
    • getUnstableMessage

      public static final String getUnstableMessage()
    • getBuildDescriptionToolTip

      public static final String getBuildDescriptionToolTip(BuildInfo build, Locale locale)
    • getStableMessage

      public static final String getStableMessage()
    • getColumnSortData

      public String getColumnSortData(Job<?,?> job)
    • getHideDays

      public int getHideDays()
    • isBuildsEmpty

      public boolean isBuildsEmpty(Job<?,?> job)
    • getBuilds

      public List<BuildInfo> getBuilds(Job<?,?> job, Locale locale)
    • isFailedShownOnlyIfLast

      protected abstract boolean isFailedShownOnlyIfLast()
    • isUnstableShownOnlyIfLast

      protected abstract boolean isUnstableShownOnlyIfLast()
    • isOnlyShowLastStatus

      public boolean isOnlyShowLastStatus()
    • getToolTip

      public final String getToolTip(BuildInfo build, Locale locale)
    • getTimeAgoTypeString

      public String getTimeAgoTypeString()