Class Utility


  • public class Utility
    extends java.lang.Object
    Utility Class used by UiPathDeploy and UiPathPack
    • Constructor Detail

      • Utility

        public Utility()
    • 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 validate
        s - 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 - ResourceBundle
        s - 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
      • setJobRunFromStrategyEntry

        public void setJobRunFromStrategyEntry​(SelectEntry strategy,
                                               JobOptions options)
      • setJobRunFromJobTypeEntry

        public void setJobRunFromJobTypeEntry​(SelectEntry strategy,
                                              JobOptions options)
      • isServerOSWindows

        public static boolean isServerOSWindows()