class ComputeInheritedRulesActionPlugin extends ActionHandler {

    @Override
    public List<ItemStatus> executeList(WorkerParameters workerParameters, HandlerIO handler)
        throws ProcessingException {
        LOGGER.debug("execute MaxEndDatePlugin");

        try (MetaDataClient metaDataClient = metaDataClientFactory.getClient()) {
            SelectMultiQuery select = new SelectMultiQuery();
            InQuery query = QueryHelper.in(VitamFieldsHelper.id(), workerParameters.getObjectNameList().toArray(new String[0]));
            select.setQuery(query);

            JsonNode response = metaDataClient.selectUnitsWithInheritedRules(select.getFinalSelect());

            RequestResponseOK<JsonNode> requestResponseOK = RequestResponseOK.getFromJsonNode(response);
            List<JsonNode> archiveWithInheritedRules = requestResponseOK.getResults();

            String tenantId = VitamThreadUtils.getVitamSession().getTenantId().toString();
            boolean isApiIndexable = isIndexable(tenantId, VitamConfiguration.getIndexInheritedRulesWithAPIV2OutputByTenant());
            boolean isRuleIndexable = isIndexable(tenantId, VitamConfiguration.getIndexInheritedRulesWithRulesIdByTenant());

            for (JsonNode archiveUnit : archiveWithInheritedRules) {
                UnitInheritedRulesResponseModel unitInheritedResponseModel = JsonHandler.getFromJsonNode(archiveUnit.get(INHERITED_RULES), UnitInheritedRulesResponseModel.class);
                String unitId = archiveUnit.get(VitamFieldsHelper.id()).textValue();

                //TODO Switch POJO to metadata-common
                Map<String, InheritedRule> inheritedRulesWithAllOption = unitInheritedResponseModel.getRuleCategories()
                    .entrySet()
                    .stream()
                    .map(entry -> mapToCategoriesWithEndDateAndProperties(entry.getKey(), entry.getValue(), isRuleIndexable))
                    .collect(Collectors.toMap(Entry::getKey, Entry::getValue));

                Map<String, Object> globalInheritedProperties = unitInheritedResponseModel.getGlobalProperties()
                    .stream()
                    .collect(Collectors.toMap(InheritedPropertyResponseModel::getPropertyName, InheritedPropertyResponseModel::getPropertyValue,
                        PROPERTY_MERGER));

                JsonNode inheritedRulesAPIOutput = isApiIndexable
                    ? JsonHandler.toJsonNode(unitInheritedResponseModel)
                    : null;

                ComputedInheritedRules computedInheritedRules = getComputedInheritedRules(
                    inheritedRulesWithAllOption,
                    inheritedRulesAPIOutput,
                    globalInheritedProperties,
                    isApiIndexable
                );

                ObjectNode updateMultiQuery = getUpdateQuery(computedInheritedRules);
                metaDataClient.updateUnitById(updateMultiQuery, unitId);
            }

            return buildBulkItemStatus(workerParameters, PLUGIN_NAME, StatusCode.OK);
        } catch (InvalidCreateOperationException | MetaDataException e) {
            throw new ProcessingException(e);
        } catch (final InvalidParseOperationException e) {
            LOGGER.error("File couldn't be converted into json", e);
            return buildBulkItemStatus(workerParameters, PLUGIN_NAME, StatusCode.KO);
        }
    }

    public  ComputeInheritedRulesActionPlugin();
    @VisibleForTesting  ComputeInheritedRulesActionPlugin(MetaDataClientFactory metaDataClientFactory);

}