Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • tryParseInt

        public static int tryParseInt​(String value)
      • isNullOrEmpty

        public static boolean isNullOrEmpty​(List list)
      • isNullOrEmpty

        public static boolean isNullOrEmpty​(String string)
      • isValidUrl

        public static String isValidUrl​(String url)
      • getFileExpressionPatternString

        public static String getFileExpressionPatternString​(String technologyStack)
      • createZipFile

        public static File createZipFile​(String techStack,
                                         FilePath payload,
                                         PrintStream logger)
                                  throws IOException
        Zips a folder, stores it in a temp location and returns the object
        Parameters:
        techStack - technology stack of the folder to zip
        payload - location of the files to zip
        logger - logger to write status text to at_return a File object
        Throws:
        IOException - no files
      • decrypt

        public static String decrypt​(String stringToDecrypt)
      • decrypt

        public static String decrypt​(Secret stringToDecrypt)
      • encrypt

        public static String encrypt​(String stringToEncrypt)
      • isEncrypted

        public static boolean isEncrypted​(String stringToEncrypt)
      • isCredential

        public static boolean isCredential​(String id)
      • retrieveSecretDecryptedValue

        public static String retrieveSecretDecryptedValue​(String id)
      • createResponseViewModel

        public static <T> String createResponseViewModel​(T response)
      • createCorrelationId

        public static String createCorrelationId()
      • unexpectedServerResponseErrors

        public static List<String> unexpectedServerResponseErrors()
      • unauthorizedServerResponseErrors

        public static List<String> unauthorizedServerResponseErrors()
      • getAuthModelFromObject

        public static AuthenticationModel getAuthModelFromObject​(net.sf.json.JSONObject authModelObject)
      • getLogTimestampFormat

        public static String getLogTimestampFormat()
      • traceLogging

        public static boolean traceLogging()