java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.util.CheckoutConfigurationBackendTools

public class CheckoutConfigurationBackendTools extends Object
Task of this class is to read SAP customizing used for checkout
  • Field Details

    • sapLogger

      protected static final Log4JWrapper sapLogger
      Logging instance
  • Constructor Details

    • CheckoutConfigurationBackendTools

      public CheckoutConfigurationBackendTools()
  • Method Details

    • executeSearchhelp

      public Map<String,String> executeSearchhelp(JCoConnection jConn, String searchhelp, String valueField, String descriptionField, Boolean withFallbackDesc) throws BackendException
      generic method to call a searchvaluehelp in the backend and format result can be used for customizing tables, but not the complex valuehelps e.g. BP search
      background:
      called from the backendimplementations for CRM and ERP
      Parameters:
      jConn - JC0-Connection to the backend
      searchhelp - name of the searchhelp
      valueField - = Name of the Field, which contains the value
      descriptionField - = Name of the field, which contains the description background
      withFallbackDesc - = true means, if no description is found, the value is shown as description. This is done in order to avoid lines with space in the DropDownListboxes, which actually refer to values
      Returns:
      a HashMap with pairs ( content of the valuefield, content of the descriptionfield)
      Throws:
      BackendException - in case of issues with the JCO-Connection or ABAP-errors in the backend
    • executeBackendAccess

      protected com.sap.conn.jco.JCoParameterList executeBackendAccess(JCoConnection jConn, String searchhelp) throws BackendException
      Parameters:
      jConn - JC0-Connection to the backend, normally type JCoConnectionStateless
      searchhelp - name of the searchhelp in the backen
      Returns:
      the exportParameterlist with the tables containing the resultl
      Throws:
      BackendException
    • convertSearchResult

      protected Map<String,String> convertSearchResult(com.sap.conn.jco.JCoParameterList jTableParams, String valueField, String descriptionField, boolean withFallbackDesc)
      converts the result of the call to the BAPI_HELPVALUES_GET to an HashMap of pairs (value, description)
      Parameters:
      jTableParams - = contains all table parameters from the call of BAPI_HELPVALUES_GET
      valueField - = Name of the Field, which contains the value
      descriptionField - = Name of the field, which contains the description background
      withFallbackDesc - = true means, if no description is found, the value is shown as description. This is done in order to avoid lines with space in the DropDownListboxes, which actually refer to values
      Returns:
      a HashMap with pairs ( content of the valuefield, content of the descriptionfield)
    • processSearchResult

      protected void processSearchResult(com.sap.conn.jco.JCoParameterList jTableParams, String valueField, String descriptionField, boolean withFallbackDesc, Map<String,String> searchResult)
      Parameters:
      jTableParams -
      valueField -
      descriptionField -
      withFallbackDesc -
      searchResult -
    • processHelpValuesTableParams

      protected void processHelpValuesTableParams(com.sap.conn.jco.JCoParameterList jTableParams, boolean withFallbackDesc, Map<String,String> searchResult, int intValueFieldOffset, int intValueFieldEnd, int intDescriptionFieldOffset, int intDescriptionFieldEnd)
      Parameters:
      jTableParams -
      withFallbackDesc -
      searchResult -
      intValueFieldOffset -
      intValueFieldEnd -
      intDescriptionFieldOffset -
      intDescriptionFieldEnd -
    • deleteTrailingSpaces

      public static String deleteTrailingSpaces(String inString)
      removes character space ( = " ") at the end of the inString examples:
      • "a b c " returns " a b c"
      • " " returns ""
      • "" returns ""
      • null returns null
      Parameters:
      inString - input string
      Returns:
      a copy of the inString, with all space-characters removed from the end