com.cloudbees.sdk.utils
Class Helper

java.lang.Object
  extended by com.cloudbees.sdk.utils.Helper

public class Helper
extends Object

Author:
Fabian Donze

Constructor Summary
Helper()
           
 
Method Summary
static void copyFile(File from, File to)
           
static void deleteDirectory(File dir)
           
static void deleteDirectoryOnExit(File dir)
           
static void downloadFile(String url, String fileName)
           
static String[] getEnvironmentList(String environments, String... prependEnvs)
           
static String[] getFiles(File dir, String extension)
           
static String getPaddedString(String str, int length)
           
static boolean loadProperties(File propertyFile, Properties properties)
           
static String promptFor(String message)
           
static String promptFor(String message, boolean cannotBeNull)
           
static String promptForAppId()
           
static boolean promptMatches(String message, String successPattern)
           
static void setJVMProxySettings(Properties properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Helper

public Helper()
Method Detail

promptForAppId

public static String promptForAppId()
                             throws IOException
Throws:
IOException

promptFor

public static String promptFor(String message,
                               boolean cannotBeNull)
                        throws IOException
Throws:
IOException

promptMatches

public static boolean promptMatches(String message,
                                    String successPattern)
                             throws IOException
Throws:
IOException

promptFor

public static String promptFor(String message)
                        throws IOException
Throws:
IOException

loadProperties

public static boolean loadProperties(File propertyFile,
                                     Properties properties)

deleteDirectory

public static void deleteDirectory(File dir)

deleteDirectoryOnExit

public static void deleteDirectoryOnExit(File dir)

copyFile

public static void copyFile(File from,
                            File to)
                     throws IOException
Throws:
IOException

downloadFile

public static void downloadFile(String url,
                                String fileName)
                         throws IOException
Throws:
IOException

getFiles

public static String[] getFiles(File dir,
                                String extension)

getPaddedString

public static String getPaddedString(String str,
                                     int length)

getEnvironmentList

public static String[] getEnvironmentList(String environments,
                                          String... prependEnvs)

setJVMProxySettings

public static void setJVMProxySettings(Properties properties)


Copyright © 2011-2013. All Rights Reserved.