Interface AttachmentParserStages.Validator
- All Known Subinterfaces:
AttachmentDataParser<T>,TextFileParser<T>
- Enclosing class:
- AttachmentParserStages
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Validates that the attachment is appropriate prior to fetching it.
- Since:
- 1.0
- API Note:
- Any validation that can be done using only the attachment object (such as
file type, image size, etc) should be done in a validator rather than
within the
parserto avoid needlessly making network requests.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(Attachment attachment) Validates that the attachment is appropriate prior to fetching it.
-
Method Details
-
validate
Validates that the attachment is appropriate prior to fetching it.- Parameters:
attachment- The attachment to validate.- Throws:
InvalidArgumentException- if the attachment is not valid.
-