package Visual_DVM_2021.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import Common.Passes.Pass;
public class TestPass extends Pass {
    /*
    LinkedHashMap<Integer,SapforConfiguration> unpackConfigurationsOld(SapforPackage sapforPackage){
       LinkedHashMap<Integer,SapforConfiguration> res = new LinkedHashMap<>();
       Vector<String> names = Utils.unpack_s(sapforPackage.configurationsNames,";");
       for (String name: names) {
           SapforConfiguration configuration = Global.testingServer.db.sapforConfigurations.getConfigurationByDescription(name);
           if ((configuration!=null)&&!res.containsKey(configuration.id)){
               res.put(configuration.id,configuration);
           }
       }
       return res;
    }
    @Override
    protected void body() throws Exception {
       // LinkedHashMap<Integer>
        for (SapforPackage sapforPackage: Global.testingServer.db.sapforPackages.Data.values()){
            LinkedHashMap<Integer,SapforConfiguration> configurations = unpackConfigurationsOld(sapforPackage);
            sapforPackage.saveConfigurationsAsJson(new Vector<>(configurations.values()));
            Global.testingServer.db.Update(sapforPackage);
        }
    }
     */
    @Override
    protected void body() throws Exception {
        for (SapforPackage sapforPackage: Global.testingServer.db.sapforPackages.Data.values()){

        }
    }
}
