org.jfrog.build.extractor.clientConfiguration.util.spec
Class SpecsHelper

java.lang.Object
  extended by org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper

public class SpecsHelper
extends java.lang.Object

Created by diman on 24/08/2016.


Constructor Summary
SpecsHelper(org.jfrog.build.api.util.Log log)
           
 
Method Summary
 java.util.Set<org.jfrog.build.client.DeployDetails> getDeployDetails(Spec uploadJson, java.io.File workspace)
          Returns Set of deploy details that represents the given spec
 java.util.Set<org.jfrog.build.client.DeployDetails> getDeployDetails(Spec uploadJson, java.io.File workspace, com.google.common.collect.ArrayListMultimap<java.lang.String,java.lang.String> buildProperties)
          Returns Set of deploy details that represents the given spec
 Spec getDownloadUploadSpec(java.io.File downloadUploadSpecFile)
          Converts File to Spec object
 Spec getDownloadUploadSpec(java.lang.String downloadUploadSpec)
          Converts String to Spec object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecsHelper

public SpecsHelper(org.jfrog.build.api.util.Log log)
Method Detail

getDeployDetails

public java.util.Set<org.jfrog.build.client.DeployDetails> getDeployDetails(Spec uploadJson,
                                                                            java.io.File workspace)
                                                                     throws java.io.IOException,
                                                                            java.security.NoSuchAlgorithmException
Returns Set of deploy details that represents the given spec

Parameters:
uploadJson - The required spec represented as Spec object
workspace - File object that represents the workspace
Returns:
Set of DeployDetails that was calculated from the given params
Throws:
java.io.IOException - Thrown if any error occurs while reading the file, calculating the checksums or in case of any file system exception
java.security.NoSuchAlgorithmException - Thrown if any of the given algorithms aren't supported

getDeployDetails

public java.util.Set<org.jfrog.build.client.DeployDetails> getDeployDetails(Spec uploadJson,
                                                                            java.io.File workspace,
                                                                            com.google.common.collect.ArrayListMultimap<java.lang.String,java.lang.String> buildProperties)
                                                                     throws java.io.IOException,
                                                                            java.security.NoSuchAlgorithmException
Returns Set of deploy details that represents the given spec

Parameters:
uploadJson - The required spec represented as Spec object
workspace - File object that represents the workspace
buildProperties - properties to add to all the files
Returns:
Set of DeployDetails that was calculated from the given params
Throws:
java.io.IOException - Thrown if any error occurs while reading the file, calculating the checksums or in case of any file system exception
java.security.NoSuchAlgorithmException - Thrown if any of the given algorithms aren't supported

getDownloadUploadSpec

public Spec getDownloadUploadSpec(java.io.File downloadUploadSpecFile)
                           throws java.io.IOException
Converts File to Spec object

Parameters:
downloadUploadSpecFile - the File to convert
Returns:
Spec object that represents the provided file
Throws:
java.io.IOException - in case of IO problem

getDownloadUploadSpec

public Spec getDownloadUploadSpec(java.lang.String downloadUploadSpec)
                           throws java.io.IOException
Converts String to Spec object

Parameters:
downloadUploadSpec - the String to convert
Returns:
Spec object that represents the string
Throws:
java.io.IOException - in case of IO problem