Package com.uipath.uipathpackage.util
Class Utility
java.lang.Object
com.uipath.uipathpackage.util.Utility
Utility Class used by UiPathDeploy and UiPathPack
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
downloadCli
(String feedUrl, FilePath downloadPath, TaskListener listener) int
execute
(String command, SerializableCliOptions options, FilePath remoteTempDir, TaskListener listener, EnvVars envVars, Launcher launcher, boolean throwExceptionOnFailure) extractCliApp
(FilePath targetRootCacheDir, TaskListener listener, EnvVars env) getCliDetails
(Run<?, ?> run, TaskListener listener, EnvVars envVars, Launcher launcher) getConfigValue
(ResourceBundle rb, String s) Returns the bundle value of configstatic boolean
void
setCredentialsFromCredentialsEntry
(SelectEntry credentials, AuthenticatedOptions options, Run<?, ?> run) void
setJobRunFromJobTypeEntry
(SelectEntry strategy, JobOptions options) void
setJobRunFromStrategyEntry
(SelectEntry strategy, JobOptions options) void
validateParams
(String param, String s) Validates the param for null or empty checkvoid
validateRuntime
(Launcher launcher, EnvVars envVars)
-
Constructor Details
-
Utility
public Utility()
-
-
Method Details
-
validateParams
Validates the param for null or empty check- Parameters:
param
- Param to validates
- Error Message
-
getConfigValue
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 String command, @Nonnull SerializableCliOptions options, @Nonnull FilePath remoteTempDir, @Nonnull TaskListener listener, @Nonnull EnvVars envVars, @Nonnull Launcher launcher, boolean throwExceptionOnFailure) throws IOException, InterruptedException, URISyntaxException -
getCliDetails
public CliDetails getCliDetails(@Nonnull Run<?, ?> run, @Nonnull TaskListener listener, @Nonnull EnvVars envVars, @Nonnull Launcher launcher) throws IOException, InterruptedException, 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 IOException, InterruptedException, URISyntaxException -
downloadCli
public void downloadCli(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
-
setJobRunFromJobTypeEntry
-
isServerOSWindows
public static boolean isServerOSWindows()
-