Interface AfterUploadAttachmentValidator
- All Superinterfaces:
PluggableAttachmentValidator
@ExperimentalApi
@ParametersAreNonnullByDefault
public interface AfterUploadAttachmentValidator
extends PluggableAttachmentValidator
Validates attachment after the file is uploaded to Jira, but before the attachment is fully persisted and linked
to an issue.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.issue.attachment.validation.PluggableAttachmentValidator
PluggableAttachmentValidator.FileInfo -
Method Summary
Modifier and TypeMethodDescriptionvalidateAfterUpload(ApplicationUser user, Project project, Issue issue, PluggableAttachmentValidator.FileInfo fileInfo, InputStream fileContent) Validate attachment after the file is uploaded to Jira, but before the attachment is fully persisted and linked to an issue.
-
Method Details
-
validateAfterUpload
Optional<AttachmentValidationError> validateAfterUpload(@Nullable ApplicationUser user, Project project, @Nullable Issue issue, PluggableAttachmentValidator.FileInfo fileInfo, InputStream fileContent) Validate attachment after the file is uploaded to Jira, but before the attachment is fully persisted and linked to an issue.This validation will be executed synchronously, blocking the attachment action until it completes. Returning a validation error will prevent completion of the action.
Any thrown exceptions will be interpreted as lack of problems discovered (as if an empty result was returned).
- Parameters:
user- user performing the action, or null if anonymousproject- project of the issue to witch the file is being attached toissue- issue to which the file is being attached to, or null if the issue does not exist yet (issue will be created with the attachment)fileInfo- information about the attached filefileContent- content of the attached file- Returns:
- an optional validation error
-