public abstract class AbstractShippingMethodRestResource extends GenericService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
FAILED_SHIPPING_METHODS |
static java.lang.String |
METHOD_ID_KEY |
static java.lang.String |
RESOURCE_NAME |
static java.util.ResourceBundle |
sResourceBundle
Resource Bundle
|
static java.lang.String |
UNKNOWN_SHIPPING_METHOD |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
AbstractShippingMethodRestResource() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
buildMemberUris(java.util.Collection<java.lang.String> pMembers,
<any> pQueryParams)
Build the members URIs for the given list of items of Strings.
|
protected java.util.List<java.lang.String> |
getAllShippingMethods(ShippingGroup pShippingGroup)
Returns a list of shipping methods that are available for a given shipping group.
|
protected RepresentationModel.Builder |
getRepresentationModelBuilder(java.util.Collection<java.lang.String> pMembers)
Gets the RepresentationModel.Builder with the given collection of Strings
being used to build member URIs.
|
protected RepresentationModel.Builder |
getRepresentationModelBuilder(java.lang.Object pState)
Gets the RepresentationModel.Builder with the given object acting as the state.
|
RepresentationModel |
getShippingMethod(ShippingGroup pShippingGroup,
java.lang.String pShippingMethodId)
Returns a representation model of a single shipping method.
|
ShippingPricingEngine |
getShippingPricingEngine()
Returns the shipping pricing engine to consult for available shipping methods
|
RepresentationModel |
listShippingMethods(ShippingGroup pShippingGroup)
Returns a list of shipping methods that are available for a given shipping group.
|
void |
setShippingPricingEngine(ShippingPricingEngine pShippingPricingEngine)
Sets the shipping pricing engine to consult for available shipping methods
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final java.lang.String UNKNOWN_SHIPPING_METHOD
public static final java.lang.String FAILED_SHIPPING_METHODS
public static final java.lang.String METHOD_ID_KEY
public static final java.lang.String RESOURCE_NAME
public static java.util.ResourceBundle sResourceBundle
public void setShippingPricingEngine(ShippingPricingEngine pShippingPricingEngine)
pShippingPricingEngine
- reference to ShippingPricingEnginepublic ShippingPricingEngine getShippingPricingEngine()
public RepresentationModel listShippingMethods(ShippingGroup pShippingGroup) throws RestException
RestException
- if input ID is invalid or an internal error occurspublic RepresentationModel getShippingMethod(ShippingGroup pShippingGroup, java.lang.String pShippingMethodId) throws RestException
pShippingGroup
- the shipping group to use for possible shipping methodspShippingMethodId
- name of the shipping methodRestException
- if input ID is invalid or an internal error occursprotected java.util.List<java.lang.String> getAllShippingMethods(ShippingGroup pShippingGroup) throws RestException
RestException
- if input ID is invalid or an internal error occursprotected RepresentationModel.Builder getRepresentationModelBuilder(java.lang.Object pState)
pState
- the state that will be added to the representation modelprotected RepresentationModel.Builder getRepresentationModelBuilder(java.util.Collection<java.lang.String> pMembers) throws RestException
pMembers
- the members that will be added to the representation modelRestException
- if the member URIs could not be builtprotected java.lang.String[] buildMemberUris(java.util.Collection<java.lang.String> pMembers, <any> pQueryParams) throws RestException
pMembers
- a list of Strings from which to build the member URIspQueryParams
- optional map of query param key/value pairs to be added to any built uris, null if noneRestException
- if a problem occurred whilst building the member URIs