public DataAccessException translate(String task, String url, RestClientException e) { if (e instanceof ResourceAccessException) { return new DataAccessResourceFailureException(getMessage(task, url), e); } else if (e instanceof HttpStatusCodeException) { return new DataRetrievalFailureException(getMessage(task, url, (HttpStatusCodeException) e), e); } else { return new NonTransientDataAccessResourceException(getMessage(task, url), e); } }
@Override public DataAccessException translate(String task, String url, RestClientException e) { if (e instanceof ResourceAccessException) { return new DataAccessResourceFailureException(getMessage(task, url), e); } else if (e instanceof HttpStatusCodeException) { return new DataRetrievalFailureException(getMessage(task, url, (HttpStatusCodeException) e), e); } else { return new NonTransientDataAccessResourceException(getMessage(task, url), e); } }
/** * <p>setImportFileDirectory</p> * * @param importFileDir a {@link java.io.File} object. */ public void setImportFileDirectory(final File importFileDir) { m_importFileDir = importFileDir; if (!m_importFileDir.exists()) { if (!m_importFileDir.mkdirs()) { throw new NonTransientDataAccessResourceException("import file directory (" + m_importFileDir.getPath() + ") does not exist"); } } }