Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ApiModel(value = "Document information")
- public class DocumentDto {
- public enum DocumentType {
- PDF,
- WORD,
- CSV
- }
- .........
- @NotNull
- @ApiModelProperty(required = true, value = "document type", allowableValues = "PDF, WORD, CSV")
- private DocumentType documentType;
- ........
- @JsonIgnore
- @ApiOperation(value = "is this document a PDF?")
- public boolean isPDF() {
- return documentType == DocumentType.PDF;
- }
Add Comment
Please, Sign In to add comment