if( item.getCommand().getElementId() == null || item.getCommand().getElementId().trim().isEmpty() ) {
logger.error("No command id assigned to " + item.getCommand().getElementId());
return null;
}
ECommandService cmdService = (ECommandService) lclContext
.get(ECommandService.class.getName());
Map<String, Object> parameters = null;
List<MParameter> modelParms = item.getParameters();
if (modelParms != null && !modelParms.isEmpty()) {
parameters = new HashMap<String, Object>();
for (MParameter mParm : modelParms) {
parameters.put(mParm.getName(), mParm.getValue());
}
}
ParameterizedCommand cmd = cmdService.createCommand(item.getCommand()
.getElementId(), parameters);
return cmd;
}