package be.iminds.ilabt.jfed.experimenter_gui.editor.properties.cmi;

import javax.inject.Singleton;

/**
 * User: twalcari
 * Date: 8/29/2014
 * Time: 09:28
 */
@Singleton
@Deprecated
public class CMIManagerFactory {
//    private static final Logger LOG = LoggerFactory.getLogger(CMIManagerFactory.class);
//    private final GlobalCMIManager globalCmiManager;
//
//    private final TestbedInfoSource testbedInfoSource;
//    private final JFedGuiConfig config;
//    private final ComponentManagerInfoFactory componentManagerInfoFactory;
//
//
//    @Inject
//    public CMIManagerFactory(TestbedInfoSource testbedInfoSource, JFedGuiConfig config, ComponentManagerInfoFactory componentManagerInfoFactory, SfaModel sfaModel) {
//        this.testbedInfoSource = testbedInfoSource;
//        this.config = config;
//        this.componentManagerInfoFactory = componentManagerInfoFactory;
//
//        this.globalCmiManager = new GlobalCMIManager(testbedInfoSource, config, this.componentManagerInfoFactory, sfaModel);
//    }
//
//    public CMIManager getCMIManager(FXRspecNode node) {
//        if (node.getResourceClassId() == null)
//            return globalCmiManager;
//        else {
//            ResourceClass resourceClass = config.getResourceClass(node.getResourceClassId());
//            if (resourceClass != null) {
//                return new FilteredCMIManager(resourceClass, globalCmiManager);
//            } else {
//                LOG.warn("Could not find nodeDescription for resourceClassId {}", node.getResourceClassId());
//                return globalCmiManager;
//            }
//        }
//    }
//
//    public CMIManager getGlobalCMIManager() {
//        return globalCmiManager;
//    }
}
