actionResponse.setRenderParameter(MODE_KEY, mode);
} else if (mode.equals(WEBLOGIC_IMPORT_MODE)) {
String domainDir = actionRequest.getParameter("weblogicDomainDir");
String libDir = actionRequest.getParameter("weblogicLibDir");
try {
DatabaseConversionStatus status = WebLogic81DatabaseConverter.convert(libDir, domainDir);
actionRequest.getPortletSession(true).setAttribute("ImportStatus", new ImportStatus(status));
actionResponse.setRenderParameter(MODE_KEY, IMPORT_STATUS_MODE);
} catch (Exception e) {
log.error("Unable to import", e);
actionResponse.setRenderParameter("from", actionRequest.getParameter("from"));
actionResponse.setRenderParameter(MODE_KEY, IMPORT_START_MODE);
}
} else if (mode.equals(IMPORT_START_MODE)) {
actionResponse.setRenderParameter("from", actionRequest.getParameter("from"));
actionResponse.setRenderParameter(MODE_KEY, mode);
} else if (mode.equals(IMPORT_EDIT_MODE)) {
ImportStatus status = getImportStatus(actionRequest);
int index = Integer.parseInt(actionRequest.getParameter("importIndex"));
status.setCurrentPoolIndex(index);
loadImportedData(actionRequest, data, status.getCurrentPool());
actionResponse.setRenderParameter(MODE_KEY, EDIT_MODE);
} else if (mode.equals(IMPORT_COMPLETE_MODE)) {
ImportStatus status = getImportStatus(actionRequest);
log.warn("Import Results:"); //todo: create a screen for this
log.warn(" " + status.getSkippedCount() + " ignored");
log.warn(" " + status.getStartedCount() + " reviewed but not deployed");
log.warn(" " + status.getPendingCount() + " not reviewed");
log.warn(" " + status.getFinishedCount() + " deployed");
actionRequest.getPortletSession().removeAttribute("ImportStatus");
} else if (mode.equals(DELETE_MODE)) {
String name = actionRequest.getParameter("adapterAbstractName");
loadConnectionFactory(actionRequest, name, data.getAbstractName(), data);
delete(actionRequest, actionResponse, data);