class InjectorUtil {

    public PreparationDetailsDTO injectPreparationDetails(List<Action> actions, PreparationDetailsDTO details) {
        // Append actions and action forms
        details.setActions(actions);

        final AtomicBoolean allowDistributedRun = new AtomicBoolean();
        final List<ActionForm> metadata = actions
                .stream() //
                .map(a -> registry.get(a.getName())) //
                .peek(a -> {
                    if (allowDistributedRun.get()) {
                        allowDistributedRun.set(a.getBehavior().contains(ActionDefinition.Behavior.FORBID_DISTRIBUTED));
                    }
                }) //
                // action must be adapted before usage. See problems with masking action
                .map(a -> a.getActionForm(LocaleContextHolder.getLocale(), Locale.US)) //
                .map(InjectorUtil::disallowColumnCreationChange) //
                .collect(Collectors.toList());
        details.setMetadata(metadata);

        // Flag for allow distributed run (based on metadata).
        details.setAllowDistributedRun(allowDistributedRun.get());

        return details;
    }

}