Class ComputedFolderActivationAction

java.lang.Object
io.jenkins.plugins.batchcontrol.action.ComputedFolderActivationAction
All Implemented Interfaces:
Action, ModelObject

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class ComputedFolderActivationAction extends Object implements Action
Activation on a computed folder (multibranch project, organization folder), which carries the activation of the jobs it generates (D-46c, SPEC item 6a).
  • summary.jelly shows the folder's state (activated / not activated / on hold) on the folder page to Item/Read holders while run control is on, with a link to the request form for a BatchControl/Request holder.
  • <folder>/batch-control-activation/ is the request form, a separate action (JobActivationForm, D-64) that is absent (404) without BatchControl/Request (SPEC item 2, as on a job).

No sidebar entry; the action never changes state itself.

  • Constructor Details

    • ComputedFolderActivationAction

      public ComputedFolderActivationAction(com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<?> folder)
  • Method Details

    • getFolder

      public com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<?> getFolder()
    • getIconFileName

      @CheckForNull public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      @CheckForNull public String getUrlName()
      No URL of its own: the summary is rendered on the folder page, and the activation request form is its own action, JobActivationForm at <folder>/batch-control-activation/ (D-64).
      Specified by:
      getUrlName in interface Action
    • isShown

      public boolean isShown()
      Run control on and the viewer holds Item/Read on the folder.
    • isCanRequest

      public boolean isCanRequest()
      D-38b: Request (and Item/Read) on this folder, the service's predicate.
    • isActivated

      public boolean isActivated()
    • isHeld

      public boolean isHeld()
    • getCarrier

      @CheckForNull public Item getCarrier()
      A computed folder generated by another computed folder (a repository project of an organization folder) is carried by that folder (D-46c, ActivationService.activationSubject(hudson.model.Item)); the summary then names it. null otherwise.
    • carrierState

      public String carrierState(Item carrier)
    • carrierUrl

      @CheckForNull public String carrierUrl(Item carrier)
    • getPendingRequests

      public List<ActivationRequest> getPendingRequests()
      The PENDING requests of this folder the viewer may see (P-09).
    • actionLabel

      public String actionLabel(ActivationRequest.Action action)