class PreservationActionPlugin extends ActionHandler {

    @Override
    public List<ItemStatus> executeList(WorkerParameters workerParameters, HandlerIO handler) throws ProcessingException {
        List<PreservationDistributionLine> entries = IntStream.range(0, workerParameters.getObjectNameList().size())
            .mapToObj(index -> mapToParamsPreservationDistributionFile(workerParameters, index))
            .collect(Collectors.toList());

        String griffinId = entries.get(0).getGriffinId();
        String batchId = GUIDFactory.newGUID().getId();

        try {
            Path batchDirectory = createBatchDirectory(griffinId, batchId);

            copyInputFiles(batchDirectory, entries);
            String requestId = workerParameters.getRequestId();
            Integer tenantId = VitamThreadUtils.getVitamSession().getTenantId();
            createParametersBatchFile(entries, batchDirectory, requestId, batchId);

            int timeout = entries.get(0).getTimeout();
            ResultPreservation result = launchGriffin(griffinId, batchDirectory, timeout);

            List<WorkflowBatchResult> workflowResults = generateWorkflowBatchResults(result, entries);

            handler.setCurrentObjectId(WorkflowBatchResults.NAME);
            handler.addOutputResult(0, new WorkflowBatchResults(batchDirectory, workflowResults));


            createReport(workflowResults, entries, tenantId, requestId);

            return workflowResults.stream()
                .map(w -> buildItemStatus(PLUGIN_NAME, w.getGlobalStatus(), EventDetails.of(String.format("%s executed", PLUGIN_NAME))))
                .collect(Collectors.toList());
        } catch (Exception e) {
            tryDeleteLocalPreservationFiles(Paths.get(griffinInputFolder, griffinId, batchId));
            throw new ProcessingException(e);
        }
    }

    public  PreservationActionPlugin();
    @VisibleForTesting  PreservationActionPlugin(StorageClientFactory storage, PreservationReportService report, String inputFolder,
        String execFolder);

}