Package io.jenkins.plugins.commons.model
Class Util
java.lang.Object
io.jenkins.plugins.commons.model.Util
This is class provides functions related to extract zip and zip folder. It
contains common methods regarding adding headers to http request
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddCommonConfigurationToHttpClient(long connectionTimeout) voidaddFileToZip(File file, ZipOutputStream zip, String basePath, Set<String> lstEntries, List<String> lstfiles) voidaddFolderToZip(File folder, ZipOutputStream zout, String basePath, Set<String> lstEntries, List<String> lstfiles) appendTimestampToFile(String fileName, String extension) concatPath(String firstPath, String secondPath) voidextractFolder(String zipFile, String extractFolderPath) getBasicAuthToken(String userName, String password) static Utilstatic booleanisIaCScanFile(String str)
-
Field Details
-
EMPTY_BASE_PATH
- See Also:
-
-
Method Details
-
getInstance
-
getBasicAuthToken
-
getAuthorizationHeader
-
addCommonConfigurationToHttpRequest
-
generateJwtTokenUsingClientIdAndClientSecret
-
addCommonConfigurationToHttpClient
-
concatPath
-
getTempDirectory
-
appendTimestampToFile
-
getRandomZipPath
-
extractFolder
-
getRenamedPath
-
addFileToZip
-
addFolderToZip
public void addFolderToZip(File folder, ZipOutputStream zout, String basePath, Set<String> lstEntries, List<String> lstfiles) throws IOException - Throws:
IOException
-
isIaCScanFile
-