package com.iqser.red.service.persistence.management.v1.processor.acl.custom.initializer;

import java.util.Comparator;
import java.util.List;

import org.springframework.stereotype.Service;


import lombok.RequiredArgsConstructor;

@Service
@RequiredArgsConstructor
public class ACLInitializer  {

    private final List<IACLInitializer> aclInitializerList;

    public void run() {

        aclInitializerList.sort(Comparator.comparingInt(IACLInitializer::sort));
        aclInitializerList.forEach(IACLInitializer::initialize);
    }

}
