package org.rabix.executor.config;

import org.apache.commons.configuration.Configuration;
import org.rabix.common.helper.ChecksumHelper.HashAlgorithm;

public class FileConfig {

  public static final String CALCULATE_FILE_CHECKSUM = "rabix.calculate_file_checksum";
  public static final String CHECKSUM_ALGORITHM = "rabix.checksum_algorithm";

  public static boolean calculateFileChecksum(Configuration configuration) {
    return configuration.getBoolean(CALCULATE_FILE_CHECKSUM);
  }

  public static HashAlgorithm checksumAlgorithm(Configuration configuration) {
    return HashAlgorithm.valueOf(configuration.getString(CHECKSUM_ALGORITHM));
  }

}

@@ -476,16 +476,22 @@
 CHECKSUM
+, true
 );%0A  %7D%0A%0A
@@ -644,16 +644,24 @@
 LGORITHM
+, %22SHA1%22
 ));%0A  %7D%0A

add default values for file config