From: Roland Haeder Date: Wed, 2 Sep 2015 17:14:23 +0000 (+0200) Subject: Removed even more deprecated/unused methods X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=814e730a89739420773703a09d025f792ffc4f86;p=pizzaservice-war.git Removed even more deprecated/unused methods Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java index eba91b9f..d281e97c 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java @@ -88,15 +88,6 @@ public interface PizzaApplication extends Application { */ public void init (final ServletContext context) throws UnsupportedDatabaseBackendException, SQLException, IOException, BadTokenException; - /** - * Somewhat setter in session - * - * @param session Session instance - * @param key Session key to set - * @param value Value to set - */ - public void setValueInSession (final HttpSession session, final String key, final Object value); - /** * Some "getter" for a an array of only available products * @@ -157,15 +148,6 @@ public interface PizzaApplication extends Application { */ public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; - /** - * Generates link HTML code for given category's parent id, if set. This - * link then points to products.jsp?category_id=x - * - * @param category Category instance - * @return HTML code - */ - public String generateLinkForParent (final Category category); - /** * Handles admin product form requests * diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java index 920ada75..cc1e3632 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java @@ -222,77 +222,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } } - @Deprecated - private boolean isProductChoosen (final Product product, final ServletRequest request, final HttpSession session) { - throw new UnsupportedOperationException("This method is deprecated and shall not be called"); //NOI18N - } - - @Override - public void setValueInSession (final HttpSession session, final String key, final Object value) { - // Trace message - this.getLogger().trace(MessageFormat.format("session={0},key={1},value={2} - CALLED!", session, key, value)); //NOI18N - - synchronized(session) { - // Set it synced - session.setAttribute(key, value); - } - - // Trace message - this.getLogger().trace("EXIT!"); //NOI18N - } - - /** - * Some getter for value from session - * - * @param product Product instance - * @param session Session instance - * @param attribute Attribute to get value from - * @return Value from session - * @deprecated Old lost code - */ - @Deprecated - private Object getValueFromSession (final Product product, final HttpSession session, final String attribute) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},session={1},attribute={2} - CALLED!", product, session, attribute)); //NOI18N - - // Init variable - Object value = this.getValueFromSession(session, String.format(HTTP_PARAM_MASK, attribute, product.getItemId())); - - this.getLogger().debug(MessageFormat.format("product={0},attribute={1},value={2}", product.getItemId(), attribute, value)); //NOI18N - - // Trace message - this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N - - // Return it - return value; - } - - /** - * Some getter for value from session - * - * @param session Session instance - * @param key Key to get value from - * @return Value from session - */ - private Object getValueFromSession (final HttpSession session, final String key) { - // Trace message - this.getLogger().trace(MessageFormat.format("session={0},key={1} - CALLED!", session, key)); //NOI18N - - // Init value - Object value; - - // Get it synchronized from session - synchronized (session) { - value = session.getAttribute(key); - } - - // Trace message - this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N - - // Return it - return value; - } - /** * Initializes database frontends. */ @@ -492,30 +421,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P this.getLogger().trace("EXIT!"); //NOI18N } - @Override - public String generateLinkForParent (final Category category) { - // Trace message - this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N - - // category must not be null - if (null == category) { - // Is null - throw new NullPointerException("category is null"); //NOI18N - } - - // Get parent id - Long parentId = category.getParentId(); - - // Is the id set? - if (parentId > 0) { - // Product HTML code for link - throw new UnsupportedOperationException(MessageFormat.format("parentId={0} - Unfinished!", parentId)); //NOI18N - } - - // No parent set - return "Keine"; - } - @Override public String getPrintableProduktCategory (final Product product) throws ServletException { // Trace message diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java index c15dcfe7..70a7c7ae 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java @@ -41,15 +41,6 @@ public interface PizzaBean extends FrameworkBean { */ public void init () throws FacesException; - /** - * Somewhat setter in session - * - * @param session Session instance - * @param key Session key to set - * @param value Value to set - */ - public void setValueInSession (final HttpSession session, final String key, final Object value); - /** * Some "getter" for an iterator of only available products * @@ -134,15 +125,6 @@ public interface PizzaBean extends FrameworkBean { */ public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; - /** - * Generates link HTML code for given category's parent id, if set. This - * link then points to products.jsp?category_id=x - * - * @param category Category instance - * @return HTML code - */ - public String generateLinkForParent (final Category category); - /** * Handles admin product form requests * diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java index 681aad76..85347b39 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java @@ -129,11 +129,6 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { return this.app.getAllCategories(); } - @Override - public void setValueInSession (final HttpSession session, final String key, final Object value) { - this.app.setValueInSession(session, key, value); - } - @Override public void doAdminAddCategory (final ServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException { this.app.doAdminAddCategory(request); @@ -144,11 +139,6 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { this.app.doAdminAddProduct(request); } - @Override - public String generateLinkForParent (final Category category) { - return this.app.generateLinkForParent(category); - } - @Override public String getPrintableProduktCategory (final Product product) throws ServletException { return this.app.getPrintableProduktCategory(product);