@Deprecated
static final String HTTP_PARAM_MASK = "%s[%s]"; //NOI18N
- /**
- * Some "getter" for amount from session
- *
- * @param product Product instance
- * @param session Session instance
- * @return Amount as string
- * @deprecated Old code
- */
- @Deprecated
- public String getAmountFromSession (final Product product, final HttpSession session);
-
- /**
- * Some "getter" for choose from session
- *
- * @param product Product instance
- * @param session Session instance
- * @return Choose as string
- * @deprecated Old code
- */
- @Deprecated
- public String getChooseFromSession (final Product product, final HttpSession session);
-
- /**
- * Some "getter" for total price of position from request or session.
- * Single price and amount is multiplyed.
- *
- * @param product Product instance
- * @param request Request instance
- * @param session Session instance
- * @return Amount as string
- * @deprecated Old code
- */
- @Deprecated
- public float getTotalPositionPriceFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session);
-
/**
* Initializes this instance with given ServletContext
*
*/
public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException;
- /**
- * Some getter for printable value from session or an empty string for null.
- *
- * @param session Session instance
- * @param key Key to get
- * @return Value from key, empty string for null
- */
- public Object getPrintableValeFromSession (final HttpSession session, final String key);
-
/**
* Somewhat setter in session
*
* @param product Product instance
* @param session Session instance
* @return Amount as string
+ * @deprecated Old lost code
*/
- @Override
@Deprecated
- public String getAmountFromSession (final Product product, final HttpSession session) {
+ private String getAmountFromSession (final Product product, final HttpSession session) {
// Trace message
this.getLogger().trace(MessageFormat.format("product={0},session={1} - CALLED!", product, session)); //NOI18N
}
}
- /**
- * Some "getter" for choose from session
- *
- * @param product Product instance
- * @param session Session instance
- * @return Choose as string
- */
- @Override
- @Deprecated
- public String getChooseFromSession (final Product product, final HttpSession session) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("product={0},session={1} - CALLED!", product, session)); //NOI18N
-
- // Is product and session set?
- if (null == product) {
- // Not set
- throw new NullPointerException("product is null"); //NOI18N
- } else if (null == session) {
- // Not set
- throw new NullPointerException("session is null"); //NOI18N
- }
-
- // Get attribute
- Object object = this.getValueFromSession(product, session, HTTP_PARAM_ITEM_ID);
-
- // Is the object null?
- if (null == object) {
- // Not found
- this.getLogger().debug(MessageFormat.format("Returning empty string for product={0} ...", product.getItemId())); //NOI18N
- return ""; //NOI18N
- }
-
- // Trace message
- this.getLogger().trace(MessageFormat.format("object={0} - CALLED!", object)); //NOI18N
-
- // Cast to string and return it
- return (String) object;
- }
-
/**
* Some "getter" for HTML code 'disabled="disabled"' for e.g. submit buttons
*
}
}
- /**
- * Some getter for printable value from session or an empty string for null.
- *
- * @param session Session instance
- * @param key Key to get
- * @return Value from key, empty string for null
- */
- @Override
- public Object getPrintableValeFromSession (final HttpSession session, final String key) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("session={0},key={1} - CALLED", session, key)); //NOI18N
-
- // Are both parameter not null?
- if (null == session) {
- // Abort here
- throw new NullPointerException("session is null"); //NOI18N
- } else if (null == key) {
- // Abort here
- throw new NullPointerException("key is null"); //NOI18N
- }
-
- // Now get it
- Object value = this.getValueFromSession(session, key);
-
- // Debug message
- this.getLogger().debug(MessageFormat.format("value={0}", value)); //NOI18N
-
- // Trace message
- this.getLogger().trace(MessageFormat.format("Calling this.convertNullToEmpty({0}) ... - EXIT!", value)); //NOI18N
-
- // Return actual value
- return this.convertNullToEmpty(value);
- }
-
/**
* Some "getter" for a an array of only available products
*
}
}
- /**
- * Some "getter" for total price of position from request or session.
- * Single price and amount is multiplyed.
- *
- * @param product Product instance
- * @param request Request instance
- * @param session Session instance
- * @return Amount as string
- */
- @Override
- @Deprecated
- public float getTotalPositionPriceFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) {
- throw new UnsupportedOperationException("This method is deprecated and shall not be called.");
- }
-
/**
* Checks whether the given product is choosen, request overules session.
*
* @author Roland Haeder
*/
public interface PizzaBean extends FrameworkBean {
- /**
- * Some "getter" for amount from session
- *
- * @param product Product instance
- * @param session Session instance
- * @return Amount as string
- * @deprecated Old code
- */
- @Deprecated
- public String getAmountFromSession (final Product product, final HttpSession session);
-
- /**
- * Some "getter" for choose from session
- *
- * @param product Product instance
- * @param session Session instance
- * @return Choose as string
- * @deprecated Old code
- */
- @Deprecated
- public String getChooseFromSession (final Product product, final HttpSession session);
-
- /**
- * Some "getter" for total price of position from request or session.
- * Single price and amount is multiplyed.
- *
- * @param product Product instance
- * @param request Request instance
- * @param session Session instance
- * @return Amount as string
- */
- public float getTotalPositionPriceFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session);
-
/**
* Initializes this instance
*
*/
public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException;
- /**
- * Some getter for printable value from session or an empty string for null.
- *
- * @param session Session instance
- * @param key Key to get
- * @return Value from key, empty string for null
- */
- public Object getPrintableValeFromSession (final HttpSession session, final String key);
-
/**
* Somewhat setter in session
*
}
}
- /**
- * Some "getter" for amount from session
- *
- * @param product Product instance
- * @param session Session instance
- * @return Amount as string
- */
- @Override
- @Deprecated
- public String getAmountFromSession (final Product product, final HttpSession session) {
- return this.app.getAmountFromSession(product, session);
- }
-
/**
* Some "getter" for HTML code 'checked="checked"' if the product is choosen
*
return this.app.getCheckedHtmlFromProduct(product, request, session);
}
- /**
- * Some "getter" for choose from session
- *
- * @param product Product instance
- * @param session Session instance
- * @return Choose as string
- */
- @Override
- @Deprecated
- public String getChooseFromSession (final Product product, final HttpSession session) {
- return this.app.getChooseFromSession(product, session);
- }
-
/**
* Some "getter" for HTML code 'disabled="disabled"' for e.g. submit buttons
*
return this.app.getPrintableProduktAvailability(product);
}
- /**
- * Some getter for printable value from session or an empty string for null.
- *
- * @param session Session instance
- * @param key Key to get
- * @return Value from key, empty string for null
- */
- @Override
- public Object getPrintableValeFromSession (final HttpSession session, final String key) {
- return this.app.getPrintableValeFromSession(session, key);
- }
-
/**
* Some "getter" for a an array of only available products
*
return this.app.getAllCategories();
}
- /**
- * Some "getter" for total price of position from request or session.
- * Single price and amount is multiplyed.
- *
- * @param product Product instance
- * @param request Request instance
- * @param session Session instance
- * @return Amount as string
- */
- @Override
- @Deprecated
- public float getTotalPositionPriceFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) {
- return this.app.getTotalPositionPriceFromRequestSession(product, request, session);
- }
-
/**
* Checks whether the given product is choosen, request overules session.
*