Package org.apache.geronimo.converter

Examples of org.apache.geronimo.converter.DatabaseConversionStatus


            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);
View Full Code Here


                if (!item.isFormField()) {
                    File file = File.createTempFile("geronimo-import", "");
                    file.deleteOnExit();
                    log.debug("Writing database pool import file to " + file.getAbsolutePath());
                    item.write(file);
                    DatabaseConversionStatus status = processImport(file, type);
                    request.getPortletSession(true).setAttribute("ImportStatus", new ImportStatus(status));
                    return true;
                } else {
                    throw new PortletException("Not expecting any form fields");
                }
View Full Code Here

            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 {
            actionResponse.setRenderParameter(MODE_KEY, mode);
        }
        data.store(actionResponse);
View Full Code Here

                if (!item.isFormField()) {
                    File file = File.createTempFile("geronimo-import", "");
                    file.deleteOnExit();
                    log.debug("Writing database pool import file to "+file.getAbsolutePath());
                    item.write(file);
                    DatabaseConversionStatus status = processImport(file, type);
                    request.getPortletSession(true).setAttribute("ImportStatus", new ImportStatus(status));
                    return true;
                } else {
                    throw new PortletException("Not expecting any form fields");
                }
View Full Code Here

            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);
View Full Code Here

                if (!item.isFormField()) {
                    File file = File.createTempFile("geronimo-import", "");
                    file.deleteOnExit();
                    log.debug("Writing database pool import file to " + file.getAbsolutePath());
                    item.write(file);
                    DatabaseConversionStatus status = processImport(file, type);
                    request.getPortletSession(true).setAttribute("ImportStatus", new ImportStatus(status));
                    return true;
                } else {
                    throw new PortletException("Not expecting any form fields");
                }
View Full Code Here

            throw (IOException)new IOException().initCause(e);
        } catch (SAXException e) {
            throw (IOException)new IOException().initCause(e);
        }

        DatabaseConversionStatus result = new DatabaseConversionStatus();
        result.setMessages((String[]) status.toArray(new String[status.size()]));
        result.setNoTXPools((JDBCPool[]) noTx.toArray(new JDBCPool[noTx.size()]));
        result.setJdbcPools((JDBCPool[]) local.toArray(new JDBCPool[noTx.size()]));
        result.setXaPools((XADatabasePool[]) xa.toArray(new XADatabasePool[xa.size()]));
        return result;
    }
View Full Code Here

            throw (IOException)new IOException().initCause(e);
        } catch (SAXException e) {
            throw (IOException)new IOException().initCause(e);
        }

        DatabaseConversionStatus result = new DatabaseConversionStatus();
        result.setMessages((String[]) status.toArray(new String[status.size()]));
        result.setNoTXPools((JDBCPool[]) noTx.toArray(new JDBCPool[noTx.size()]));
        result.setJdbcPools((JDBCPool[]) local.toArray(new JDBCPool[noTx.size()]));
        result.setXaPools((XADatabasePool[]) xa.toArray(new XADatabasePool[xa.size()]));
        return result;
    }
View Full Code Here

            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 {
            actionResponse.setRenderParameter(MODE_KEY, mode);
        }
        data.store(actionResponse);
View Full Code Here

                if (!item.isFormField()) {
                    File file = File.createTempFile("geronimo-import", "");
                    file.deleteOnExit();
                    log.debug("Writing database pool import file to "+file.getAbsolutePath());
                    item.write(file);
                    DatabaseConversionStatus status = processImport(file, type);
                    request.getPortletSession(true).setAttribute("ImportStatus", new ImportStatus(status));
                    return true;
                } else {
                    throw new PortletException("Not expecting any form fields");
                }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.converter.DatabaseConversionStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.