public static void executeSQL(String sql) throws Exception { DBUtil dbUtil = new DBUtil(getJDBCUrl(), getUserName(), getPassword(), getDriver()); dbUtil.executeSQL(sql); }
private String attachBuildType(String version) { if (getBuildType()!=null){ version+="-"+getBuildType().name(); } return version; }
public static void saveJSON(JsonElement jsonElement, File file) throws IOException { IOUtil.writeToFile(jsonElementToString(jsonElement), file); }
public static String getCredentialStoreDBPassword() throws ApplicationSettingsException { try { return getSetting(CREDENTIAL_STORE_DB_PASSWORD); } catch (ApplicationSettingsException e) { return getSetting(REGISTRY_DB_PASSWORD); } }
/** * Converts a specified XmlElement (XPP3) to the XmlElement (XPP5). * * @param element * @return The XmlElement (XPP5) converted. */ public static org.xmlpull.infoset.XmlElement xmlElement3ToXmlElement5(org.xmlpull.v1.builder.XmlElement element) { String string = xmlElementToString(element); return stringToXmlElement(string); }
/** * Converts a specified XmlElement (XPP5) to the XmlElement (XPP3). * * @param element * @return The XmlElement (XPP3) converted. */ public static org.xmlpull.v1.builder.XmlElement xmlElement5ToXmlElement3(org.xmlpull.infoset.XmlElement element) { String string = xmlElementToString(element); return stringToXmlElement3(string); }
/** * Return a proper quoted string if the string contains the delimiter character * @param s * @return */ public static String quoteString(String s) { return quoteString(s, DELIMETER); }
/** * Saves a specified XmlElement to a specified file. * * @param element * @param file * @throws IOException */ public static void saveXML(org.xmlpull.v1.builder.XmlElement element, File file) throws IOException { saveXML(xmlElement3ToXmlElement5(element), file); }
/** * Parse the delimitered string and return elements as a string array * @param s * @return */ public static String[] getElementsFromString(String s) { return getElementsFromString(s, DELIMETER, QUOTE); }
public String getFullVersion(){ String version = getBaseVersion(); version = attachMaintainanceVersion(version); version = attachVersionData(version); version = attachBuildType(version); return version; }
public static void initializeTrustStore() throws ApplicationSettingsException { SecurityUtil.setTrustStoreParameters(getTrustStorePath(), getTrustStorePassword()); }
/** * @param rowWeights * @param columnWeights */ public void layout(double[] rowWeights, double[] columnWeights) { SwingUtil.layoutToGrid(this.contentPanel, rowWeights, columnWeights); }
protected static ApplicationSettings getInstance(){ if (INSTANCE==null){ INSTANCE=new ApplicationSettings(); } return INSTANCE; }
private String attachMaintainanceVersion(String version) { if (getMaintenanceVersion()!=null){ version+="."+getMaintenanceVersion(); } return version; }
/** * @deprecated use {{@link #getSetting(String)}} * @return * @throws ApplicationSettingsException */ public static Properties getProperties() throws ApplicationSettingsException { return getInstance().properties; }
public static String getExpStatePath(String experimentId) throws ApplicationSettingsException { return AiravataZKUtils.getExpZnodePath(experimentId) + File.separator + "state"; }
public String getMyProxyUserName() throws ApplicationSettingsException { if (myProxyUserName == null) { myProxyUserName = ServerSettings.getSetting(GFacConstants.MYPROXY_USER); } return myProxyUserName; }
public DBUtil getDbUtil () throws Exception { return new DBUtil(getJDBCUrl(), getUserName(), getPassword(), getDriver()); }
/** * @param rowWeights * @param columnWeights */ public void layout(List<Double> rowWeights, List<Double> columnWeights) { SwingUtil.layoutToGrid(this.contentPanel, rowWeights, columnWeights); }
public static String getExpZnodeHandlerPath(String experimentId, String className) throws ApplicationSettingsException { return ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE) + File.separator + ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME) + File.separator + experimentId + File.separator + className; }