@ExperimentalApi
public interface CommentsPerIssueLimitValidator
Modifier and Type | Method and Description |
---|---|
List<Issue> |
getInvalidIssues(List<Issue> issues)
Validates comment limits for all provided issues and returns issues that failed.
|
long |
getLimit()
Returns the value of the limit as configured at the time of calling,
|
boolean |
isValid(Issue issue,
ApplicationUser author,
String commentBody,
ErrorCollection errorCollection)
Checks if limit is not reached yet
(eg.
|
void |
validate(Issue issue,
ApplicationUser author,
String commentBody)
Checks if limit is not reached yet
(eg.
|
boolean isValid(@Nonnull Issue issue, @Nullable ApplicationUser author, @Nonnull String commentBody, @Nonnull ErrorCollection errorCollection)
issue
- entity analysed for comment numberauthor
- comment creatorcommentBody
- comment body@Nonnull List<Issue> getInvalidIssues(@Nonnull List<Issue> issues)
issues
- list of issuesvoid validate(@Nonnull Issue issue, @Nullable ApplicationUser author, @Nonnull String commentBody) throws CommentsPerIssueLimitExceededException
issue
- entity analysed for comment numberauthor
- comment creatorcommentBody
- comment bodyCommentsPerIssueLimitExceededException
- if validation failslong getLimit()
Copyright © 2002-2023 Atlassian. All Rights Reserved.