Package com.uipath.uipathpackage.util
Class Utility
- java.lang.Object
-
- com.uipath.uipathpackage.util.Utility
-
public class Utility extends java.lang.Object
Utility Class used by UiPathDeploy and UiPathPack
-
-
Constructor Summary
Constructors Constructor Description Utility()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
downloadCli(java.lang.String feedUrl, FilePath downloadPath, TaskListener listener)
int
execute(java.lang.String command, SerializableCliOptions options, FilePath remoteTempDir, TaskListener listener, EnvVars envVars, Launcher launcher, boolean throwExceptionOnFailure)
FilePath
extractCliApp(FilePath targetRootCacheDir, TaskListener listener, EnvVars env)
CliDetails
getCliDetails(Run<?,?> run, TaskListener listener, EnvVars envVars, Launcher launcher)
java.lang.String
getConfigValue(java.util.ResourceBundle rb, java.lang.String s)
Returns the bundle value of configstatic boolean
isServerOSWindows()
void
setCredentialsFromCredentialsEntry(SelectEntry credentials, AuthenticatedOptions options, Run<?,?> run)
void
setJobRunFromJobTypeEntry(SelectEntry strategy, JobOptions options)
void
setJobRunFromStrategyEntry(SelectEntry strategy, JobOptions options)
void
validateParams(java.lang.String param, java.lang.String s)
Validates the param for null or empty checkvoid
validateRuntime(Launcher launcher, EnvVars envVars)
-
-
-
Method Detail
-
validateParams
public void validateParams(@Nonnull java.lang.String param, @Nonnull java.lang.String s)
Validates the param for null or empty check- Parameters:
param
- Param to validates
- Error Message
-
getConfigValue
public java.lang.String getConfigValue(@Nonnull java.util.ResourceBundle rb, @Nonnull java.lang.String s)
Returns the bundle value of config- Parameters:
rb
- ResourceBundles
- key of the bundle- Returns:
- value of the resource bundle corresponding to key
-
execute
public int execute(@Nonnull java.lang.String command, @Nonnull SerializableCliOptions options, @Nonnull FilePath remoteTempDir, @Nonnull TaskListener listener, @Nonnull EnvVars envVars, @Nonnull Launcher launcher, boolean throwExceptionOnFailure) throws java.io.IOException, java.lang.InterruptedException, java.net.URISyntaxException
- Throws:
java.io.IOException
java.lang.InterruptedException
java.net.URISyntaxException
-
getCliDetails
public CliDetails getCliDetails(@Nonnull Run<?,?> run, @Nonnull TaskListener listener, @Nonnull EnvVars envVars, @Nonnull Launcher launcher) throws java.io.IOException, java.lang.InterruptedException, java.net.URISyntaxException
- Throws:
java.io.IOException
java.lang.InterruptedException
java.net.URISyntaxException
-
validateRuntime
public void validateRuntime(@Nonnull Launcher launcher, @Nonnull EnvVars envVars) throws AbortException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
AbortException
com.fasterxml.jackson.core.JsonProcessingException
-
extractCliApp
public FilePath extractCliApp(@Nonnull FilePath targetRootCacheDir, @Nonnull TaskListener listener, @Nonnull EnvVars env) throws java.io.IOException, java.lang.InterruptedException, java.net.URISyntaxException
- Throws:
java.io.IOException
java.lang.InterruptedException
java.net.URISyntaxException
-
downloadCli
public void downloadCli(java.lang.String feedUrl, @Nonnull FilePath downloadPath, @Nonnull TaskListener listener) throws AbortException
- Throws:
AbortException
-
setCredentialsFromCredentialsEntry
public void setCredentialsFromCredentialsEntry(SelectEntry credentials, AuthenticatedOptions options, @Nonnull Run<?,?> run) throws AbortException
- Throws:
AbortException
-
setJobRunFromStrategyEntry
public void setJobRunFromStrategyEntry(SelectEntry strategy, JobOptions options)
-
setJobRunFromJobTypeEntry
public void setJobRunFromJobTypeEntry(SelectEntry strategy, JobOptions options)
-
isServerOSWindows
public static boolean isServerOSWindows()
-
-