// IF THE ENGINE IS INTERNAL
} else {
String className = engine.getClassName();
debug("execute", "Try instantiating class " + className + " for internal engine " + engine.getName() + "...");
InternalEngineIFace internalEngine = null;
// tries to instantiate the class for the internal engine
try {
if (className == null && className.trim().equals("")) throw new ClassNotFoundException();
internalEngine = (InternalEngineIFace) Class.forName(className).newInstance();
} catch (ClassNotFoundException cnfe) {
logger.fatal("The class ['" + className + "'] for internal engine " + engine.getName() + " was not found.", cnfe);
Vector params = new Vector();
params.add(className);
params.add(engine.getName());
errorHandler.addError(new EMFUserError(EMFErrorSeverity.ERROR, 2001, params));
return;
} catch (Exception e) {
logger.fatal("Error while instantiating class " + className, e);
errorHandler.addError(new EMFUserError(EMFErrorSeverity.ERROR, 100));
return;
}
debug("execute", "Class " + className + " instantiated successfully. Now engine's execution starts.");
// starts engine's execution
try {
internalEngine.handleNewDocumentTemplateCreation(requestContainer, obj, response);
} catch (InvalidOperationRequest ior) {
logger.info("Engine " + engine.getName() + " cannot build document template");
Vector params = new Vector();
params.add(engine.getName());
errorHandler.addError(new EMFUserError(EMFErrorSeverity.INFORMATION, "1076", params));