Interface SafeguardValidator<T>

Type Parameters:
T - request type carrying the necessary inputs for validation
All Known Subinterfaces:
CommentsPerIssueLimitValidator, CustomFieldLimitValidator, IssueSafeguardValidator, IssueTypeSafeguardValidator, ProjectLimitValidator
All Known Implementing Classes:
AbstractSafeguardValidator, DefaultCommentsPerIssueLimitValidator, DefaultCustomFieldLimitValidator, DefaultIssueSafeguardValidator, DefaultIssueTypeSafeguardValidator, DefaultProjectLimitValidator

public interface SafeguardValidator<T>
Generic contract for Safeguard validators across Jira entities. Implementations encapsulate validation and limit retrieval logic.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether the safeguard feature (and specific safeguard) is enabled.
    boolean
    isValid(T request)
    Performs validation for the provided request.
  • Method Details

    • isEnabled

      boolean isEnabled()
      Indicates whether the safeguard feature (and specific safeguard) is enabled.
    • isValid

      boolean isValid(@Nonnull T request)
      Performs validation for the provided request. Implementations may also perform side effects like logging/notification when appropriate.
      Returns:
      true if valid (i.e., operation should be allowed)