@RestResource(id="atg.commerce.promotion.restresources.ClosenessQualifierRestSubresource") public class ClosenessQualifierRestSubresource extends GenericService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected java.lang.String |
mEmbeddedPromotionRelationshipName |
protected java.lang.String |
mEmbeddedUpsellProductsRelationshipName |
static java.lang.String |
PARENT_ITEM_ID |
static java.lang.String |
PARENT_ITEM_TYPE |
static java.lang.String |
PARENT_PROPERTY_NAME |
static java.lang.String |
PROMOTION |
static java.lang.String |
RESOURCE_NAME |
static java.util.ResourceBundle |
sResourceBundle
Resource bundle
|
static java.lang.String |
UPSELL_ACTION |
static java.lang.String |
UPSELL_PRODUCTS |
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 |
---|
ClosenessQualifierRestSubresource() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
buildMemberUris(java.util.Collection<RepositoryItem> pMembers,
<any> pQueryParams)
Build the members URIs for the given list of items of type
RepositoryItem . |
RepresentationModel |
getClosenessQualifier(java.lang.String pClosenessQualifierId)
Gets the representation model object of closeness qualifier item from the repository for
the given closeness qualifier id.
|
java.lang.String |
getClosenessQualifierDroplet()
Gets the ClosenessQualifierDroplet component path.
|
java.lang.String |
getClosenessQualifierItemDescriptorName()
Get the closeness qualifier item descriptor name.
|
protected java.util.List<RepositoryItem> |
getClosenessQualifierItems(Order pOrder,
java.lang.String pType)
Get closeness qualifier repository items associated to a given order and for a given type.
|
RepresentationModel |
getClosenessQualifiers(java.lang.String pType)
Returns the collection of closeness qualifiers applied to the current cart.
|
java.lang.String |
getEmbeddedPromotionRelationshipName()
Get the relationship name used for the embedded promotion resource.
|
java.lang.String |
getEmbeddedUpsellProductsRelationshipName()
Get the relationship name used for the embedded upsell products resource.
|
Order |
getOrder()
Retrieve the order from the request cache.
|
OrderManager |
getOrderManager()
Returns the OrderManager component path.
|
PricingModelProperties |
getPricingModelProperties()
Gets the Pricing Model Properties component that stores all the properties
of the pricing model
|
PromotionTools |
getPromotionTools()
Gets the promotion tools component that provides utility methods for the
promotion retrieval
|
protected RepresentationModel.Builder |
getRepresentationModelBuilder(java.util.Collection<RepositoryItem> pMembers)
Gets the RepresentationModel.Builder with the given collection of RepositoryItems
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.
|
void |
setClosenessQualifierDroplet(java.lang.String pClosenessQualifierDroplet)
Sets the ClosenessQualifierDroplet component path.
|
void |
setClosenessQualifierItemDescriptorName(java.lang.String pClosenessQualifierItemDescriptorName)
Set the closeness qualifier item descriptor name.
|
void |
setEmbeddedPromotionRelationshipName(java.lang.String pEmbeddedPromotionRelationshipName)
Configure the relationship name used for the embedded promotion resource.
|
void |
setEmbeddedUpsellProductsRelationshipName(java.lang.String pEmbeddedUpsellProductsRelationshipName)
Configure the relationship name used for the embedded upsell products resource.
|
void |
setOrderManager(OrderManager pOrderManager)
Sets the OrderManager component path.
|
void |
setPricingModelProperties(PricingModelProperties pPricingModelProperties)
Sets the Pricing Model Properties component that stores all the properties
of the pricing model
|
void |
setPromotionTools(PromotionTools pPromotionTools)
Sets the the promotion tools component that provides utility methods for
the promotion retrieval
|
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 RESOURCE_NAME
public static final java.lang.String PARENT_ITEM_ID
public static final java.lang.String PARENT_ITEM_TYPE
public static final java.lang.String PARENT_PROPERTY_NAME
public static final java.lang.String UPSELL_ACTION
public static final java.lang.String PROMOTION
public static final java.lang.String UPSELL_PRODUCTS
public static java.util.ResourceBundle sResourceBundle
protected java.lang.String mEmbeddedUpsellProductsRelationshipName
protected java.lang.String mEmbeddedPromotionRelationshipName
public void setPricingModelProperties(PricingModelProperties pPricingModelProperties)
pPricingModelProperties
- the Pricing Model Properties component that stores all the
properties of the pricing modelpublic PricingModelProperties getPricingModelProperties()
public OrderManager getOrderManager()
public void setOrderManager(OrderManager pOrderManager)
pOrderManager
- the OrderManager component path to set.public void setPromotionTools(PromotionTools pPromotionTools)
pPromotionTools
- the promotion tools component that provides utility methods for the promotion retrievalpublic PromotionTools getPromotionTools()
public java.lang.String getClosenessQualifierItemDescriptorName()
public void setClosenessQualifierItemDescriptorName(java.lang.String pClosenessQualifierItemDescriptorName)
public java.lang.String getClosenessQualifierDroplet()
public void setClosenessQualifierDroplet(java.lang.String pClosenessQualifierDroplet)
pClosenessQualifierDroplet
- a nucleus path to ClosenessQualifierDroplet component.public void setEmbeddedUpsellProductsRelationshipName(java.lang.String pEmbeddedUpsellProductsRelationshipName)
pEmbeddedUpsellProductsRelationshipName
- the name of the relationship to the embedded upsell products resource.public java.lang.String getEmbeddedUpsellProductsRelationshipName()
public void setEmbeddedPromotionRelationshipName(java.lang.String pEmbeddedPromotionRelationshipName)
pEmbeddedPromotionRelationshipName
- the name of the relationship to the embedded promotion resource.public java.lang.String getEmbeddedPromotionRelationshipName()
@Endpoint(id="/closenessQualifiers/{closenessQualifierId}#GET", isSingular=true, filterId="closenessQualifiers.id-Default") public RepresentationModel getClosenessQualifier(java.lang.String pClosenessQualifierId) throws RestException, RepositoryException
pClosenessQualifierId
- The closeness qualifier repository item id that needs to fetched from the repository.RestException
- If there is a problem while fetching the closeness qualifier from the repository.RepositoryException
- if the closeness qualifier item could not be retrieved.@Endpoint(id="/closenessQualifiers#GET", isSingular=false, filterId="closenessQualifiers-Default") public RepresentationModel getClosenessQualifiers(java.lang.String pType) throws RestException, CommerceException
pType
- The type of closenessQualifiers to be returned. It can be item, order,
shipping or all. If pType is null, all the closenessQualifiers associated to
the current cart will be returned.RestException
- if an internal server error occursCommerceException
- if failed to load orderprotected java.util.List<RepositoryItem> getClosenessQualifierItems(Order pOrder, java.lang.String pType)
pOrder
- the order for which the closeness qualifier repository items need to be retrieved.pType
- the type of the closeness qualifier.protected RepresentationModel.Builder getRepresentationModelBuilder(java.lang.Object pState)
Also embeds promotion and upsellProducts summaries.
pState
- the state that will be added to the representation modelprotected RepresentationModel.Builder getRepresentationModelBuilder(java.util.Collection<RepositoryItem> 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<RepositoryItem> pMembers, <any> pQueryParams) throws RestException
RepositoryItem
.pMembers
- the list of repository items 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 URIspublic Order getOrder() throws RestException
RestException
- if there is a problem obtaining the order.