Package com.qualys.plugins.pc.util
Class Helper
- java.lang.Object
-
- com.qualys.plugins.pc.util.Helper
-
public class Helper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Helper.QualysLogFormatter
-
Constructor Summary
Constructors Constructor Description Helper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
copyEvaluationResultToFile(String rootDir, String filename, PrintStream buildLogger, com.google.gson.JsonObject evalresult)
static void
createGlEnVar(String key, String value)
static void
createNewFile(String rootDir, String filename, String content, PrintStream buildLogger)
QualysPCClient
getClient(boolean useProxy, String server, String credsId, String proxyServer, int proxyPortInt, String proxyCredentialsId, Item item)
static ArrayList<String>
getCredentails(String credentialsId, Item item)
static Logger
getLogger(String loggerName)
static Comparator<ListBoxModel.Option>
getOptionItemmsComparator()
QualysAuth
getQualysAuth(boolean useProxy, String server, String credsId, String proxyServer, int proxyPortInt, String proxyCredentialsId, Item item)
static String
intListToString(ArrayList<Integer> numbers)
static boolean
isValidCidList(String cidList)
static String
longToTime(long millis)
static String
secondsToReadableTime(long duration)
static void
setOptionItemmsComparator(Comparator<ListBoxModel.Option> optionItemmsComparator)
static String
stringListToString(ArrayList<String> strings)
static String
urlEncodeUTF8(String s)
-
-
-
Method Detail
-
getClient
public QualysPCClient getClient(boolean useProxy, String server, String credsId, String proxyServer, int proxyPortInt, String proxyCredentialsId, Item item)
-
getQualysAuth
public QualysAuth getQualysAuth(boolean useProxy, String server, String credsId, String proxyServer, int proxyPortInt, String proxyCredentialsId, Item item)
-
isValidCidList
public static boolean isValidCidList(String cidList)
-
secondsToReadableTime
public static String secondsToReadableTime(long duration)
-
createNewFile
public static void createNewFile(String rootDir, String filename, String content, PrintStream buildLogger)
-
copyEvaluationResultToFile
public static void copyEvaluationResultToFile(String rootDir, String filename, PrintStream buildLogger, com.google.gson.JsonObject evalresult) throws IOException
- Throws:
IOException
-
createGlEnVar
public static void createGlEnVar(String key, String value) throws IOException
- Throws:
IOException
-
longToTime
public static String longToTime(long millis)
-
getOptionItemmsComparator
public static Comparator<ListBoxModel.Option> getOptionItemmsComparator()
- Returns:
- the optionItemmsComparator
-
setOptionItemmsComparator
public static void setOptionItemmsComparator(Comparator<ListBoxModel.Option> optionItemmsComparator)
- Parameters:
optionItemmsComparator
- the optionItemmsComparator to set
-
-