]> git.mxchange.org Git - pizzaservice-war.git/log
pizzaservice-war.git
8 years agoSome minor fixes
Roland Haeder [Sat, 15 Aug 2015 11:57:20 +0000 (13:57 +0200)]
Some minor fixes
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Sat, 15 Aug 2015 11:24:47 +0000 (13:24 +0200)]
Continued with project:
- added doAdminHandleCategoryForms() and doAdminHandleProductForms()
- isCategoryTitleUsed() and isProductTitleUsed() are now private and continue to throw all "low-level" exceptions and never a ServletException as this is thrown by publicc access methods (which servets may invoke)

Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Sat, 15 Aug 2015 10:25:32 +0000 (12:25 +0200)]
Continued with project:
- added showing product's category in admin area
- added method getPrintableProduktCategory() for this
- fixed logger XML file
- added method getCategory() of given Product instance to category database frontend
- added method isProductTitleUsed() to pre-check if the title has been used. This avoids an exception thrown in doAdminAddProduct() which expects that the product's title is not yet used.
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoUse Float, not float
Roland Haeder [Fri, 14 Aug 2015 22:50:46 +0000 (00:50 +0200)]
Use Float, not float
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agotoStoreable() is now "basicly finished"
Roland Haeder [Fri, 14 Aug 2015 22:47:29 +0000 (00:47 +0200)]
toStoreable() is now "basicly finished"
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoImplemented missing method getIdName()
Roland Haeder [Fri, 14 Aug 2015 21:25:36 +0000 (23:25 +0200)]
Implemented missing method getIdName()
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoIds must be parsed as Long, not Integer ...
Roland Haeder [Fri, 14 Aug 2015 20:27:24 +0000 (22:27 +0200)]
Ids must be parsed as Long, not Integer ...
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoMethod toStoreable() is now "basicly finished".
Roland Haeder [Fri, 14 Aug 2015 20:20:16 +0000 (22:20 +0200)]
Method toStoreable() is now "basicly finished".
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded more thrown exception (yes, again)Changed parameter type from String to Object...
Roland Haeder [Fri, 14 Aug 2015 19:51:00 +0000 (21:51 +0200)]
Added more thrown exception (yes, again)Changed parameter type from String to Object + implemented one setter
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded more thrown exceptions
Roland Haeder [Fri, 14 Aug 2015 19:45:54 +0000 (21:45 +0200)]
Added more thrown exceptions
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded more thrown exceptions
Roland Haeder [Fri, 14 Aug 2015 19:42:00 +0000 (21:42 +0200)]
Added more thrown exceptions
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAlso added here missing thrown exceptions
Roland Haeder [Fri, 14 Aug 2015 19:35:57 +0000 (21:35 +0200)]
Also added here missing thrown exceptions
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded missing thrown exceptions
Roland Haeder [Fri, 14 Aug 2015 19:23:32 +0000 (21:23 +0200)]
Added missing thrown exceptions
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 14 Aug 2015 18:36:36 +0000 (20:36 +0200)]
Continued with project:
- moved PizzaProduct to own package and created BaseProduct from it. This class and interface Product are possible candidates for jcore
- Added Apache commons jar (for new jcore changes for having a non-proprietary implementation of BASE64 encoding and decoding
- Added newly thrown exception CorruptedDatabaseFileException
- Ignored some strings for internationalization
- Id needs to be initialized with zero, not null
- Method toStoreable() has been fully rewritten to a more flexible solution
- Removed some deprecated/unused methods
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 14 Aug 2015 13:39:12 +0000 (15:39 +0200)]
Continued with project:
- added install.sql
- Renamed method getProducts() to getAvailableProducts()
- Added method getAllProducts()
- Renamed parseLineToCategory() and parseLineToProduct() to parseLine()
- All products are now comparable + compareTo() implemented in BaseProduct
- Added column "id" for product database
- Implemented getPrintableProduktAvailability() very rudely
- Ids must be parsed as Long, not Integer, as the BASE64-encoded database backend does parse it so
- Added "available" to HTML form and all relevant methods
- Added method decodedTitle() to have a UTF8-decoded title
- Constructor PizzaProduct (id, title, price) is now deprecated
- Some other cleanups
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 14 Aug 2015 12:46:08 +0000 (14:46 +0200)]
Continued with project:
- Used "category" instead of "id" for category selection box
- Added method addProduct()
- Added method isProductTitleUsed()
- Added new exception ProductTitleAlreadyUsedException
- Changed parameter type of "parent" to Integer as it can be done (better type-hint)
- Rewrote addCategory() a bit for this
- Added database columns "category", "price" and "title" for products
- Renamed method isCategoryUsed() to isCategoryTitleUsed()
- Deleted do_products.jsp
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded decodedTitle() which decodes the UTF-8 + added new exception
Roland Haeder [Fri, 14 Aug 2015 11:59:23 +0000 (13:59 +0200)]
Added decodedTitle() which decodes the UTF-8 + added new exception
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 14 Aug 2015 11:22:29 +0000 (13:22 +0200)]
Continued with project:
- Added parent_category_selection_box.jsp which holds the selection box for parent categories
- Added method generateLinkForParent()
- Fixed wrong use of COLUMN_PARENT for title
- Catched newly thrown CategoryTitleAlreadyUsedException

Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 14 Aug 2015 10:05:07 +0000 (12:05 +0200)]
Continued with project:
- Added new class BaseCategory and ProductCategory
- Implemented newly required method emptyStringToNull() in category database frontend
- Half-implemented newly required method emptyStringToNull() in product database frontend (unfinished)
- Category is now Comparable and asks for compareTo() method as well
- Added method addCategory() to database frontend
- doAdminAddCategory() should be "basicly finished" by now
- Better implement generateLinkForParent() to generate a HTML link for parent id. This links to product.jsp?category_id=x
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 14 Aug 2015 06:14:47 +0000 (08:14 +0200)]
Continued with project:
- Added method isCategoryUsed() and implemented it rudely in frontend, too.
- doAdminAddCategory() does now check request parameter if they exist and are not empty

Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Thu, 13 Aug 2015 11:42:33 +0000 (13:42 +0200)]
Continued with project:
- added doAdminAddCategory() and doAdminAddProduct()
- it is getParameter() for HttpServletRequest instances to get the actual POST/GET *parameter*
- Ignored more strings for internationalization
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Thu, 13 Aug 2015 11:21:21 +0000 (13:21 +0200)]
Continued with project:
- added placeholder class for category datbase constants
- added stub JSPs for handling category and product requests in admin area
- improved category handling a little more
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Thu, 13 Aug 2015 10:51:46 +0000 (12:51 +0200)]
Continued with project:
- added thrown exceptions
- Very rude implementation of getResultFromSet()
- getProducts() and getCategories() now only throw ServletException
- The above change allows to remove the try-catch block
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Thu, 13 Aug 2015 08:41:26 +0000 (10:41 +0200)]
Continued with project:
- Added new frontend class and interface for categories + rewritings
- Used <c:forEach> instead of for-loop where possible, else a while() loop has to be used with iterator.hasNext() and iterator.next()

Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoIntroduced markAllChoosenProductsAsOrdered() and used forEach from taglib
Roland Haeder [Thu, 13 Aug 2015 08:14:56 +0000 (10:14 +0200)]
Introduced markAllChoosenProductsAsOrdered() and used forEach from taglib
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded more thrown exceptions + implemented getProducts()
Roland Haeder [Thu, 13 Aug 2015 07:56:33 +0000 (09:56 +0200)]
Added more thrown exceptions + implemented getProducts()
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Thu, 13 Aug 2015 07:37:43 +0000 (09:37 +0200)]
Continued with project:
- Added menu item (and JSP) for categories
- Renamed JSP to get rid of plural
- Started with refactoring of application, the whole product (and now category) list would be kept in RAM which is far to much wasting
- Got rid of getUnmarkedProducts(), better use generic getProducts()
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoOne line ...
Roland Haeder [Wed, 12 Aug 2015 18:37:13 +0000 (20:37 +0200)]
One line ...
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoI have removed it from the wrong JSP, now it should be okay.
Roland Haeder [Wed, 12 Aug 2015 17:53:18 +0000 (19:53 +0200)]
I have removed it from the wrong JSP, now it should be okay.
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoNow okay ...
Roland Haeder [Wed, 12 Aug 2015 16:06:24 +0000 (18:06 +0200)]
Now okay ...
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded inital form handler for admin action "do_products"
Roland Haeder [Wed, 12 Aug 2015 15:37:17 +0000 (17:37 +0200)]
Added inital form handler for admin action "do_products"
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded NetBeans project files + debug message
Roland Haeder [Wed, 12 Aug 2015 15:33:57 +0000 (17:33 +0200)]
Added NetBeans project files + debug message
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded new page 'products' for admin area + added CSS classes table_left/right
Roland Haeder [Wed, 12 Aug 2015 13:57:34 +0000 (15:57 +0200)]
Added new page 'products' for admin area + added CSS classes table_left/right
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded initial admin index.jsp (unprotected)
Roland Haeder [Wed, 12 Aug 2015 13:25:45 +0000 (15:25 +0200)]
Added initial admin index.jsp (unprotected)
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoTemporary added call of initBundle()
Roland Haeder [Wed, 12 Aug 2015 13:19:28 +0000 (15:19 +0200)]
Temporary added call of initBundle()
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Wed, 12 Aug 2015 12:35:40 +0000 (14:35 +0200)]
Continued with project:
- Method getProducts() throws now more exceptions (from low-level classes)
- These need to be thrown until they reach the application server's exception handler
- Temporary commented out error pages
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoNo need for app instance here
Roland Haeder [Wed, 12 Aug 2015 11:51:41 +0000 (13:51 +0200)]
No need for app instance here
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoBetter don't do it here ...
Roland Haeder [Wed, 12 Aug 2015 11:49:30 +0000 (13:49 +0200)]
Better don't do it here ...
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Wed, 12 Aug 2015 11:48:30 +0000 (13:48 +0200)]
Continued with project:
- Added database.backend.storagepath for file-based database backends (very simple)
- Used getRealPath() to get server's full web path, but went 2 up to get away from web-reachable path
- Added catching of more thrown exceptions
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoGot more rid of abortProgramWithException() as this will end the application server
Roland Haeder [Wed, 12 Aug 2015 10:36:04 +0000 (12:36 +0200)]
Got more rid of abortProgramWithException() as this will end the application server
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Wed, 12 Aug 2015 10:28:35 +0000 (12:28 +0200)]
Continued with project:
- Moved some classes to proper location
- Removed no longer glassfish-specific character encoding, because ..
- Added filter for setting character encoding to UTF-8
- Added "data" directory + ignored all files in it
- Rewrote initialization of properties so the context parameter from web.xml can be used to set needed properties for jcore database backend. Still this is not so satifying, maybe the method needs to be moved to jcore?
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded product database frontend class and interface
Roland Haeder [Tue, 11 Aug 2015 12:26:30 +0000 (14:26 +0200)]
Added product database frontend class and interface
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoIgnore config.properties as it might have been altered
Roland Haeder [Tue, 11 Aug 2015 12:10:21 +0000 (14:10 +0200)]
Ignore config.properties as it might have been altered
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Tue, 11 Aug 2015 12:06:41 +0000 (14:06 +0200)]
Continued with project:
- Moved call of markProductAsOrdered() to do_order.jsp
- Logged more data in some debug/trace messages
- If choose[product] is set in session, it can only be unset now, this saves some calls
- Added some trace messages
- Removed synchronized() check
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agohandleChooseFromRequestSession() can be made private
Roland Haeder [Tue, 11 Aug 2015 11:27:42 +0000 (13:27 +0200)]
handleChooseFromRequestSession() can be made private

Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued:
Roland Haeder [Tue, 11 Aug 2015 11:09:47 +0000 (13:09 +0200)]
Continued:
- Moved login/register to own path /customer/
- Added "static" include "login_form.jsp" and "gender_selection_box.jsp"
- Added form handler "do_preview.jsp" and moved code from preview.jsp to it
- style.css should be referenced with full path so all pages can have same HTML code
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoRenamed JSP + added 2 stubs (login, register)
Roland Haeder [Tue, 11 Aug 2015 09:58:47 +0000 (11:58 +0200)]
Renamed JSP + added 2 stubs (login, register)
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agotoArray(T[]) must be used
Roland Haeder [Tue, 11 Aug 2015 09:26:06 +0000 (11:26 +0200)]
toArray(T[]) must be used
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoNow that instance product has no method to mark it as choosen (bad idea as all users...
Roland Haeder [Tue, 11 Aug 2015 09:22:13 +0000 (11:22 +0200)]
Now that instance product has no method to mark it as choosen (bad idea as all users will have it choosen then) there needs to be added a new method for this
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoGot rid of product iterator stuff and used a smaller for() loop
Roland Haeder [Tue, 11 Aug 2015 09:07:59 +0000 (11:07 +0200)]
Got rid of product iterator stuff and used a smaller for() loop
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoIntroduced new "getter" + moved div tag to menu.jsp
Roland Haeder [Tue, 11 Aug 2015 09:01:21 +0000 (11:01 +0200)]
Introduced new "getter" + moved div tag to menu.jsp
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Mon, 10 Aug 2015 13:16:45 +0000 (15:16 +0200)]
Continued with project:
- I had a misunderstanding how beans work, so now it is fixed
- Always try to write against interfaces and also check against them (instanceof)
- Gender can also be taken directly from customer bean
- Use customer bean instead of ugly getPrintableValeFromSession() calls
- some other improvements
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoFixed form field name which must be equal to class' attribute's name and public getter
Roland Haeder [Mon, 10 Aug 2015 09:50:12 +0000 (11:50 +0200)]
Fixed form field name which must be equal to class' attribute's name and public getter
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoIntroduced setValueInSession() + order.jsp form handler (broken, why?)
Roland Haeder [Fri, 7 Aug 2015 13:49:41 +0000 (15:49 +0200)]
Introduced setValueInSession() + order.jsp form handler (broken, why?)
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 7 Aug 2015 12:54:53 +0000 (14:54 +0200)]
Continued with project:
- rewrote iteration over Contact fields  with an iterator from Map.Entry
- added default values in orderjsp (to output session-stored values)
- introduced getPrintableValueFromSession() which returns a value from session key or an empty string for null
- introduced getValueFromSession() which is a low-level method to get a value from session key (but sychronized)
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoSome fixes
Roland Haeder [Fri, 7 Aug 2015 11:28:08 +0000 (13:28 +0200)]
Some fixes
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoContinued with project:
Roland Haeder [Fri, 7 Aug 2015 09:56:20 +0000 (11:56 +0200)]
Continued with project:

