|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.nucleus.servlet.ServletService atg.nucleus.servlet.HttpServletService atg.servlet.DynamoServlet atg.commerce.gifts.GiftitemDroplet
public class GiftitemDroplet
This servlet looks up an item in a giftlist. If the item if found, it is either removed or moved to the current shopping cart (order) based on the configuration.
This servlet is configurable using the properties file. For example: RemoveItemFromGiftlist.properties
$class=atg.commerce.gifts.GiftitemDroplet $scope=request giftlistManager=GiftlistManager giftlistRepository=Giftlists shoppingCart=/atg/commerce/ShoppingCart action=remove profile=/atg/userprofiling/ProfileThe invocation of the droplet can then be invoked with the following parameters:
<DROPLET bean="/atg/commerce/gifts/RemoveItemFromGiftlist"> <PARAM NAME="giftlistId" VALUE="param:giftlistId"> <PARAM NAME="giftId" VALUE="param:giftId"> <OPARAM NAME="output"> Output </OPARAM> <OPARAM NAME="error"> Error </OPARAM> </DROPLET>
If the item is found in the giftlist then it is removed (or moved) from
the giftlist by calling the correct method in GiftlistManager
.
If the item is not found or the person does not have the correct access
to the giftlist, an error message is displayed.
The required input parameters for this servlet are:
The output parameters for this servlet are:
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
ERRORMESSAGE
The output parameter that includes the error message. |
protected static java.lang.String |
MSG_EXCEPTION
|
protected static java.lang.String |
MSG_NO_GIFTLIST
|
protected static java.lang.String |
MSG_NOT_GIFTLIST_OWNER
|
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 | |
---|---|
GiftitemDroplet()
|
Method Summary | |
---|---|
java.lang.String |
getAction()
Returns property action. |
java.lang.String |
getGiftActionBuyProperty()
Returns property giftActionBuyProperty. |
java.lang.String |
getGiftActionRemoveProperty()
Returns property giftActionRemoveProperty. |
GiftlistManager |
getGiftlistManager()
Returns property giftlistManager. |
Repository |
getGiftlistRepository()
Returns property giftlistRepository. |
Order |
getOrder()
Returns property Order, if the shoppingCart property is not null, then return the current order of the shopping cart order holder |
RepositoryItem |
getProfile()
Returns property Profile |
ShippingGroup |
getShippingGroup()
Returns property ShippingGroup. |
OrderHolder |
getShoppingCart()
Returns property ShoppingCart |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Looks for a giftitem in a giftlist and if found, either removes it from the giftlist or moves it to the current default shopping cart. |
void |
setAction(java.lang.String pAction)
Sets property action. |
void |
setGiftActionBuyProperty(java.lang.String pGiftActionBuyProperty)
Sets property giftActionBuyProperty |
void |
setGiftActionRemoveProperty(java.lang.String pGiftActionRemoveProperty)
Sets property giftActionRemoveProperty. |
void |
setGiftlistManager(GiftlistManager pGiftlistManager)
Sets property giftlistManager. |
void |
setGiftlistRepository(Repository pGiftlistRepository)
Sets property giftlistRepository. |
void |
setProfile(RepositoryItem pProfile)
Sets property profile. |
void |
setShippingGroup(ShippingGroup pShippingGroup)
Sets property ShippingGroup. |
void |
setShoppingCart(OrderHolder pShoppingCart)
Sets property ShoppingCart |
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
public static final java.lang.String ERRORMESSAGE
protected static final java.lang.String MSG_NO_GIFTLIST
protected static final java.lang.String MSG_NOT_GIFTLIST_OWNER
protected static final java.lang.String MSG_EXCEPTION
Constructor Detail |
---|
public GiftitemDroplet()
Method Detail |
---|
public void setProfile(RepositoryItem pProfile)
pProfile
- the profile of the current customer.public RepositoryItem getProfile()
public void setGiftlistManager(GiftlistManager pGiftlistManager)
pGiftlistManager
- the giftlistManager class to perform high level operations on giftlists and giftitems.public GiftlistManager getGiftlistManager()
GiftlistManager
.
public void setGiftlistRepository(Repository pGiftlistRepository)
pGiftlistRepository
- the giftlist repository where giftlists are stored.public Repository getGiftlistRepository()
GiftlistRepository
.
public void setAction(java.lang.String pAction)
pAction
- the property to store the action for this droplet to perform on the itempublic java.lang.String getAction()
public void setGiftActionRemoveProperty(java.lang.String pGiftActionRemoveProperty)
pGiftActionRemoveProperty
- the property to store the value for the remove action.public java.lang.String getGiftActionRemoveProperty()
remove
.
public void setGiftActionBuyProperty(java.lang.String pGiftActionBuyProperty)
pGiftActionBuyProperty
- the property to store the value for the buy action.public java.lang.String getGiftActionBuyProperty()
buy
.
public void setShoppingCart(OrderHolder pShoppingCart)
pShoppingCart
- the property to store the current shopping cart.public OrderHolder getShoppingCart()
public Order getOrder()
public void setShippingGroup(ShippingGroup pShippingGroup)
pShippingGroup
- the property to store the default shipping group for the current customerpublic ShippingGroup getShippingGroup()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class DynamoServlet
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrong
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |