mil.dod.th.ose.core/src/mil/dod/th/ose/core/impl/mp/ProgramImpl.java
private Map<String, Object> checkParameters(final Map<String, Object> executionParams) 
    {
        for (MissionVariableMetaData data : m_MissionTemplate.getVariableMetaData())
        {            
            final String name = data.getName();
            if (executionParams.containsKey(name))
            { //NOCHECKSTYLE:Avoid empty statements
                //do nothing param and variable metadata match
            }
            else if (data.isSetDefaultValue())
            {
                final MissionVariableTypesEnum type = data.getType();
                final String value = data.getDefaultValue();
                if (type == MissionVariableTypesEnum.INTEGER)
                {
                    //change numerics to their proper type
                    m_ExecParams.put(name, Integer.parseInt(value));
                }
                else if (type == MissionVariableTypesEnum.DOUBLE)
                {
                    m_ExecParams.put(name, Double.parseDouble(value));
                }
                else if (type == MissionVariableTypesEnum.FLOAT)
                {
                    m_ExecParams.put(name, Float.parseFloat(value));
                }
                else if (type == MissionVariableTypesEnum.LONG)
                {
                    m_ExecParams.put(name, Long.parseLong(value));
                }
                else if (type == MissionVariableTypesEnum.SHORT)
                {
                    m_ExecParams.put(name, Short.parseShort(value));
                }
                else if (type == MissionVariableTypesEnum.BOOLEAN)
                {
                    m_ExecParams.put(name, Boolean.parseBoolean(value));
                }
                executionParams.put(name, data.getDefaultValue());  
            }
            else
            {
                //update the program status, not calling change status because it is overridable. If called
                //and the class is not completely constructed the program status could be null, which would lead
                //to unwanted behavior from the change status method. 
                m_ProgramStatus = ProgramStatus.VARIABLE_ERROR;
                throw new IllegalArgumentException("The program " + m_MissionTemplate.getName() + " will never execute."
                    + " Illegal parameter value!");
            }
        }
        //if all params are good, assign the program status to unsatisfied
        m_ProgramStatus = ProgramStatus.UNSATISFIED;
        return executionParams;
    }
/**
     * Checks that the parameter values, and variable metadata match. These execution parameters will be sent to the 
     * {@link javax.script.ScriptEngine} during execution of the program.
     * 
     * @param executionParams
     *     the parameters rendered from the MissionProgramParameters
     * @return
     *     map representing valid parameter values 
     */
Checks that the parameter values, and variable metadata match. These execution parameters will be sent to the
javax.script.ScriptEngine during execution of the program.

@param executionParams
the parameters rendered from the MissionProgramParameters
@return
map representing valid parameter values
Checks that the parameter values and variable metadata match . These execution parameters will be sent to the javax . script . ScriptEngine during execution of the program . @param executionParams the parameters rendered from the MissionProgramParameters @return map representing valid parameter values
private Map<String, Object> checkParameters(final Map<String, Object> executionParams) 
    {
        for (MissionVariableMetaData data : m_MissionTemplate.getVariableMetaData())
        {            
            final String name = data.getName();
            if (executionParams.containsKey(name))
            { 
            }
            else if (data.isSetDefaultValue())
            {
                final MissionVariableTypesEnum type = data.getType();
                final String value = data.getDefaultValue();
                if (type == MissionVariableTypesEnum.INTEGER)
                {
                    m_ExecParams.put(name, Integer.parseInt(value));
                }
                else if (type == MissionVariableTypesEnum.DOUBLE)
                {
                    m_ExecParams.put(name, Double.parseDouble(value));
                }
                else if (type == MissionVariableTypesEnum.FLOAT)
                {
                    m_ExecParams.put(name, Float.parseFloat(value));
                }
                else if (type == MissionVariableTypesEnum.LONG)
                {
                    m_ExecParams.put(name, Long.parseLong(value));
                }
                else if (type == MissionVariableTypesEnum.SHORT)
                {
                    m_ExecParams.put(name, Short.parseShort(value));
                }
                else if (type == MissionVariableTypesEnum.BOOLEAN)
                {
                    m_ExecParams.put(name, Boolean.parseBoolean(value));
                }
                executionParams.put(name, data.getDefaultValue());  
            }
            else
            {
                m_ProgramStatus = ProgramStatus.VARIABLE_ERROR;
                throw new IllegalArgumentException("The program " + m_MissionTemplate.getName() + " will never execute."
                    + " Illegal parameter value!");
            }
        }
        m_ProgramStatus = ProgramStatus.UNSATISFIED;
        return executionParams;
    }
private Map < String , Object > checkParameters ( final Map < String , Object > executionParams ) { for ( MissionVariableMetaData data : m_MissionTemplate . getVariableMetaData ( ) ) { final String name = data . getName ( ) ; if ( executionParams . containsKey ( name ) ) { } else if ( data . isSetDefaultValue ( ) ) { final MissionVariableTypesEnum type = data . getType ( ) ; final String value = data . getDefaultValue ( ) ; if ( type == MissionVariableTypesEnum . INTEGER ) { m_ExecParams . put ( name , Integer . parseInt ( value ) ) ; } else if ( type == MissionVariableTypesEnum . DOUBLE ) { m_ExecParams . put ( name , Double . parseDouble ( value ) ) ; } else if ( type == MissionVariableTypesEnum . FLOAT ) { m_ExecParams . put ( name , Float . parseFloat ( value ) ) ; } else if ( type == MissionVariableTypesEnum . LONG ) { m_ExecParams . put ( name , Long . parseLong ( value ) ) ; } else if ( type == MissionVariableTypesEnum . SHORT ) { m_ExecParams . put ( name , Short . parseShort ( value ) ) ; } else if ( type == MissionVariableTypesEnum . BOOLEAN ) { m_ExecParams . put ( name , Boolean . parseBoolean ( value ) ) ; } executionParams . put ( name , data . getDefaultValue ( ) ) ; } else { m_ProgramStatus = ProgramStatus . VARIABLE_ERROR ; throw new IllegalArgumentException ( "The program " + m_MissionTemplate . getName ( ) + " will never execute." + " Illegal parameter value!" ) ; } } m_ProgramStatus = ProgramStatus . UNSATISFIED ; return executionParams ; }
Checks that the parameter values, and variable metadata match.
Checks that the parameter values and variable metadata match .
//NOCHECKSTYLE:Avoid empty statements //do nothing param and variable metadata match //change numerics to their proper type //update the program status, not calling change status because it is overridable. If called //and the class is not completely constructed the program status could be null, which would lead //to unwanted behavior from the change status method.  //if all params are good, assign the program status to unsatisfied