Package org.jitterbit.integration.server.db.trandb

Examples of org.jitterbit.integration.server.db.trandb.SourcesTabRow


            Long id = mapper.getId(guid);
            if (id != null) {
                // No need to close srcTab in a finally block, since we are closing
                // the connection itself explicitly
                SourcesTab srcTab = new SourcesTab(tranDbConnection);
                SourcesTabRow row = srcTab.query(id.intValue());
                String encrypted = row.get_password();
                if (encrypted != null) {
                    verifyAccess(guid);
                    return Crypto.decryptString(encrypted);
                }
            }
View Full Code Here


            this.sourceId = sourceId;
        }

        public ConnectionParams getParams() throws ServerDbException {
            try {
                SourcesTabRow row = getDefinition();
                if (row == null) {
                    throw new ServerDbException("Could not find the deployed definition of the Source with GUID "
                                    + sourceId);
                }
                ConnectionParams params = new ConnectionParams();
                params.setServer(row.get_locator())
                      .setDatabase(row.get_dbname())
                      .setUser(row.get_login())
                      .setPassword(decryptPassword(row.get_password()))
                      .setPort(Port.valueOf(row.get_port()))
                      .setDriverName(row.get_driver())
                      .setTransactionIsolationLevel(getTransactionIsolationLevel(row))
                      .setManualConnectionString(row.get_connectstring())
                      .setAdditionalParams(row.get_optional_connectstring());
                return params;
            } catch (SQLException ex) {
                throw new ServerDbException(ex.getMessage(), ex);
            }
        }
View Full Code Here

        }

        @Override
        public LdapConnectionInfo createConnectionInfo(int id) throws LdapException {
            try {
                SourcesTabRow row = sourcesTab.query(id);
                if (row == null) {
                    throw new LdapException("The source with id " + id + " does not exist");
                }
                String server = row.get_locator();
                Integer portNumber = row.get_port();
                Port port = (portNumber != null) ? Port.valueOf(portNumber) : null;
                String login = row.get_login();
                String password = getPassword(row);
                LdapSecurityLevel secure = getSecurityLevel(row);
                return new LdapConnectionInfo(server, port, login, password, secure);
            } catch (SQLException ex) {
                throw new LdapException("Failed to create LdapConnectionInfo from the source with id " + id, ex);
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.server.db.trandb.SourcesTabRow

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.