|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.fenalco.servlets.shopkeeper.SuperOfferPurchaser
public class SuperOfferPurchaser
Este servlet es el encargado de generar la compra de una superoferta. Para tal efecto
recibe los parámetros quantity , store, id de versuperoferta que son la cantidad,
establecimiento destino e id de la superoferta respectivamente.
| Constructor Summary | |
|---|---|
SuperOfferPurchaser()
|
|
| Method Summary | |
|---|---|
boolean |
buildOrder(int superOfferId,
int storeId,
int communityId,
int quantity)
Esete método construye una orden de compra con la superoferta seleccionada y la cantidad de compra definida, para tal efecto debe crear una instancia de la clase SuperOffer con el parámetro superOfferId y luego invocar la función
submit de la superoferta con los parámetros storeId y quantity
tomados del request |
void |
destroy()
Destructor de el servlet. |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Procesa el método HTTP GET. |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Procesa el método POST method. |
java.lang.String |
getServletInfo()
Retorna una breve descripción de el servlet. |
void |
init(javax.servlet.ServletConfig config)
Inicializa el servlet. |
protected void |
processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Procesa solicitudes para los metodos HTTP GET y POST. |
| 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, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SuperOfferPurchaser()
| Method Detail |
|---|
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletconfig -
javax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServlet
protected void processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
GET y POST.
Este método toma los parámetros storeId, quantity e id del request
e invoca a la función miembro buildOrder para generar una orden de compra con la
superoferta seleccionada. Como el resultado se muestra en una ventana popup al
final del proceso se debe mostrar un mensaje resultado.
request - servlet requestresponse - servlet response
javax.servlet.ServletException
java.io.IOException
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
GET.
doGet in class javax.servlet.http.HttpServletrequest - servlet requestresponse - servlet response
javax.servlet.ServletException
java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
POST method.
doPost in class javax.servlet.http.HttpServletrequest - servlet requestresponse - servlet response
javax.servlet.ServletException
java.io.IOExceptionpublic java.lang.String getServletInfo()
getServletInfo in interface javax.servlet.ServletgetServletInfo in class javax.servlet.GenericServlet
public boolean buildOrder(int superOfferId,
int storeId,
int communityId,
int quantity)
SuperOffer con el parámetro superOfferId y luego invocar la función
submit de la superoferta con los parámetros storeId y quantity
tomados del request
superOfferId - id de la superoferta seleccionadastoreId - id del establecimiento destino de la compraquantity - cantidad
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||