Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @CheckMetadata(id = "employeesAlphaNumeric")
  2. public class MyCustomCheck extends SingleExecutionCheck {
  3.  
  4. public MyCustomCheck(String argument, File file) {
  5. super(argument, file);
  6. }
  7.  
  8. @Override
  9. public CheckResult performCheck() {
  10. boolean isMyDocFragmentValid = ... // my custom logic here
  11.  
  12. CheckStatus checkStatus;
  13.  
  14. if(isMyDocFragmentValid) {
  15. checkStatus = CheckStatus.GREEN;
  16. } else {
  17. checkStatus = CheckStatus.RED;
  18. }
  19.  
  20. return new CheckResult("", LocalDateTime.now(), checkStatus);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement