Guest User

Untitled

a guest
Dec 17th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. @ApiModel(value = "Document information")
  2. public class DocumentDto {
  3.  
  4. public enum DocumentType {
  5. PDF,
  6. WORD,
  7. CSV
  8. }
  9.  
  10. .........
  11.  
  12. @NotNull
  13. @ApiModelProperty(required = true, value = "document type", allowableValues = "PDF, WORD, CSV")
  14. private DocumentType documentType;
  15.  
  16. ........
  17.  
  18. @JsonIgnore
  19.  
  20. @ApiOperation(value = "is this document a PDF?")
  21. public boolean isPDF() {
  22. return documentType == DocumentType.PDF;
  23. }
Add Comment
Please, Sign In to add comment