package org.mxchange.pizzaapplication.application;
import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.Deque;
import java.util.Iterator;
* Some "getter" for a linked list of only available products
*
* @return Only available products
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
*/
- public Deque<Product> getAvailableProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+ public Deque<Product> getAvailableProducts ();
/**
* Some "getter" for a linked list of all products
*
* @return All products
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
*/
- public Deque<Product> getAllProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+ public Deque<Product> getAllProducts ();
/**
* Some "getter" for a linked list of all categories
*
* @return All categories
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
*/
- public Deque<Category> getAllCategories () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+ public Deque<Category> getAllCategories ();
/**
* Initializes this instance with given ServletContext
* Some "getter" for a an array of only available products
*
* @return Only available products
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
*/
- public Iterator<Product> getAvailableProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+ public Iterator<Product> getAvailableProductsIterator ();
/**
* Some "getter" for a an array of all products
*
* @return All products
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
*/
- public Iterator<Product> getAllProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+ public Iterator<Product> getAllProductsIterator ();
/**
* Some "getter" for a an array of all categories
*
* @return All categories
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
*/
- public Iterator<Category> getAllCategoriesIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+ public Iterator<Category> getAllCategoriesIterator ();
/**
* Adds given category data from request to database
*
* @param category Category instance
- * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException The category's title is already used
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
+ * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the category's title has been used
*/
- public void doAdminAddCategory (final Category category) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException;
+ public void doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException;
/**
* Adds given product data from request to database
*
* @param product Product instance
- * @throws java.io.IOException If an IO error occurs
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
- * @throws java.lang.reflect.InvocationTargetException If something else happens?
- * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the product's title is already used
+ * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the product's title has been used
*/
- public void doAdminAddProduct (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException;
+ public void doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException;
}
*/
package org.mxchange.pizzaapplication.application;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.text.MessageFormat;
import java.util.Deque;
}
@Override
- public Deque<Category> getAllCategories () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public Deque<Category> getAllCategories () {
// Unfinished
throw new UnsupportedOperationException("Unfinished method.");
}
@Override
- public Deque<Product> getAllProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public Deque<Product> getAllProducts () {
// Unfinished
throw new UnsupportedOperationException("Unfinished method.");
}
@Override
- public Deque<Product> getAvailableProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public Deque<Product> getAvailableProducts () {
// Unfinished
throw new UnsupportedOperationException("Unfinished method.");
}
@Override
@SuppressWarnings ("unchecked")
- public Iterator<Product> getAvailableProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public Iterator<Product> getAvailableProductsIterator () {
// Trace message
this.getLogger().trace("CALLED!"); //NOI18N
@Override
@SuppressWarnings ("unchecked")
- public Iterator<Product> getAllProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public Iterator<Product> getAllProductsIterator () {
// Trace message
this.getLogger().trace("CALLED!"); //NOI18N
@Override
@SuppressWarnings ("unchecked")
- public Iterator<Category> getAllCategoriesIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public Iterator<Category> getAllCategoriesIterator () {
// Trace message
this.getLogger().trace("CALLED!"); //NOI18N
* @param title Title of category to check
* @return Whether it has been found
*/
- private boolean isCategoryTitleUsed(final String title) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ private boolean isCategoryTitleUsed(final String title) {
// Trace message
this.getLogger().trace("title=" + title + " - CALLED!"); //NOI18N
}
@Override
- public void doAdminAddCategory (final Category category) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException {
+ public void doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException {
// Trace message
this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
}
// Try to check if title is used already
- if (this.isCategoryTitleUsed(title)) {
+ if (this.isCategoryTitleUsed(category)) {
// Title already used
throw new CategoryTitleAlreadyUsedException(category);
}
}
@Override
- public void doAdminAddProduct (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException {
+ public void doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException {
// Trace message
this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
*
* @param product Product instance
* @return Whether the product title is already used
- * @throws java.io.IOException If any IO error occurs
- * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found in a file-based database backend's file ... ;-)
- * @throws java.sql.SQLException If any SQL error occurs
- * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed
- * @throws java.lang.reflect.InvocationTargetException Any other problems?
*/
- private boolean isProductTitleUsed (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ private boolean isProductTitleUsed (final Product product) {
// Trace message
this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", product)); //NOI18N
*
* @param category Category instance
* @return Whether the product title is already used
- * @throws java.io.IOException If any IO error occurs
- * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found in a file-based database backend's file ... ;-)
- * @throws java.sql.SQLException If any SQL error occurs
- * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
- * @throws java.lang.NoSuchMethodException If a method was not found
- * @throws java.lang.IllegalAccessException If the method cannot be accessed
- * @throws java.lang.reflect.InvocationTargetException Any other problems?
*/
- private boolean isCategoryTitleUsed (final Category category) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ private boolean isCategoryTitleUsed (final Category category) {
// Trace message
this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N