Class ActivationView

java.lang.Object
io.jenkins.plugins.batchcontrol.ui.ActivationView

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class ActivationView extends Object
Read-only display helpers for activation state (SPEC item 6a, D-46), shared by the job page, the computed-folder page and the activation screens. Nothing here changes state or decides whether anything may run; the queue gate and ActivationService do that.
  • Method Details

    • carrierOf

      @CheckForNull public static Item carrierOf(Item item)
      The item that carries the activation of a computed child (D-46c, ActivationService.activationSubject(hudson.model.Item)), or null when the item carries its own.
    • isActivated

      public static boolean isActivated(Item item)
      Whether an activated state is stored for this very item (the service's truthful read).
    • isHeld

      public static boolean isHeld(Item item)
      Whether an approved hold took the item out of service (as opposed to never activated).
    • getState

      @CheckForNull public static ActivationState getState(Item item)
      The stored state, or null; a state that cannot be read is shown as none.
    • stateLabel

      public static String stateLabel(Item item)
      "activated", "on hold" or "not activated", as the screens word the three states.
    • actionLabel

      public static String actionLabel(@CheckForNull ActivationRequest.Action action)
      S-13-08: the two request kinds, worded so they cannot be mistaken for each other on any list or detail screen.