Enum Class ChangeType

java.lang.Object
java.lang.Enum<ChangeType>
io.jenkins.plugins.batchcontrol.model.ChangeType
All Implemented Interfaces:
Serializable, Comparable<ChangeType>, Constable

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public enum ChangeType extends Enum<ChangeType>
Kind of event captured by a ChangeRecord.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A job was put into service (SPEC item 6a, D-39): an ACTIVATE request was approved, or the job existed when this plugin version was first installed and was seeded as activated.
    A save of the Batch Control configuration changed something besides the two switches (D-52).
     
     
     
     
    A permission-window request or approval refused because change control is off (S-15).
     
    D-35b: a save by a user whose Item/Configure on the item came only from a grant changed the item's (or folder's) matrix-auth authorization property, and Batch Control put the previous property back.
    An administrator or a native Configure holder marked an item as reviewed (D-58b): it and everything below it left the "changed under a grant" state.
    A job was put on hold (SPEC item 6a): a HOLD request was approved, so timer and upstream causes no longer run it.
    A blocked re-use of an approved-run marker (D-23 refusal, D-30 audit trail): the marker authorizes exactly one queue submission, and a further submission of the same marker is refused and recorded under this type so an operator can see the attempt.
     
    A run submission refused by the queue gate because its cause is a remote trigger carrying no Jenkins identity (hudson.model.Cause$RemoteCause, which core mints for /job/X/build?token=… and /job/X/buildWithParameters?token=…).
     
    A run was started by a Replay, Pipeline Rebuild or Restart from Stage by a user whose permission for it came only from a grant (D-58c).
     
    A Batch Control authorization strategy was installed (migrated to) or reverted (D-52).
    An unattended run submission (timer, upstream) or a Pipeline Replay refused quietly by the queue gate (SPEC item 6).
  • Method Summary

    Modifier and Type
    Method
    Description
    static ChangeType
    Returns the enum constant of this class with the specified name.
    static ChangeType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CREATE

      public static final ChangeType CREATE
    • CONFIGURE

      public static final ChangeType CONFIGURE
    • DELETE

      public static final ChangeType DELETE
    • RENAME

      public static final ChangeType RENAME
    • MOVE

      public static final ChangeType MOVE
    • CONFIG_TOGGLE

      public static final ChangeType CONFIG_TOGGLE
    • RETENTION

      public static final ChangeType RETENTION
    • GRANT_REVOKE

      public static final ChangeType GRANT_REVOKE
    • MARKER_REUSE_BLOCKED

      public static final ChangeType MARKER_REUSE_BLOCKED
      A blocked re-use of an approved-run marker (D-23 refusal, D-30 audit trail): the marker authorizes exactly one queue submission, and a further submission of the same marker is refused and recorded under this type so an operator can see the attempt. user is the account that attempted the re-use, not the requester of the original approval.
    • GRANT_REQUEST_BLOCKED

      public static final ChangeType GRANT_REQUEST_BLOCKED
      A permission-window request or approval refused because change control is off (S-15). The switch is a kill switch: while it is off a window confers nothing, so creating or approving one would only bank authority to be redeemed the moment the switch goes back on — exactly the hidden state the kill switch exists to remove. target is the scope the window was asked for (the job or folder full name), user is the account that attempted it, and detail says which of the two transitions was refused.

      Deliberately not CONFIG_TOGGLE: that type's target is contractually a configuration key and its detail an old -> new pair, and nothing about a refused request is a configuration change. Deliberately not GRANT_REVOKE either — nothing was revoked here, because nothing was ever granted; filing it there would tell an operator reading the history that a live window had been closed.

      Like the other two refusal types, this exists because the alternative is a refusal that lives only in a log nobody reads. Unlike them, this refusal is not silent to the caller: it surfaces as a Failure page naming the switch, so the record is the audit half rather than the only evidence.

    • REMOTE_RUN_BLOCKED

      public static final ChangeType REMOTE_RUN_BLOCKED
      A run submission refused by the queue gate because its cause is a remote trigger carrying no Jenkins identity (hudson.model.Cause$RemoteCause, which core mints for /job/X/build?token=… and /job/X/buildWithParameters?token=…). The refusal is silent to the caller — a script has no error channel to read guidance from — so this record is the only place the attempt becomes visible (SPEC item 6, S-14).

      Deliberately not MARKER_REUSE_BLOCKED: that type means "an authorization this plugin once granted was presented a second time", and its detail is contractually about a consumed request id (D-30). A token-triggered run never had an approval at all, so filing it under the same type would tell an operator reading the history that a request was replayed when no such request exists.

      user is the account whose credentials carried the request, target is the job the run was aimed at, and grantId/diff stay null (a refused run happens outside any change window and has no before/after configuration).

    • GRANT_VIOLATION

      public static final ChangeType GRANT_VIOLATION
      D-35b: a save by a user whose Item/Configure on the item came only from a grant changed the item's (or folder's) matrix-auth authorization property, and Batch Control put the previous property back. Without this, a temporary Configure could be turned into a permanent authorization entry that outlives the window.

      user is the account that made the save, target the item full name, grantId the grant the Configure came from, and detail says that the authorization property was restored. diff stays null.

    • TRIGGER_BLOCKED

      public static final ChangeType TRIGGER_BLOCKED
      An unattended run submission (timer, upstream) or a Pipeline Replay refused quietly by the queue gate (SPEC item 6). The refusal has no error channel, so this record is where it becomes visible; without it a locked job (D-34) looks exactly like a job whose cron never fires.

      target is the job full name. detail starts with cause=<KIND> switch=<name>, where the kind is TIMER, UPSTREAM or REPLAY and the switch is the job setting that refused it (blockTimer, blockUpstream, or approvalRequired for a replay), or activation when the job's settings let the cause through but the job is not activated (SPEC item 6a). user is the account the submission ran as (for a timer normally SYSTEM). grantId/diff stay null.

      Coalesced per job and cause kind to at most one record per hour, whoever submitted it (see store.BlockedAttemptAudit#recordCoalesced): a per-minute cron on a locked job would otherwise write 1,440 identical rows a day.

    • ACTIVATED

      public static final ChangeType ACTIVATED
      A job was put into service (SPEC item 6a, D-39): an ACTIVATE request was approved, or the job existed when this plugin version was first installed and was seeded as activated.

      target is the job full name, user the deciding approver (or upgrade for the seeding), and detail names the request id and the requester. grantId/diff stay null.

    • HELD

      public static final ChangeType HELD
      A job was put on hold (SPEC item 6a): a HOLD request was approved, so timer and upstream causes no longer run it. Fields as for ACTIVATED.
    • CONFIG_CHANGE

      public static final ChangeType CONFIG_CHANGE
      A save of the Batch Control configuration changed something besides the two switches (D-52). target is batch-control-configuration, user the saving user, detail lists each changed field as name: old -> new (the approver list in full).
    • STRATEGY_CHANGE

      public static final ChangeType STRATEGY_CHANGE
      A Batch Control authorization strategy was installed (migrated to) or reverted (D-52). target is authorization-strategy, detail names the strategy classes before and after.
    • GUARD_REVIEWED

      public static final ChangeType GUARD_REVIEWED
      An administrator or a native Configure holder marked an item as reviewed (D-58b): it and everything below it left the "changed under a grant" state. user is the reviewer.
    • REPLAY_UNDER_GRANT

      public static final ChangeType REPLAY_UNDER_GRANT
      A run was started by a Replay, Pipeline Rebuild or Restart from Stage by a user whose permission for it came only from a grant (D-58c). target is the job, user the submitter, grantId the grant; the detail names the run.
  • Method Details

    • values

      public static ChangeType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ChangeType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null