/** * Substitute environment variables in the supplied string. * * @param orig the string to modify * @return the string with environment variables resolved */ public String environmentSubstitute(String orig) { if (m_env != null) { try { orig = m_env.substitute(orig); } catch (Exception ex) { // not interested if there are no variables substituted } } return orig; }
@Override public void actionPerformed(ActionEvent e) { String selected = (String) m_combo.getSelectedItem(); try { selected = processSelected(selected); selected = m_env.substitute(selected); } catch (Exception ex) { // quietly ignore unresolved variables } m_combo.setToolTipText(selected); } });
public String environmentSubstitute(String source) { Environment env = m_env != null ? m_env : Environment.getSystemWide(); try { source = env.substitute(source); } catch (Exception ex) { } return source; }
@Override public void actionPerformed(ActionEvent e) { String selected = (String) m_combo.getSelectedItem(); try { selected = processSelected(selected); selected = m_env.substitute(selected); } catch (Exception ex) { // quietly ignore unresolved variables } m_combo.setToolTipText(selected); } });
public String environmentSubstitute(String source) { Environment env = m_env != null ? m_env : Environment.getSystemWide(); try { source = env.substitute(source); } catch (Exception ex) { } return source; }
@Override public void actionPerformed(ActionEvent e) { String selected = (String) m_combo.getSelectedItem(); try { selected = processSelected(selected); selected = m_env.substitute(selected); } catch (Exception ex) { // quietly ignore unresolved variables } m_combo.setToolTipText(selected); } });
@Override public void actionPerformed(ActionEvent e) { String selected = (String) m_combo.getSelectedItem(); try { selected = processSelected(selected); selected = m_env.substitute(selected); } catch (Exception ex) { // quietly ignore unresolved variables } m_combo.setToolTipText(selected); } });
/** * Resolves log file path. * * @return Log file path */ protected String resolveLogFilePath() { Environment env = Environment.getSystemWide(); String resolved = logFile.toString(); try { resolved = env.substitute(resolved); } catch (Exception ex) { // ignore } return new File(resolved).getPath(); }
/** * Sets the database user * * @param user the database user name */ @Override public void setUser(String user) { checkEnv(); m_User = user; String userCopy = user; try { userCopy = m_env.substitute(userCopy); } catch (Exception ex) { } m_DataBaseConnection.setUsername(userCopy); }
/** * Sets user password for the database * * @param password the password */ @Override public void setPassword(String password) { checkEnv(); m_Password = password; String passCopy = password; try { passCopy = m_env.substitute(passCopy); } catch (Exception ex) { } m_DataBaseConnection.setPassword(password); }
/** * Sets the database password. * * @param password the password */ @Override public void setPassword(String password) { checkEnv(); m_Password = password; String passCopy = password; try { passCopy = m_env.substitute(passCopy); } catch (Exception ex) { } m_DataBaseConnection.setPassword(password); }
/** * Sets the database URL. * * @param url the URL */ @Override public void setUrl(String url) { checkEnv(); m_URL = url; String uCopy = m_URL; try { uCopy = m_env.substitute(uCopy); } catch (Exception ex) { } m_DataBaseConnection.setDatabaseURL(uCopy); }
/** * Sets the database URL * * @param url string with the database URL */ @Override public void setUrl(String url) { checkEnv(); m_URL = url; String dbU = m_URL; try { dbU = m_env.substitute(dbU); } catch (Exception ex) { } m_DataBaseConnection.setDatabaseURL(dbU); }
/** * Sets the database password. * * @param password the password */ @Override public void setPassword(String password) { checkEnv(); m_Password = password; String passCopy = password; try { passCopy = m_env.substitute(passCopy); } catch (Exception ex) { } m_DataBaseConnection.setPassword(password); }
/** * Sets the database URL * * @param url string with the database URL */ @Override public void setUrl(String url) { checkEnv(); m_URL = url; String dbU = m_URL; try { dbU = m_env.substitute(dbU); } catch (Exception ex) { } m_DataBaseConnection.setDatabaseURL(dbU); }
/** * Sets user password for the database * * @param password the password */ @Override public void setPassword(String password) { checkEnv(); m_Password = password; String passCopy = password; try { passCopy = m_env.substitute(passCopy); } catch (Exception ex) { } m_DataBaseConnection.setPassword(password); }
/** * Sets the database user * * @param user the database user name */ @Override public void setUser(String user) { checkEnv(); m_User = user; String userCopy = user; try { userCopy = m_env.substitute(userCopy); } catch (Exception ex) { } m_DataBaseConnection.setUsername(userCopy); }
/** * Sets the database URL. * * @param url the URL */ @Override public void setUrl(String url) { checkEnv(); m_URL = url; String uCopy = m_URL; try { uCopy = m_env.substitute(uCopy); } catch (Exception ex) { } m_DataBaseConnection.setDatabaseURL(uCopy); }
public void actionPerformed(ActionEvent e) { if (m_dbProps.getText() != null && m_dbProps.getText().length() > 0) { String propsS = m_dbProps.getText(); try { propsS = m_env.substitute(propsS); } catch (Exception ex) { } File propsFile = new File(propsS); if (propsFile.exists()) { ((DatabaseSaver)m_dsSaver.getSaverTemplate()).setCustomPropsFile(propsFile); ((DatabaseSaver)m_dsSaver.getSaverTemplate()).resetOptions(); m_dbaseURLText.setText(((DatabaseConverter)m_dsSaver.getSaverTemplate()).getUrl()); } } } });
public void actionPerformed(ActionEvent e) { if (m_dbProps.getText() != null && m_dbProps.getText().length() > 0) { String propsS = m_dbProps.getText(); try { propsS = m_env.substitute(propsS); } catch (Exception ex) { } File propsFile = new File(propsS); if (propsFile.exists()) { ((DatabaseSaver)m_dsSaver.getSaverTemplate()).setCustomPropsFile(propsFile); ((DatabaseSaver)m_dsSaver.getSaverTemplate()).resetOptions(); m_dbaseURLText.setText(((DatabaseConverter)m_dsSaver.getSaverTemplate()).getUrl()); } } } });