public class SterlingOMSAPIHelper
extends java.lang.Object
com.ibm.commerce.integration.sterling.SterlingClientHelper
to call sterling API.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
API_NAME_GET_COMPLETE_ORDER_DETAILS
The name for Sterling OMS getCompleteOrderDetails API
|
static java.lang.String |
API_NAME_GET_ORDER_LINE_DETAILS
The name for Sterling OMS getOrderLineDetails API
|
static java.lang.String |
COMPONENT_NAME
The component name for Order
|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String |
SERVICE_NAME_GET_COMPLETE_ORDER_DETAILS
The service name for Sterling OMS getCompleteOrderDetails API
|
static java.lang.String |
SERVICE_NAME_GET_ORDER_LINE_DETAILS
The service name for Sterling OMS getOrderLineDetails API
|
Constructor and Description |
---|
SterlingOMSAPIHelper(java.lang.String storeId)
Constructor
|
Modifier and Type | Method and Description |
---|---|
org.apache.commons.json.JSONObject |
callScAPI_Json(java.util.Map paraMap,
java.lang.String apiName)
This method calls sterling API, and return output as JSON object.
|
java.lang.String |
callScAPI_Str(java.util.Map paraMap,
java.lang.String apiName)
This method calls sterling API, and return output as JSON string.
|
org.w3c.dom.Document |
callScAPI(java.util.Map paraMap,
java.lang.String apiName)
This method calls sterling API, and return output as type of
org.w3c.dom.Document . |
org.w3c.dom.Document |
composeInputForGetCompleteOrderDetails(java.util.Map paraMap)
This method constructs the input XML for calling sterling API getCompleteOrderDetails.
|
org.w3c.dom.Document |
composeInputForGetOrderLineDetails(java.util.Map paraMap)
This method constructs the input XML for calling sterling API getOrderLineDetails.
|
static java.lang.String |
convertDocumentToString(org.w3c.dom.Document xmlDocument,
boolean isWithIndent)
This method converts a Document into a String.
|
void |
createScClientHelperInstance(java.lang.String apiName)
This method gets an instance
of
com.ibm.commerce.integration.sterling.oms.SterlingClientHelper . |
void |
createScClientHelperInstanceForService()
This method gets an instance
of
com.ibm.commerce.integration.sterling.oms.SterlingClientHelper . |
org.w3c.dom.Document |
getCompleteOrderDetails(org.w3c.dom.Document input)
This method calls the Sterling
getCompleteOrderDetails API and returns the response. |
org.w3c.dom.Document |
getDataByService(org.w3c.dom.Document input,
java.lang.String serviceName)
This method calls the Sterling
getCompleteOrderDetails API and returns the response. |
static java.util.Map<java.lang.String,com.ibm.commerce.catalog.facade.datatypes.CatalogEntryViewType> |
getItemAndCatentryMap()
Gets the map for PartNumber and CatalogEntryView.
|
org.w3c.dom.Document |
getOrderLineDetails(org.w3c.dom.Document input)
This method calls the Sterling
getOrderLineDetails API and returns the response. |
static void |
setItemAndCatentryMap(java.util.Map<java.lang.String,com.ibm.commerce.catalog.facade.datatypes.CatalogEntryViewType> inMap)
Sets the map for PartNumber and CatalogEntryView.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String API_NAME_GET_COMPLETE_ORDER_DETAILS
public static final java.lang.String API_NAME_GET_ORDER_LINE_DETAILS
public static final java.lang.String SERVICE_NAME_GET_COMPLETE_ORDER_DETAILS
public static final java.lang.String SERVICE_NAME_GET_ORDER_LINE_DETAILS
public static final java.lang.String COMPONENT_NAME
public SterlingOMSAPIHelper(java.lang.String storeId) throws ECSystemException
storeId
- The store ID. Can't be null or empty.ECSystemException
public static void setItemAndCatentryMap(java.util.Map<java.lang.String,com.ibm.commerce.catalog.facade.datatypes.CatalogEntryViewType> inMap)
inMap
- public static java.util.Map<java.lang.String,com.ibm.commerce.catalog.facade.datatypes.CatalogEntryViewType> getItemAndCatentryMap()
public void createScClientHelperInstance(java.lang.String apiName) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
com.ibm.commerce.integration.sterling.oms.SterlingClientHelper
.apiName
- The name of sterling API to be called. Can't be null or empty.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public void createScClientHelperInstanceForService() throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
com.ibm.commerce.integration.sterling.oms.SterlingClientHelper
.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public org.w3c.dom.Document callScAPI(java.util.Map paraMap, java.lang.String apiName) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException, ECException
org.w3c.dom.Document
.paraMap
- The map contains input parameters. Can't be null.apiName
- The API name to be called. Can't be null or empty.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
ECException
public org.w3c.dom.Document getCompleteOrderDetails(org.w3c.dom.Document input) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
getCompleteOrderDetails
API and returns the response.
createScClientHelperInstance(String apiName)
must be invoked before calling this method.
input
- The input XML of sterling API getCompleteOrderDetails
. Can't be null.getCompleteOrderDetails
.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public org.w3c.dom.Document getDataByService(org.w3c.dom.Document input, java.lang.String serviceName) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
getCompleteOrderDetails
API and returns the response.
createScClientHelperInstance(String apiName)
must be invoked before calling this method.
input
- The input XML of sterling API getCompleteOrderDetails
. Can't be null.serviceName
- The service name that will be called.getCompleteOrderDetails
.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public org.w3c.dom.Document getOrderLineDetails(org.w3c.dom.Document input) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
getOrderLineDetails
API and returns the response.
createScClientHelperInstance(String apiName)
must be invoked before calling this method.
input
- The input XML of sterling API getOrderLineDetails
. Can't be null.getOrderLineDetails
.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public org.w3c.dom.Document composeInputForGetCompleteOrderDetails(java.util.Map paraMap) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
paraMap
- The map contains input parameters. Can't be null.getCompleteOrderDetails
.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public org.w3c.dom.Document composeInputForGetOrderLineDetails(java.util.Map paraMap) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
paraMap
- The map contains input parameters. Can't be null.getOrderLineDetails
.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public java.lang.String callScAPI_Str(java.util.Map paraMap, java.lang.String apiName) throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException, ECException
paraMap
- The map contains input parameters. Can't be null.apiName
- The API name to be called. Can't be null or empty.com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
ECException
public org.apache.commons.json.JSONObject callScAPI_Json(java.util.Map paraMap, java.lang.String apiName) throws ECException, com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
paraMap
- The map contains input parameters. Can't be null.apiName
- The API name to be called. Can't be null or empty.ECException
com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public static java.lang.String convertDocumentToString(org.w3c.dom.Document xmlDocument, boolean isWithIndent)
xmlDocument
- The document to convert into a String. Can't be null.isWithIndent
- A flag to indicate whether indent is included in the output string.