Interface CommentsPerIssueLimitValidator
- All Superinterfaces:
SafeguardValidator<CommentsPerIssueValidationRequest>
- All Known Implementing Classes:
DefaultCommentsPerIssueLimitValidator
@ExperimentalApi
public interface CommentsPerIssueLimitValidator
extends SafeguardValidator<CommentsPerIssueValidationRequest>
Validates if the comments per issue limit is not reached.
- Since:
- 9.0.0
-
Method Summary
Modifier and TypeMethodDescriptiongetInvalidIssues(List<Issue> issues) Validates comment limits for all provided issues and returns issues that failed.longgetLimit()Returns the configured limit value for this safeguard (or a sentinel value when undefined).voidValidates the request and throws an exception if invalid.Methods inherited from interface com.atlassian.jira.bc.safeguards.SafeguardValidator
isEnabled, isValid
-
Method Details
-
getInvalidIssues
Validates comment limits for all provided issues and returns issues that failed. This method is a recommended way to validate a collection of issues due to performance optimizations. This method doesn't trigger any notification or logging.- Parameters:
issues- list of issues- Returns:
- list of issues for which validation failed
-
getLimit
long getLimit()Returns the configured limit value for this safeguard (or a sentinel value when undefined). -
validate
void validate(@Nonnull CommentsPerIssueValidationRequest request) throws CommentsPerIssueLimitExceededException Validates the request and throws an exception if invalid.
-