Class ConfigurationUtils

java.lang.Object
com.vdoc.sdk.commons.utils.ConfigurationUtils

public class ConfigurationUtils extends Object
Class utility to manipulate configuration parameters.
Since:
18/06/2015
Version:
1.0
Author:
vlygeros
  • Constructor Details

    • ConfigurationUtils

      public ConfigurationUtils()
  • Method Details

    • asMap

      public static Map<String,String> asMap(String mappingFields, String firstSeparator, String secondSeparator)
      Allow to convert a configuration parameter to a Map object. Example of configuration key: key=sourceField1|targetFieldX;sourceField2|targetFieldY;sourceField3|targetFieldZ
      Parameters:
      mappingFields - value of the key
      firstSeparator - first separator. In the example: ";"
      secondSeparator - second separator. In the example: "\\|";
      Returns:
      A Map object with the following entries: sourceField=targetField, sourceField2=targetFieldY, sourceField3|targetFieldZ