/*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Command cmd = cmdService.getCommand(commandID);
ArrayList<Parameterization> parameters = null;
+ ParameterizedCommand pc;
+
if (paramMap != null) {
// Set parameters of the command to launch :
parameters = new ArrayList<Parameterization>();
cmd.getParameter(id), paramMap.get(id));
parameters.add(parameterization);
}
- }
- // build the parameterized command
- ParameterizedCommand pc = new ParameterizedCommand(cmd,
- parameters.toArray(new Parameterization[parameters.size()]));
+ pc = new ParameterizedCommand(cmd,
+ parameters.toArray(new Parameterization[parameters
+ .size()]));
+ } else
+ pc = new ParameterizedCommand(cmd, null);
+
// execute the command
handlerService.executeCommand(pc, null);
} catch (Exception e) {