public void executeCommand(String command, List<String> parameters) {

        if (null == command) {
            return;
        }

        if (m_echo) {
            // echo the command to STDOUT
            m_out.print(command);
            for (int i = 0; i < parameters.size(); i++) {
                m_out.print(" '");
                m_out.print(parameters.get(i));
                m_out.print("'");
            }
            m_out.println();
        }

        // prepare to lookup a method in CmsObject or CmsShellCommands
        boolean executed = false;
        Iterator<CmsCommandObject> i = m_commandObjects.iterator();
        while (!executed && i.hasNext()) {
            CmsCommandObject cmdObj = i.next();
            executed = cmdObj.executeMethod(command, parameters);
        }

        if (!executed) {
            // method not found
            m_out.println();
            StringBuffer commandMsg = new StringBuffer(command).append("(");
            for (int j = 0; j < parameters.size(); j++) {
                commandMsg.append("value");
                if (j < (parameters.size() - 1)) {
                    commandMsg.append(", ");
                }
            }
            commandMsg.append(")");

            m_out.println(m_messages.key(Messages.GUI_SHELL_METHOD_NOT_FOUND_1, commandMsg.toString()));
            m_out.println(m_messages.key(Messages.GUI_SHELL_HR_0));
            ((CmsShellCommands)m_shellCommands).help();
        }
    }
public void executeCommand ( String command , List < String > parameters ) { if ( null == command ) { return ; } if ( m_echo ) { m_out . print ( command ) ; for ( int i = 0 ; i < parameters . size ( ) ; i ++ ) { m_out . print ( " '" ) ; m_out . print ( parameters . get ( i ) ) ; m_out . print ( "'" ) ; } m_out . println ( ) ; } boolean executed = false ; Iterator < CmsCommandObject > i = m_commandObjects . iterator ( ) ; while ( ! executed && i . hasNext ( ) ) { CmsCommandObject cmdObj = i . next ( ) ; executed = cmdObj . executeMethod ( command , parameters ) ; } if ( ! executed ) { m_out . println ( ) ; StringBuffer commandMsg = new StringBuffer ( command ) . append ( "(" ) ; for ( int j = 0 ; j < parameters . size ( ) ; j ++ ) { commandMsg . append ( "value" ) ; if ( j < ( parameters . size ( ) - 1 ) ) { commandMsg . append ( ", " ) ; } } commandMsg . append ( ")" ) ; m_out . println ( m_messages . key ( Messages . GUI_SHELL_METHOD_NOT_FOUND_1 , commandMsg . toString ( ) ) ) ; m_out . println ( m_messages . key ( Messages . GUI_SHELL_HR_0 ) ) ; ( ( CmsShellCommands ) m_shellCommands ) . help ( ) ; } }
Executes a shell command with a list of parameters.<p>

@param command the command to execute
@param parameters the list of parameters for the command