From: Roland Haeder Date: Fri, 11 Sep 2015 13:37:11 +0000 (+0200) Subject: Introduced new exceptions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=664fafccb6e7b7c274dade1fbcd4c703f5ebc5b3;p=jproduct-lib.git Introduced new exceptions Signed-off-by:Roland Häder --- diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index b2760eb..893d1f9 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar index d3ea1ca..93debb2 100644 Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ diff --git a/src/org/mxchange/jcore/model/contact/gender/GenderSessionBeanRemote.java b/src/org/mxchange/jcore/model/contact/gender/GenderSessionBeanRemote.java deleted file mode 100644 index e267287..0000000 --- a/src/org/mxchange/jcore/model/contact/gender/GenderSessionBeanRemote.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2015 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jcore.model.contact.gender; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; - -/** - * A remote interface for static shop data - * - * @author Roland Haeder - */ -@Remote -public interface GenderSessionBeanRemote extends Serializable { - - /** - * Getter for all genders as array - * - * @return All genders as array - */ - public Gender[] allGenders (); - - /** - * All selectable genders. This excludes UNKNOWN - * - * @return Selectable gender for the user - */ - public List selectableGenders (); -} diff --git a/src/org/mxchange/jcore/model/contact/gender/GenderStatefulBeanRemote.java b/src/org/mxchange/jcore/model/contact/gender/GenderStatefulBeanRemote.java new file mode 100644 index 0000000..a4ace43 --- /dev/null +++ b/src/org/mxchange/jcore/model/contact/gender/GenderStatefulBeanRemote.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcore.model.contact.gender; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.Remote; + +/** + * A remote interface for static shop data + * + * @author Roland Haeder + */ +@Remote +public interface GenderStatefulBeanRemote extends Serializable { + + /** + * Getter for all genders as array + * + * @return All genders as array + */ + public Gender[] allGenders (); + + /** + * All selectable genders. This excludes UNKNOWN + * + * @return Selectable gender for the user + */ + public List selectableGenders (); +} diff --git a/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java index 94661c4..cc83e88 100644 --- a/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java +++ b/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java @@ -17,9 +17,7 @@ package org.mxchange.jshopcore.model.basket; import java.io.Serializable; -import java.util.Map; import javax.ejb.Remote; -import org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException; /** * An interface for a basket bean @@ -28,50 +26,4 @@ import org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException; */ @Remote public interface BasketSessionBeanRemote extends Serializable { - - /** - * Adds given item instance to this basket - * - * @param item Item instance to add - * @throws org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException If the item as already been added - */ - public void addItem (final AddableBasketItem item) throws BasketItemAlreadyAddedException; - - /** - * Checks if the basket is empty - * - * @return Whether the basket is empty - */ - public boolean isEmpty (); - - /** - * Checks whether the given product as already been added. If the product's - * item id number was found in basket, the corresponding item instance will - * be set - * - * @param item Item instance to check - * @return Whether the given item has been found - */ - public boolean isAdded (final AddableBasketItem item); - - /** - * Some "getter" for all entries in this basket - * - * @return Map on all basket items - */ - public Map getAll (); - - /** - * Getter for last entry - * - * @return Last added item in basket - */ - public AddableBasketItem getLast (); - - /** - * Getter for last num rows - * - * @return Last num rows - */ - public int getLastNumRows (); } diff --git a/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java b/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java index cf1ef19..6217ca0 100644 --- a/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java +++ b/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java @@ -19,6 +19,7 @@ package org.mxchange.jshopcore.model.category; import java.io.Serializable; import java.rmi.RemoteException; import javax.ejb.Remote; +import org.mxchange.jshopcore.exceptions.CannotAddCategoryException; import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException; /** @@ -35,6 +36,7 @@ public interface AdminCategorySessionBeanRemote extends Serializable { * @param category Category instance * @throws java.rmi.RemoteException If something unexpected happened * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the given title is already used + * @throws org.mxchange.jshopcore.exceptions.CannotAddCategoryException If the category cannot be added */ - public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException; + public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException, CannotAddCategoryException; } diff --git a/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java b/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java index f4b6543..875a094 100644 --- a/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java +++ b/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java @@ -19,6 +19,7 @@ package org.mxchange.jshopcore.model.category; import java.io.Serializable; import java.util.Deque; import javax.ejb.Remote; +import org.mxchange.jshopcore.exceptions.CannotAddCategoryException; import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException; /** @@ -35,8 +36,9 @@ public interface CategorySessionBeanRemote extends Serializable { * * @param category Category instance * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the given category title is already used + * @throws org.mxchange.jshopcore.exceptions.CannotAddCategoryException If the category cannot be added */ - public void doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException; + public void doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException, CannotAddCategoryException; /** * Some "getter" for a linked list of all categories diff --git a/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java index ea62d54..da1aea3 100644 --- a/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java +++ b/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java @@ -19,6 +19,7 @@ package org.mxchange.jshopcore.model.product; import java.io.Serializable; import java.util.Deque; import javax.ejb.Remote; +import org.mxchange.jshopcore.exceptions.CannotAddProductException; import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException; /** @@ -35,8 +36,9 @@ public interface ProductSessionBeanRemote extends Serializable { * * @param product Product instance to add * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used + * @throws org.mxchange.jshopcore.exceptions.CannotAddProductException If the product cannot be added */ - public void doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException; + public void doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException, CannotAddProductException; /** * Some "getter" for all products. This method is typically used in admin