]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
moved interface WrapableReceipt to jshop-ee-lib + called EJB (no functionality yet)
authorRoland Haeder <roland@mxchange.org>
Fri, 18 Sep 2015 13:20:35 +0000 (15:20 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 18 Sep 2015 13:22:36 +0000 (15:22 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jshop-ee-lib.jar
src/java/org/mxchange/pizzaapplication/servlet/receipt/PdfReceiptServlet.java

index 0cb88359105bffadc690370cd27fa03168df7bd9..0301ab7d83c831b0e4ead827bd127b1f4a059983 100644 (file)
Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ
index 252672b636fa5ebf0c211bb838cf3d582d06b7ac..944bfd0c4f21f492d9b330cd6fd57dae1cb3943a 100644 (file)
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.mxchange.jshopcore.model.receipt.ReceiptBeanRemote;
+import org.mxchange.jshopcore.model.receipt.WrapableReceipt;
 
 /**
  * A servlet for a PDF receipt (official)
@@ -42,7 +43,7 @@ public class PdfReceiptServlet extends HttpServlet {
        /**
         * Remote bean
         */
-       private final ReceiptBeanRemote receipt;
+       private final ReceiptBeanRemote receiptBean;
 
        /**
         * Public constructor
@@ -54,7 +55,7 @@ public class PdfReceiptServlet extends HttpServlet {
                        Context context = new InitialContext();
 
                        // Set instance
-                       this.receipt = (ReceiptBeanRemote) context.lookup("ejb/pdf-receipt");
+                       this.receiptBean = (ReceiptBeanRemote) context.lookup("ejb/pdf-receipt"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
@@ -64,13 +65,16 @@ public class PdfReceiptServlet extends HttpServlet {
        @Override
        protected void doGet (final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
                // Is the key set?
-               if (request.getParameter("key") == null) {
+               if (request.getParameter("key") == null) { //NOI18N
                        // No more processing here
                        super.doGet(request, response);
                        return;
                }
 
                // Get PDF from bean
+               WrapableReceipt receipt = this.receiptBean.createReceiptFromAccessKey(request.getParameter("key")); //NOI18N
+
+               // TODO Write it's content to response output
        }
 
        @Override