|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.nucleus.servlet.ServletService
atg.nucleus.servlet.HttpServletService
atg.servlet.DynamoServlet
atg.commerce.promotion.CouponDroplet
public class CouponDroplet
This droplet is used to create coupon objects in the claimable repository. A promotion is handed to the droplet via either a promotion id or promotion object parameter. The droplet then creates a coupon entry in the claimable repository, linking it to the promotion object that was handed in and then finally sets a coupon id on output. Either the promotion or promoId parmeter must be set.
Here are a list of the parmeters:
ClaimableManager,
PromotionTools| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
|
protected static java.lang.String |
COUPON
|
protected static ParameterName |
ERROR
|
protected static ParameterName |
OUTPUT
|
protected static ParameterName |
PROMOID
|
protected static ParameterName |
PROMOTION
|
| Fields inherited from class atg.servlet.DynamoServlet |
|---|
mAllowCleanupRequest, mParameters |
| Fields inherited from class atg.nucleus.servlet.ServletService |
|---|
SERVLET_INFO_KEY |
| Fields inherited from class atg.nucleus.GenericService |
|---|
SERVICE_INFO_KEY |
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
|---|
DEFAULT_LOG_TRACE_STATUS |
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
|---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
| Constructor Summary | |
|---|---|
CouponDroplet()
Empty Constructor |
|
| Method Summary | |
|---|---|
protected RepositoryItem |
createCoupon(RepositoryItem pPromotion)
Used to create the coupon. |
ClaimableManager |
getClaimableManager()
Return the ClaimableManager property. |
protected RepositoryItem |
getPromotion(java.lang.String pPromoId)
Obtains a promotion for a given promoId by using PromotionTools. |
PromotionTools |
getPromotionTools()
Return the PromotionTools property. |
protected java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest)
Get a users locale by trying to get it from the request object. |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
The service method first obtains the promotion object. |
void |
setClaimableManager(ClaimableManager pClaimableManager)
Set the ClaimableManager property. |
void |
setPromotionTools(PromotionTools pPromotionTools)
Set the PromotionTools property. |
| Methods inherited from class atg.servlet.DynamoServlet |
|---|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter |
| Methods inherited from class atg.nucleus.servlet.ServletService |
|---|
destroy, getServletConfig, getServletInfo, init, setServletInfo |
| Methods inherited from class atg.nucleus.TimedOperationService |
|---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
|---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String CLASS_VERSION
protected static final java.lang.String COUPON
protected static final ParameterName PROMOTION
protected static final ParameterName PROMOID
protected static final ParameterName OUTPUT
protected static final ParameterName ERROR
| Constructor Detail |
|---|
public CouponDroplet()
| Method Detail |
|---|
public void setClaimableManager(ClaimableManager pClaimableManager)
public ClaimableManager getClaimableManager()
public void setPromotionTools(PromotionTools pPromotionTools)
public PromotionTools getPromotionTools()
public void service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
If we have a promotion, then use the createCoupon method to create a coupon using the promotion that was obtained. Finally, set the coupon in the output and render the output oparam.
service in class DynamoServletpRequest - request objectpResponse - response object
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
protected RepositoryItem createCoupon(RepositoryItem pPromotion)
throws CommerceException
pPromotion - the promotion object
CommerceException - if an error occursprotected RepositoryItem getPromotion(java.lang.String pPromoId)
pPromoId - the id of a promotion
protected java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest)
throws javax.servlet.ServletException,
java.io.IOException
pRequest - a value of type 'DynamoHttpServletRequest'
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||