java.lang.Object
de.hybris.platform.sap.sapproductavailability.converter.ConversionTools

public class ConversionTools extends Object
  • Constructor Details

    • ConversionTools

      public ConversionTools()
  • Method Details

    • addLeadingZerosToNumericID

      public static String addLeadingZerosToNumericID(String inputString, int desiredLength)
      Method adds leading zeros to a numeric string based on a specified total length
      Parameters:
      inputString - contains the numeric String
      desiredLength - specifies the total desired length of the string
      Returns:
      String with leading zeroes appended
    • convertQuantityToNumber

      public static Long convertQuantityToNumber(String quantity)
      Since the format of the quantity is xxx,yyy we need to reparse the string. Format of quantity: [+|-][0123456789]{1,13}\{DecimalPoint}[0123456789]{3} DecimalPoint: {.|,} depending on Locale.
    • convertProductCode

      protected String convertProductCode(String ProductCode)
      Converted the product code to the internal format. For numeric product ID, add leading zeros so that the length of the product ID becomes 18 decimal digits. For non-numeric product ID, do not do any change.
      Parameters:
      ProductCode -
      Returns:
      Formatted product code