|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet org.melati.servlet.ConfigServlet org.melati.servlet.PoemServlet org.melati.servlet.TemplateServlet org.paneris.jammyjoes.shopping.Trolley
public class Trolley
The Melati Shopping Trolley Interface is designed to provide a flexible adstraction of the basic processes of allowing customers to buy goods on a website. By default, it is not integrated with POEM, and so makes no assumptions about the underlying database implementaion. Please read the readme.txt file for full instructions. The Trolley is a servlet that handles the user's interaction with the Shopping Trolley.
org.paneris.melati.shopping.ShoppingTrolley
,
org.paneris.melati.shopping.ShoppingTrolleyItem
,
org.paneris.melati.shopping.DefaultShoppingTrolley
,
org.paneris.melati.shopping.DefaultShoppingTrolleyItem
,
Serialized FormField Summary | |
---|---|
MelatiShoppingConfig |
config
|
Fields inherited from class org.melati.servlet.TemplateServlet |
---|
templateEngine |
Fields inherited from class org.melati.servlet.ConfigServlet |
---|
melatiConfig, sysAdminEmail, sysAdminName |
Constructor Summary | |
---|---|
Trolley()
|
Method Summary | |
---|---|
protected java.lang.String |
Abandon(org.melati.Melati melati)
abandon a trolley |
protected java.lang.String |
Add(org.melati.Melati melati,
java.lang.Integer id,
java.lang.Integer quantity)
add a single item to the trolley, or add to the quantity already in the trolley. |
protected void |
assertLogin(org.melati.Melati melati)
force a user to login |
protected java.lang.String |
CatalogueEntry(org.melati.Melati melati)
view the trolley |
protected java.lang.String |
Confirm(org.melati.Melati melati)
update the user's information and return the confirmation page |
protected java.lang.String |
Details(org.melati.Melati melati)
return the page where the user enters their details |
protected java.lang.String |
doTemplateRequest(org.melati.Melati melati,
org.melati.template.ServletTemplateContext context)
Main entry point for this servlet |
java.lang.String |
getSysAdminEmail()
|
java.lang.String |
getSysAdminName()
|
void |
init(javax.servlet.ServletConfig conf)
Inititialise the Shopping Trolley Engine. |
protected java.lang.String |
Load(org.melati.Melati melati,
java.lang.Integer id)
load the trolley from something persistent |
protected java.lang.String |
MultipleAdd(org.melati.Melati melati)
add multiple items to the trolley, or add to the quantities already in the trolley. |
protected java.lang.String |
Paid(org.melati.Melati melati)
complete the user's shopping experience, and remove their Shopping Trolley from the Session If you need to do something (like send an email) following confirmation of payment, define the method in |
protected org.melati.PoemContext |
poemContext(org.melati.Melati melati)
override the building of the MelatiContext in order to glean the additional information required for the Shopping Trolley system |
protected java.lang.String |
Remove(org.melati.Melati melati,
java.lang.Integer id)
remove a single item from the trolley, the product is specified on the pathinfo which should be of the form: / |
protected java.lang.String |
Save(org.melati.Melati melati)
load the trolley from something persistent |
protected java.lang.String |
Set(org.melati.Melati melati,
java.lang.Integer id,
java.lang.Integer quantity)
set the quantity of an item in the trolley, the product and new quantity is specified on the pathinfo which should be of the form: / |
protected java.lang.String |
Update(org.melati.Melati melati)
update the entire trolley, changing quantities and removing items. |
protected java.lang.String |
View(org.melati.Melati melati)
view the trolley |
Methods inherited from class org.melati.servlet.TemplateServlet |
---|
addExtension, doPoemRequest, error, prePoemSession |
Methods inherited from class org.melati.servlet.PoemServlet |
---|
_handleException, dbBusyMessage, destroy, doConfiguredRequest, handleException, poemContextWithLDB |
Methods inherited from class org.melati.servlet.ConfigServlet |
---|
doGet, doPost, melatiConfig, setSysAdminEmail, setSysAdminName, writeConnectionPendingException, writeError |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public MelatiShoppingConfig config
Constructor Detail |
---|
public Trolley()
Method Detail |
---|
public void init(javax.servlet.ServletConfig conf) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class org.melati.servlet.TemplateServlet
conf
- - the Servlet's config parameters
javax.servlet.ServletException
org.paneris.melati.shopping.MelatiShoppingConfig
public java.lang.String getSysAdminName()
getSysAdminName
in class org.melati.servlet.PoemServlet
public java.lang.String getSysAdminEmail()
getSysAdminEmail
in class org.melati.servlet.PoemServlet
protected java.lang.String doTemplateRequest(org.melati.Melati melati, org.melati.template.ServletTemplateContext context) throws java.lang.Exception
doTemplateRequest
in class org.melati.servlet.TemplateServlet
melati
- - the melati for this requestcontext
- - the Template Context for this request
org.melati.servlet.InvalidUsageException
- - if this request has an invalid form
java.lang.Exception
protected java.lang.String Load(org.melati.Melati melati, java.lang.Integer id) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this requestid
- - an id that can be used to identify the trolley to be loaded
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Save(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String CatalogueEntry(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct the trolleyprotected java.lang.String View(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct the trolleyprotected java.lang.String Update(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct the trolleyprotected java.lang.String MultipleAdd(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Add(org.melati.Melati melati, java.lang.Integer id, java.lang.Integer quantity) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this requestid
- - the id of the item to be added
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Remove(org.melati.Melati melati, java.lang.Integer id) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Set(org.melati.Melati melati, java.lang.Integer id, java.lang.Integer quantity) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this requestid
- - the id of the item to be removed
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Details(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Confirm(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Paid(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected java.lang.String Abandon(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
- - if we cannot construct trolleyprotected void assertLogin(org.melati.Melati melati) throws org.melati.util.InstantiationPropertyException
melati
- - the melati for this request
org.melati.util.InstantiationPropertyException
protected org.melati.PoemContext poemContext(org.melati.Melati melati) throws org.melati.servlet.PathInfoException
poemContext
in class org.melati.servlet.PoemServlet
melati
- - the melati for this request
org.melati.servlet.PathInfoException
- - if we don't understand the PathInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |