mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/advanced/configuration/SystemConfigurationMgrImpl.java
private ConfigAdminModel tryAddFactoryConfigModel(final int controllerId, final ConfigurationInfoType config)
    {
        final ConfigAdminModel model;
        
        if (m_ControllerConfigList.get(controllerId).containsKey(config.getFactoryPid()))
        {
            final ConfigAdminModel factory = m_ControllerConfigList.get(controllerId).get(config.getFactoryPid());
            factory.setBundleLocation(config.getBundleLocation());
 
            if (factory.getFactoryConfigurations().containsKey(config.getPid()))
            {
                model = factory.getFactoryConfigurations().get(config.getPid());
                model.setBundleLocation(config.getBundleLocation());
            }
            else
            {
                model = new ConfigAdminModel();
                model.setBundleLocation(config.getBundleLocation());
                model.setPid(config.getPid());
                model.setFactoryPid(config.getFactoryPid());
                factory.getFactoryConfigurations().put(config.getPid(), model);
            }
        }
        else
        {
            model = new ConfigAdminModel();
            model.setBundleLocation(config.getBundleLocation());
            model.setPid(config.getPid());
            model.setFactoryPid(config.getFactoryPid());
            final ConfigAdminModel factory = new ConfigAdminModel();
            factory.setBundleLocation(config.getBundleLocation());
            factory.setPid(config.getFactoryPid());
            factory.setIsFactory(true);
            factory.getFactoryConfigurations().put(config.getPid(), model);
            m_ControllerConfigList.get(controllerId).put(config.getFactoryPid(), factory);
        }
        
        //Set configuration properties
        for (SimpleTypesMapEntry prop: config.getPropertiesList())
        {
            tryAddConfigProp(model, prop);
        }
        
        return model;
    }
/**
     * Attempts to add a factory configuration model to the map of controller configurations if it does not exist. Will
     * also create a model that represents the factory if it does not exists. If the factory configuration does exist
     * then it updates the location of the model.
     * 
     * @param controllerId
     *      ID of the controller where the configuration is located.
     * @param config
     *      The protocol buffer equivalent of the configuration to be created or updated.
     * @return
     *      The created or updated {@link ConfigAdminModel}.
     */
Attempts to add a factory configuration model to the map of controller configurations if it does not exist. Will
also create a model that represents the factory if it does not exists. If the factory configuration does exist
then it updates the location of the model.

@param controllerId
ID of the controller where the configuration is located.
@param config
The protocol buffer equivalent of the configuration to be created or updated.
@return
The created or updated  ConfigAdminModel.
Attempts to add a factory configuration model to the map of controller configurations if it does not exist . Will also create a model that represents the factory if it does not exists . If the factory configuration does exist then it updates the location of the model . @param controllerId ID of the controller where the configuration is located . @param config The protocol buffer equivalent of the configuration to be created or updated . @return The created or updated ConfigAdminModel .
private ConfigAdminModel tryAddFactoryConfigModel(final int controllerId, final ConfigurationInfoType config)
    {
        final ConfigAdminModel model;
        if (m_ControllerConfigList.get(controllerId).containsKey(config.getFactoryPid()))
        {
            final ConfigAdminModel factory = m_ControllerConfigList.get(controllerId).get(config.getFactoryPid());
            factory.setBundleLocation(config.getBundleLocation());
            if (factory.getFactoryConfigurations().containsKey(config.getPid()))
            {
                model = factory.getFactoryConfigurations().get(config.getPid());
                model.setBundleLocation(config.getBundleLocation());
            }
            else
            {
                model = new ConfigAdminModel();
                model.setBundleLocation(config.getBundleLocation());
                model.setPid(config.getPid());
                model.setFactoryPid(config.getFactoryPid());
                factory.getFactoryConfigurations().put(config.getPid(), model);
            }
        }
        else
        {
            model = new ConfigAdminModel();
            model.setBundleLocation(config.getBundleLocation());
            model.setPid(config.getPid());
            model.setFactoryPid(config.getFactoryPid());
            final ConfigAdminModel factory = new ConfigAdminModel();
            factory.setBundleLocation(config.getBundleLocation());
            factory.setPid(config.getFactoryPid());
            factory.setIsFactory(true);
            factory.getFactoryConfigurations().put(config.getPid(), model);
            m_ControllerConfigList.get(controllerId).put(config.getFactoryPid(), factory);
        }
        for (SimpleTypesMapEntry prop: config.getPropertiesList())
        {
            tryAddConfigProp(model, prop);
        }
        return model;
    }
private ConfigAdminModel tryAddFactoryConfigModel ( final int controllerId , final ConfigurationInfoType config ) { final ConfigAdminModel model ; if ( m_ControllerConfigList . get ( controllerId ) . containsKey ( config . getFactoryPid ( ) ) ) { final ConfigAdminModel factory = m_ControllerConfigList . get ( controllerId ) . get ( config . getFactoryPid ( ) ) ; factory . setBundleLocation ( config . getBundleLocation ( ) ) ; if ( factory . getFactoryConfigurations ( ) . containsKey ( config . getPid ( ) ) ) { model = factory . getFactoryConfigurations ( ) . get ( config . getPid ( ) ) ; model . setBundleLocation ( config . getBundleLocation ( ) ) ; } else { model = new ConfigAdminModel ( ) ; model . setBundleLocation ( config . getBundleLocation ( ) ) ; model . setPid ( config . getPid ( ) ) ; model . setFactoryPid ( config . getFactoryPid ( ) ) ; factory . getFactoryConfigurations ( ) . put ( config . getPid ( ) , model ) ; } } else { model = new ConfigAdminModel ( ) ; model . setBundleLocation ( config . getBundleLocation ( ) ) ; model . setPid ( config . getPid ( ) ) ; model . setFactoryPid ( config . getFactoryPid ( ) ) ; final ConfigAdminModel factory = new ConfigAdminModel ( ) ; factory . setBundleLocation ( config . getBundleLocation ( ) ) ; factory . setPid ( config . getFactoryPid ( ) ) ; factory . setIsFactory ( true ) ; factory . getFactoryConfigurations ( ) . put ( config . getPid ( ) , model ) ; m_ControllerConfigList . get ( controllerId ) . put ( config . getFactoryPid ( ) , factory ) ; } for ( SimpleTypesMapEntry prop : config . getPropertiesList ( ) ) { tryAddConfigProp ( model , prop ) ; } return model ; }
Attempts to add a factory configuration model to the map of controller configurations if it does not exist.
Attempts to add a factory configuration model to the map of controller configurations if it does not exist .
//Set configuration properties