@Test public void testNull() { validator.validate(null); assertEquals(Status.OK, validator.getStatus()); }
@Override public void validate(String filePath) { if(StringUtils.isBlank(filePath)) { return; } File file = new File(filePath); if(!file.exists()) { addMessage(Status.ERROR, "Directory doesn't exists on Sqoop 2 server machine"); return; } if(!file.isDirectory()) { addMessage(Status.ERROR, "Path is not a valid directory"); return; } }
DirectoryExistsValidator extends AbstractValidator<String> { @Override public void validate(String filePath) { if(StringUtils.isBlank(filePath)) { return; } File file = new File(filePath); if(!file.exists()) { addMessage(Status.ERROR, "Directory doesn't exists on Sqoop 2 server machine"); return; } if(!file.isDirectory()) { addMessage(Status.ERROR, "Path is not a valid directory"); return; } } }
DirectoryExistsValidator extends AbstractValidator<String> { @Override public void validate(String filePath) { if(StringUtils.isBlank(filePath)) { return; } File file = new File(filePath); if(!file.exists()) { addMessage(Status.ERROR, "Directory doesn't exists on Sqoop 2 server machine"); return; } if(!file.isDirectory()) { addMessage(Status.ERROR, "Path is not a valid directory"); return; } }  }
DirectoryExistsValidator extends AbstractValidator<String> { @Override public void validate(String filePath) { if(StringUtils.isBlank(filePath)) { return; } File file = new File(filePath); if(!file.exists()) { addMessage(Status.ERROR, "Directory doesn't exists on Sqoop 2 server machine"); return; } if(!file.isDirectory()) { addMessage(Status.ERROR, "Path is not a valid directory"); return; } }  @Override void validate(String filePath); }
DirectoryExistsValidator extends AbstractValidator<String> { @Override public void validate(String filePath) { if(StringUtils.isBlank(filePath)) { return; } File file = new File(filePath); if(!file.exists()) { addMessage(Status.ERROR, "Directory doesn't exists on Sqoop 2 server machine"); return; } if(!file.isDirectory()) { addMessage(Status.ERROR, "Path is not a valid directory"); return; } }  @Override void validate(String filePath);  }