@Override
    public int execute(String commandName, final Process process) throws Exception
    {
        String command = process.args.consumeString();

        if (("add".equalsIgnoreCase(command)) || ("a".equalsIgnoreCase(command)))
        {
            return addTask(process);
        }

        if (("cancel".equalsIgnoreCase(command)) || ("c".equalsIgnoreCase(command)))
        {
            return cancelTask(process);
        }

        if ((command == null) || ("list".equalsIgnoreCase(command)) || ("l".equalsIgnoreCase(command)))
        {
            return listTasks(process);
        }

        throw new ArgumentException("Invalid command: " + command);
    }