public final static String PARAM_SERVICE_NAME = "ACTION_NAME";
public final static String PARAM_NEW_SESSION = "NEW_SESSION";
private Map applyService(Map parameters, BIObject biObject) {
ObjTemplate template;
logger.debug("IN");
try {
Assert.assertNotNull(parameters, "Input [parameters] cannot be null");
template = getTemplate(biObject);
if(template.getName().trim().toLowerCase().endsWith(".xml")) {
parameters.put(PARAM_SERVICE_NAME, "QBE_ENGINE_START_ACTION");
} else if(template.getName().trim().toLowerCase().endsWith(".json")) {
parameters.put(PARAM_SERVICE_NAME, "FORM_ENGINE_START_ACTION");
} else {
Assert.assertUnreachable("Active template [" + template.getName() + "] extension is not valid (valid extensions are: .xml ; .json)");
}
parameters.put(PARAM_NEW_SESSION, "TRUE");
} catch(Throwable t) {
throw new RuntimeException("Impossible to guess from template extension the engine startup service to call");