public void setHost( String host ) { this.host = host; XmlUtils.setAttribute(applicationNode, AtsProjectConfiguration.NODE_APPLICATION_PROPERTY_HOST, this.host); this.isLocalHost = HostUtils.isLocalHost(host); }
/** * @param atsAgent * @return whether the agent is located on the local host */ public static boolean isLocalAtsAgent( String atsAgent ) { if (!StringUtils.isNullOrEmpty(atsAgent)) { String[] tokens = HostUtils.splitAddressHostAndPort(atsAgent); if (tokens.length > 0) { return HostUtils.isLocalHost(tokens[0]); } } return true; }
public String getStatusCommandStdOutSearchToken() { if (StringUtils.isNullOrEmpty(statusCommandInfo.stdoutSearchToken)) { return null; } else { return statusCommandInfo.stdoutSearchToken; } }
/** * * @param downloadDir The download directory where the files will be downloaded to. */ public void setDownloadDir( String downloadDir ) { this.downloadDir = IoUtils.normalizeDirPath(downloadDir); }
/** * Utility to silently close a {@link Closeable} item (in/out stream, writer, etc.) if not null. * Does not throw IO exception that might arise. It is just logged. * @param closeable stream to close * @return <code>false</code> if close operation had been issued but not completed successfully */ public static boolean closeStream( Closeable closeable ) { return closeStream(closeable, null); }
/** * Trust-all SSL context. * * @return trust all hostnames and certificates {@link SSLContext} instance */ public static SSLContext getTrustAllSSLContext() { trustAllHostnames(); trustAllHttpsCertificates(); return trustAllSSlContext; }
/** * @param e the exception to parse * @return a formatted string representing the provided exception */ public static String getExceptionMsg( Throwable e ) { return getExceptionMsg(e, null); }
public void setSystemUser( String systemUser ) { this.systemUser = systemUser; XmlUtils.setAttribute(applicationNode, AtsProjectConfiguration.NODE_APPLICATION_PROPERTY_SYSTEM_USER, this.systemUser); }
public static long copyStream( InputStream input, OutputStream output ) throws IOException { return copyStream(input, output, true, true, -1); }
/** * @return a list with all IP addresses */ public static List<InetAddress> getAllIpAddresses() { return getIpAddressesList(false); }
public String getStopCommandStdOutSearchToken() { if (StringUtils.isNullOrEmpty(stopCommandInfo.stdoutSearchToken)) { return null; } else { return stopCommandInfo.stdoutSearchToken; } }
public void setSystemPassword( String systemPassword ) { this.systemPassword = systemPassword; XmlUtils.setAttribute(applicationNode, AtsProjectConfiguration.NODE_APPLICATION_PROPERTY_SYSTEM_PASSWORD, this.systemPassword); }
public String getJavaExecutableToken() { String javaExeToken = ""; if (!StringUtils.isNullOrEmpty(javaExecutable)) { javaExeToken = " -java_exec \"" + javaExecutable + "\""; } return javaExeToken; }
public void setSSHPrivateKeyPassword( String sshPrivateKeyPassword ) { this.sshPrivateKeyPassword = sshPrivateKeyPassword; XmlUtils.setAttribute(applicationNode, AtsProjectConfiguration.NODE_APPLICATION_PROPERTY_SSH_PRIVATE_KEY_PASSWORD, this.sshPrivateKeyPassword); }
public ShellCommand( String alias, String command ) { if (!StringUtils.isNullOrEmpty(alias)) { this.alias = alias; } this.command = command; }
public String getPortToken() { String portToken = ""; if (!StringUtils.isNullOrEmpty(port)) { portToken = " -port " + port; } return portToken; }
public String getStatusCommand() { if (StringUtils.isNullOrEmpty(statusCommandInfo.command)) { return null; } else { return statusCommandInfo.command; } }
public String getStartCommandStdOutSearchToken() { if (StringUtils.isNullOrEmpty(startCommandInfo.stdoutSearchToken)) { return null; } else { return startCommandInfo.stdoutSearchToken; } }
public String getStatusCommandUrl() { if (StringUtils.isNullOrEmpty(statusCommandInfo.url)) { return null; } else { return statusCommandInfo.url; } }
public String getStopCommand() { if (StringUtils.isNullOrEmpty(stopCommandInfo.command)) { return null; } else { return stopCommandInfo.command; } }