Class CheckoutConfigurationBackendTools
java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.util.CheckoutConfigurationBackendTools
Task of this class is to read SAP customizing used for checkout
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertSearchResult(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)static StringdeleteTrailingSpaces(String inString) removes character space ( = " ") at the end of the inString examples: "a b c " returns " a b c" " " returns "" "" returns "" null returns nullprotected com.sap.conn.jco.JCoParameterListexecuteBackendAccess(JCoConnection jConn, String searchhelp) executeSearchhelp(JCoConnection jConn, String searchhelp, String valueField, String descriptionField, Boolean withFallbackDesc) 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.protected voidprocessHelpValuesTableParams(com.sap.conn.jco.JCoParameterList jTableParams, boolean withFallbackDesc, Map<String, String> searchResult, int intValueFieldOffset, int intValueFieldEnd, int intDescriptionFieldOffset, int intDescriptionFieldEnd) protected voidprocessSearchResult(com.sap.conn.jco.JCoParameterList jTableParams, String valueField, String descriptionField, boolean withFallbackDesc, Map<String, String> searchResult)
-
Field Details
-
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 backendsearchhelp- name of the searchhelpvalueField- = Name of the Field, which contains the valuedescriptionField- = Name of the field, which contains the description backgroundwithFallbackDesc- = 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 JCoConnectionStatelesssearchhelp- 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_GETvalueField- = Name of the Field, which contains the valuedescriptionField- = Name of the field, which contains the description backgroundwithFallbackDesc- = 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
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
-