@Test public void shouldAcceptIfDataSetAndPreparationParametersSet() throws Exception { final ExportParameters parameters = new ExportParameters(); parameters.setDatasetId("1234"); parameters.setPreparationId("1234"); assertTrue(applyPreparationExportStrategy.test(parameters)); }
@Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } return parameters.getContent() == null && !StringUtils.isEmpty(parameters.getDatasetId()) && !StringUtils.isEmpty(parameters.getPreparationId()); }
ApplyPreparationExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } return parameters.getContent() == null && !StringUtils.isEmpty(parameters.getDatasetId()) && !StringUtils.isEmpty(parameters.getPreparationId()); } }
ApplyPreparationExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } return parameters.getContent() == null && !StringUtils.isEmpty(parameters.getDatasetId()) && !StringUtils.isEmpty(parameters.getPreparationId()); }  }
ApplyPreparationExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } return parameters.getContent() == null && !StringUtils.isEmpty(parameters.getDatasetId()) && !StringUtils.isEmpty(parameters.getPreparationId()); }  @Override boolean test(ExportParameters parameters); @Override StreamingResponseBody execute(ExportParameters parameters); }
ApplyPreparationExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } return parameters.getContent() == null && !StringUtils.isEmpty(parameters.getDatasetId()) && !StringUtils.isEmpty(parameters.getPreparationId()); }  @Override boolean test(ExportParameters parameters); @Override StreamingResponseBody execute(ExportParameters parameters);  }