Class LockStepResource

java.lang.Object
hudson.model.AbstractDescribableImpl<LockStepResource>
org.jenkins.plugins.lockableresources.LockStepResource
All Implemented Interfaces:
Describable<LockStepResource>, Serializable

public class LockStepResource extends AbstractDescribableImpl<LockStepResource> implements Serializable
See Also:
  • Field Details

    • resource

      @CheckForNull public String resource
    • label

      @CheckForNull public String label
    • quantity

      public int quantity
    • reason

      @CheckForNull public String reason
      The reason why this resource is being locked, displayed in the UI while locked.
  • Constructor Details

    • LockStepResource

      @DataBoundConstructor public LockStepResource(@Nullable String resource)
  • Method Details

    • setLabel

      @DataBoundSetter public void setLabel(String label)
    • setQuantity

      @DataBoundSetter public void setQuantity(int quantity)
    • setReason

      @DataBoundSetter public void setReason(String reason)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public static String toString(String resource, String label, int quantity)
    • toString

      public static String toString(String resource, String label, int quantity, String reason)
    • validate

      public void validate(boolean allowEmptyOrNullValues)
      Label and resource are mutual exclusive.
    • validate

      public static void validate(String resource, String label, String resourceSelectStrategy, List<LockStepResource> extra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues)
      Validate input parameters
    • validate

      public static void validate(String resource, String label, String resourceSelectStrategy, boolean hasExtra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues)
      Label and resource are mutual exclusive. The label, if provided, must be configured (at least one resource must have this label).