@Test public void createSourceJudgmentsUrl__publicationDateFrom_NOT_NULL() { DateTime publicationDateFrom = new LocalDateTime(2017, 10, 4, 11, 18).toDateTime(DateTimeZone.forID("Europe/Warsaw")); assertEquals("judgmentListUrl?offset=30&limit=15&sort=signature-asc&publicationDateFrom=2017-10-04", sourceCcJudgmentUrlFactory.createSourceJudgmentsUrl(2, 15, publicationDateFrom)); }
String createSourceJudgmentsUrl(int pageNo, int pageSize, DateTime publicationDateFrom) { String url = ccJudgmentListSourceUrl +"?offset="+pageSize*pageNo+"&limit="+pageSize+"&sort=signature-asc"; if (publicationDateFrom != null) { publicationDateFrom = publicationDateFrom.toDateTime(DateTimeZone.forID(timeZoneId)); url += "&publicationDateFrom="+publicationDateFrom.toString(DateTimeFormat.forPattern(queryDateFromFormat)); } return url; }
SourceCcJudgmentUrlFactory { String createSourceJudgmentsUrl(int pageNo, int pageSize, DateTime publicationDateFrom) { String url = ccJudgmentListSourceUrl +"?offset="+pageSize*pageNo+"&limit="+pageSize+"&sort=signature-asc"; if (publicationDateFrom != null) { publicationDateFrom = publicationDateFrom.toDateTime(DateTimeZone.forID(timeZoneId)); url += "&publicationDateFrom="+publicationDateFrom.toString(DateTimeFormat.forPattern(queryDateFromFormat)); } return url; } }
SourceCcJudgmentUrlFactory { String createSourceJudgmentsUrl(int pageNo, int pageSize, DateTime publicationDateFrom) { String url = ccJudgmentListSourceUrl +"?offset="+pageSize*pageNo+"&limit="+pageSize+"&sort=signature-asc"; if (publicationDateFrom != null) { publicationDateFrom = publicationDateFrom.toDateTime(DateTimeZone.forID(timeZoneId)); url += "&publicationDateFrom="+publicationDateFrom.toString(DateTimeFormat.forPattern(queryDateFromFormat)); } return url; }  }
SourceCcJudgmentUrlFactory { String createSourceJudgmentsUrl(int pageNo, int pageSize, DateTime publicationDateFrom) { String url = ccJudgmentListSourceUrl +"?offset="+pageSize*pageNo+"&limit="+pageSize+"&sort=signature-asc"; if (publicationDateFrom != null) { publicationDateFrom = publicationDateFrom.toDateTime(DateTimeZone.forID(timeZoneId)); url += "&publicationDateFrom="+publicationDateFrom.toString(DateTimeFormat.forPattern(queryDateFromFormat)); } return url; }  @Value("${import.commonCourt.judgmentList.source.url}") void setCcJudgmentListSourceUrl(String ccJudgmentListSourceUrl); @Value("${import.commonCourt.judgmentDetails.source.url}") void setCcJudgmentDetailsSourceUrl(String ccJudgmentDetailsSourceUrl); @Value("${import.commonCourt.judgmentContent.source.url}") void setCcJudgmentContentSourceUrl(String ccJudgmentContentSourceUrl); void setQueryDateFromFormat(String queryDateFromFormat); }
SourceCcJudgmentUrlFactory { String createSourceJudgmentsUrl(int pageNo, int pageSize, DateTime publicationDateFrom) { String url = ccJudgmentListSourceUrl +"?offset="+pageSize*pageNo+"&limit="+pageSize+"&sort=signature-asc"; if (publicationDateFrom != null) { publicationDateFrom = publicationDateFrom.toDateTime(DateTimeZone.forID(timeZoneId)); url += "&publicationDateFrom="+publicationDateFrom.toString(DateTimeFormat.forPattern(queryDateFromFormat)); } return url; }  @Value("${import.commonCourt.judgmentList.source.url}") void setCcJudgmentListSourceUrl(String ccJudgmentListSourceUrl); @Value("${import.commonCourt.judgmentDetails.source.url}") void setCcJudgmentDetailsSourceUrl(String ccJudgmentDetailsSourceUrl); @Value("${import.commonCourt.judgmentContent.source.url}") void setCcJudgmentContentSourceUrl(String ccJudgmentContentSourceUrl); void setQueryDateFromFormat(String queryDateFromFormat);  }