From: Roland Häder Date: Fri, 13 Oct 2017 23:19:40 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=215b6e8a145bc5b3c9307df1dc105eeac81b0118;p=jproduct-lib.git Continued: - moved to proper package, same as core - moved+renamed getAllProducts() -> allProducts() into general remote interface Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jproduct/model/category/AdminCategorySessionBeanRemote.java b/src/org/mxchange/jproduct/model/category/AdminCategorySessionBeanRemote.java new file mode 100644 index 0000000..0abd8a9 --- /dev/null +++ b/src/org/mxchange/jproduct/model/category/AdminCategorySessionBeanRemote.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2016, 2017 Roland Häder + * + * 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.jproduct.model.category; + +import java.io.Serializable; +import javax.ejb.Remote; +import org.mxchange.jproduct.exceptions.CannotAddCategoryException; +import org.mxchange.jproduct.exceptions.CategoryTitleAlreadyUsedException; + +/** + * An interface for categories for "ADMIN" role. + *

+ * @author Roland Häder + */ +@Remote +public interface AdminCategorySessionBeanRemote extends Serializable { + + /** + * Adds given category data from request to database + *

+ * @param category Category instance + *

+ * @return Updated category instance + *

+ * @throws CategoryTitleAlreadyUsedException If the given title is already + * used + * @throws CannotAddCategoryException If the category cannot be added + */ + Category doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException, CannotAddCategoryException; + +} diff --git a/src/org/mxchange/jproduct/model/category/CategorySessionBeanRemote.java b/src/org/mxchange/jproduct/model/category/CategorySessionBeanRemote.java new file mode 100644 index 0000000..2f991b5 --- /dev/null +++ b/src/org/mxchange/jproduct/model/category/CategorySessionBeanRemote.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2016, 2017 Roland Häder + * + * 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.jproduct.model.category; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.Remote; + +/** + * A remote-call interface for the shop + *

+ * @author Roland Häder + */ +@Remote +public interface CategorySessionBeanRemote extends Serializable { + + /** + * Some "getter" for a linked list of all categories + *

+ * @return All categories + */ + List allCategories (); + +} diff --git a/src/org/mxchange/jproduct/model/product/AdminProductSessionBeanRemote.java b/src/org/mxchange/jproduct/model/product/AdminProductSessionBeanRemote.java new file mode 100644 index 0000000..a4224af --- /dev/null +++ b/src/org/mxchange/jproduct/model/product/AdminProductSessionBeanRemote.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2016, 2017 Roland Häder + * + * 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.jproduct.model.product; + +import java.io.Serializable; +import javax.ejb.Remote; +import org.mxchange.jproduct.exceptions.CannotAddProductException; +import org.mxchange.jproduct.exceptions.ProductTitleAlreadyUsedException; + +/** + * Product interface for "ADMIN" role + *

+ * @author Roland Häder + */ +@Remote +public interface AdminProductSessionBeanRemote extends Serializable { + + /** + * Adds given product data from request to database + *

+ * @param product Product instance + *

+ * @return Updated product instance + *

+ * @throws ProductTitleAlreadyUsedException If the given product title is + * already used + * @throws CannotAddProductException If something unexpected happened + */ + Product doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException, CannotAddProductException; + +} diff --git a/src/org/mxchange/jproduct/model/product/ProductSessionBeanRemote.java b/src/org/mxchange/jproduct/model/product/ProductSessionBeanRemote.java new file mode 100644 index 0000000..f3ff691 --- /dev/null +++ b/src/org/mxchange/jproduct/model/product/ProductSessionBeanRemote.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2016, 2017 Roland Häder + * + * 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.jproduct.model.product; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.Remote; + +/** + * An interface for non-administrative purposes + *

+ * @author Roland Häder + */ +@Remote +public interface ProductSessionBeanRemote extends Serializable { + + /** + * Returns a list of all products + *

+ * @return All products + */ + List allProducts (); + + /** + * Some "getter" for a linked list of only available products + *

+ * @return Only available products + */ + List getAvailableProducts (); + +} diff --git a/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java b/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java deleted file mode 100644 index dcc2b87..0000000 --- a/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2016, 2017 Roland Häder - * - * 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.jshopcore.model.category; - -import java.io.Serializable; -import javax.ejb.Remote; -import org.mxchange.jproduct.exceptions.CannotAddCategoryException; -import org.mxchange.jproduct.exceptions.CategoryTitleAlreadyUsedException; -import org.mxchange.jproduct.model.category.Category; - -/** - * An interface for categories for "ADMIN" role. - *

- * @author Roland Häder - */ -@Remote -public interface AdminCategorySessionBeanRemote extends Serializable { - - /** - * Adds given category data from request to database - *

- * @param category Category instance - *

- * @return Updated category instance - *

- * @throws CategoryTitleAlreadyUsedException If the given title is already - * used - * @throws CannotAddCategoryException If the category cannot be added - */ - Category doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException, CannotAddCategoryException; - -} diff --git a/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java b/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java deleted file mode 100644 index fc1cfa3..0000000 --- a/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2016, 2017 Roland Häder - * - * 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.jshopcore.model.category; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jproduct.model.category.Category; - -/** - * A remote-call interface for the shop - *

- * @author Roland Häder - */ -@Remote -public interface CategorySessionBeanRemote extends Serializable { - - /** - * Some "getter" for a linked list of all categories - *

- * @return All categories - */ - List getAllCategories (); - -} diff --git a/src/org/mxchange/jshopcore/model/product/AdminProductSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/product/AdminProductSessionBeanRemote.java deleted file mode 100644 index 8e926ff..0000000 --- a/src/org/mxchange/jshopcore/model/product/AdminProductSessionBeanRemote.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2016, 2017 Roland Häder - * - * 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.jshopcore.model.product; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jproduct.exceptions.CannotAddProductException; -import org.mxchange.jproduct.exceptions.ProductTitleAlreadyUsedException; -import org.mxchange.jproduct.model.product.Product; - -/** - * Product interface for "ADMIN" role - *

- * @author Roland Häder - */ -@Remote -public interface AdminProductSessionBeanRemote extends Serializable { - - /** - * Some "getter" for a linked list of all products - *

- * @return All products - */ - List getAllProducts (); - - /** - * Adds given product data from request to database - *

- * @param product Product instance - *

- * @return Updated product instance - *

- * @throws ProductTitleAlreadyUsedException If the given product title is - * already used - * @throws CannotAddProductException If something unexpected happened - */ - Product doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException, CannotAddProductException; - -} diff --git a/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java deleted file mode 100644 index c77b206..0000000 --- a/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2016, 2017 Roland Häder - * - * 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.jshopcore.model.product; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jproduct.model.product.Product; - -/** - * An interface for non-administrative purposes - *

- * @author Roland Häder - */ -@Remote -public interface ProductSessionBeanRemote extends Serializable { - - /** - * Some "getter" for a linked list of only available products - *

- * @return Only available products - */ - List getAvailableProducts (); - -}