@Test public void testAcceptKO_noMetadataCache() throws Exception { final String preparation = createEmptyPreparationFromDataset("1234", "test"); applyAction(preparation, "[{}]"); applyAction(preparation, "[{}]"); ExportParameters exportParameters = new ExportParameters(); exportParameters.setPreparationId(preparation); assertFalse(optimizedExportStrategy.test(exportParameters)); }
@Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } if (parameters.getContent() != null) { return false; } if (StringUtils.isEmpty(parameters.getPreparationId())) { return false; } final OptimizedPreparationInput optimizedPreparationInput = new OptimizedPreparationInput(parameters); return optimizedPreparationInput.applicable(); }
OptimizedExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } if (parameters.getContent() != null) { return false; } if (StringUtils.isEmpty(parameters.getPreparationId())) { return false; } final OptimizedPreparationInput optimizedPreparationInput = new OptimizedPreparationInput(parameters); return optimizedPreparationInput.applicable(); } }
OptimizedExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } if (parameters.getContent() != null) { return false; } if (StringUtils.isEmpty(parameters.getPreparationId())) { return false; } final OptimizedPreparationInput optimizedPreparationInput = new OptimizedPreparationInput(parameters); return optimizedPreparationInput.applicable(); }  }
OptimizedExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } if (parameters.getContent() != null) { return false; } if (StringUtils.isEmpty(parameters.getPreparationId())) { return false; } final OptimizedPreparationInput optimizedPreparationInput = new OptimizedPreparationInput(parameters); return optimizedPreparationInput.applicable(); }  @Override boolean test(ExportParameters parameters); @Override StreamingResponseBody execute(ExportParameters parameters); }
OptimizedExportStrategy extends BaseSampleExportStrategy { @Override public boolean test(ExportParameters parameters) { if (parameters == null) { return false; } if (parameters.getContent() != null) { return false; } if (StringUtils.isEmpty(parameters.getPreparationId())) { return false; } final OptimizedPreparationInput optimizedPreparationInput = new OptimizedPreparationInput(parameters); return optimizedPreparationInput.applicable(); }  @Override boolean test(ExportParameters parameters); @Override StreamingResponseBody execute(ExportParameters parameters);  }