logger.debug("IN");
String message = (String) request.getAttribute("MESSAGEDET");
message.toLowerCase();
logger.debug("begin of import / export service with message =" + message);
EMFErrorHandler errorHandler = getErrorHandler();
try {
if (message == null) {
EMFUserError userError = new EMFUserError(EMFErrorSeverity.ERROR, "101", "component_impexp_messages");
logger.warn("The message parameter is null");
errorHandler.addError(userError);
throw userError;
}
if (message.trim().equalsIgnoreCase(ImportExportConstants.EXPORT)) {
exportConf(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPORT)) {
importConf(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_ROLE_ASSOCIATION)) {
associateRoles(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_ENGINE_ASSOCIATION)) {
associateEngines(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_DATA_SOURCE_ASSOCIATION)) {
associateDataSources(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_METADATA_ASS)) {
associateMetadata(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_EXIT)) {
exitImport(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_BACK_ENGINE_ASS)) {
backEngineAssociation(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_BACK_DS_ASS)) {
backDataSourceAssociation(request, response);
} else if (message.trim().equalsIgnoreCase(ImportExportConstants.IMPEXP_BACK_METADATA_ASS)) {
backMetadataAssociation(request, response);
}
} catch (EMFUserError emfu) {
errorHandler.addError(emfu);
} catch (Exception ex) {
logger.error("Error during the service execution", ex);
EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, "100", "component_impexp_messages");
errorHandler.addError(error);
return;
} finally {
logger.debug("OUT");
}
}