mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/advanced/configuration/SystemConfigurationMgrImpl.java
private void tryAddConfigProp(final ConfigAdminModel config, final SimpleTypesMapEntry remoteProp)
    {
        //Check to see if the configuration already contains the property.
        ConfigAdminPropertyModel localProp = null;
        for (ConfigAdminPropertyModel prop: config.getProperties())
        {
            if (prop.getKey().equals(remoteProp.getKey()))
            {
                localProp = prop;
                break;
            }
        }
        
        final Object value = SharedMessageUtils.convertMultitypeToObject(remoteProp.getValue());
        final Class<?> type = value.getClass();
        //If the configuration does not contain the property add it. Otherwise update the properties values.
        if (localProp == null)
        {
            final ConfigAdminPropertyModel newProp = new ConfigAdminPropertyModel();
            newProp.setKey(remoteProp.getKey());
            newProp.setType(type);
            newProp.setValue(value);
            config.getProperties().add(newProp);
        }
        else
        {
            localProp.setType(type);
            localProp.setValue(value);
        }
    }
/**
     * Attempts to add the property to the specified configuration. If the property already exists then it updates the 
     * value and type of the property.
     * 
     * @param config
     *      The {@link ConfigAdminModel} that the property is to be added to or that contains the property to be 
     *      updated.
     * @param remoteProp
     *      The protocol equivalent of the property to be added or updated.
     */
Attempts to add the property to the specified configuration. If the property already exists then it updates the
value and type of the property.

@param config
The  ConfigAdminModel that the property is to be added to or that contains the property to be
updated.
@param remoteProp
The protocol equivalent of the property to be added or updated.
Attempts to add the property to the specified configuration . If the property already exists then it updates the value and type of the property . @param config The ConfigAdminModel that the property is to be added to or that contains the property to be updated . @param remoteProp The protocol equivalent of the property to be added or updated .
private void tryAddConfigProp(final ConfigAdminModel config, final SimpleTypesMapEntry remoteProp)
    {
        ConfigAdminPropertyModel localProp = null;
        for (ConfigAdminPropertyModel prop: config.getProperties())
        {
            if (prop.getKey().equals(remoteProp.getKey()))
            {
                localProp = prop;
                break;
            }
        }
        final Object value = SharedMessageUtils.convertMultitypeToObject(remoteProp.getValue());
        final Class<?> type = value.getClass();
        if (localProp == null)
        {
            final ConfigAdminPropertyModel newProp = new ConfigAdminPropertyModel();
            newProp.setKey(remoteProp.getKey());
            newProp.setType(type);
            newProp.setValue(value);
            config.getProperties().add(newProp);
        }
        else
        {
            localProp.setType(type);
            localProp.setValue(value);
        }
    }
private void tryAddConfigProp ( final ConfigAdminModel config , final SimpleTypesMapEntry remoteProp ) { ConfigAdminPropertyModel localProp = null ; for ( ConfigAdminPropertyModel prop : config . getProperties ( ) ) { if ( prop . getKey ( ) . equals ( remoteProp . getKey ( ) ) ) { localProp = prop ; break ; } } final Object value = SharedMessageUtils . convertMultitypeToObject ( remoteProp . getValue ( ) ) ; final Class < ? > type = value . getClass ( ) ; if ( localProp == null ) { final ConfigAdminPropertyModel newProp = new ConfigAdminPropertyModel ( ) ; newProp . setKey ( remoteProp . getKey ( ) ) ; newProp . setType ( type ) ; newProp . setValue ( value ) ; config . getProperties ( ) . add ( newProp ) ; } else { localProp . setType ( type ) ; localProp . setValue ( value ) ; } }
Attempts to add the property to the specified configuration.
Attempts to add the property to the specified configuration .
//Check to see if the configuration already contains the property. //If the configuration does not contain the property add it. Otherwise update the properties values.