- Included displaying of gender and translation (yes, there is a better way doing internalizations than this one)
- Introduced BasePizzaServiceSystem which is a general class for (almost) all other classes
- Moved some classes to proper location

Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded more fields the user may want to fill out + used some beans
Roland Haeder [Thu, 6 Aug 2015 13:15:54 +0000 (15:15 +0200)]
Added more fields the user may want to fill out + used some beans
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoMoved some classes + other stuff
Roland Haeder [Thu, 6 Aug 2015 12:17:27 +0000 (14:17 +0200)]
Moved some classes + other stuff
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoIntroduced protected setter. Setters can change attributes in an object, which is...
Roland Haeder [Thu, 6 Aug 2015 10:53:11 +0000 (12:53 +0200)]
Introduced protected setter. Setters can change attributes in an object, which is not always wanted, right? :-)
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoIntroduced static/menu.jsp
Roland Haeder [Thu, 6 Aug 2015 10:44:37 +0000 (12:44 +0200)]
Introduced static/menu.jsp
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoAdded <%=request.getContextPath()%>
Roland Haeder [Thu, 6 Aug 2015 10:02:31 +0000 (12:02 +0200)]
Added <%=request.getContextPath()%>
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoRenamed service stuff to application, as it is really an application
Roland Haeder [Thu, 6 Aug 2015 09:48:34 +0000 (11:48 +0200)]
Renamed service stuff to application, as it is really an application
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoUse MessageFormat.format() or String.format() and not + which causes a lot String...
Roland Haeder [Thu, 6 Aug 2015 07:18:50 +0000 (09:18 +0200)]
Use MessageFormat.format() or String.format() and not + which causes a lot String objects being created in pool
Signed-off-by:Roland Häder <roland@mxchange.org>

8 years agoInitial commit
Roland Haeder [Thu, 6 Aug 2015 07:13:39 +0000 (09:13 +0200)]
Initial commit
Signed-off-by:Roland Häder <roland@mxchange.org>