Guest User

Untitled

a guest
Oct 21st, 2019
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data