From c51627d5eb5188a9d6cbe4ea0029cb62df7506c6 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 9 Apr 2016 13:12:21 +0200 Subject: [PATCH] Created generic customer lib (remote interfaces) based on jshop-ee-lib --- build.xml | 6 +- lib/jcustomer-core.jar | Bin 0 -> 5872 bytes lib/jshop-core.jar | Bin 49064 -> 44482 bytes nbproject/build-impl.xml | 10 +-- nbproject/project.properties | 8 +- nbproject/project.xml | 2 +- .../customer/CustomerSessionBeanRemote.java | 6 +- .../model/basket/BasketSessionBeanRemote.java | 46 ----------- .../AdminCategorySessionBeanRemote.java | 46 ----------- .../category/CategorySessionBeanRemote.java | 37 --------- .../AdminProductSessionBeanRemote.java | 54 ------------ .../product/ProductSessionBeanRemote.java | 37 --------- .../model/receipt/ReceiptBeanRemote.java | 77 ------------------ .../model/receipt/WrapableReceipt.java | 27 ------ 14 files changed, 18 insertions(+), 338 deletions(-) create mode 100644 lib/jcustomer-core.jar rename src/org/mxchange/{jshopcore => jcustomercore}/model/customer/CustomerSessionBeanRemote.java (89%) delete mode 100644 src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java delete mode 100644 src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java delete mode 100644 src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java delete mode 100644 src/org/mxchange/jshopcore/model/product/AdminProductSessionBeanRemote.java delete mode 100644 src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java delete mode 100644 src/org/mxchange/jshopcore/model/receipt/ReceiptBeanRemote.java delete mode 100644 src/org/mxchange/jshopcore/model/receipt/WrapableReceipt.java diff --git a/build.xml b/build.xml index e1b5260..2771440 100644 --- a/build.xml +++ b/build.xml @@ -7,8 +7,8 @@ - - Builds, tests, and runs the project jshop-ee-lib. + + Builds, tests, and runs the project jcustomer-lib. - + @@ -468,7 +468,7 @@ is divided into following sections: - + @@ -619,7 +619,7 @@ is divided into following sections: - + @@ -911,7 +911,7 @@ is divided into following sections: - + @@ -1396,7 +1396,7 @@ is divided into following sections: - + diff --git a/nbproject/project.properties b/nbproject/project.properties index dedc590..c3571c8 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -3,7 +3,7 @@ annotation.processing.enabled.in.editor=true annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=jshop-ee-lib +application.title=jcustomer-lib application.vendor=Roland Haeder auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml build.classes.dir=${build.dir}/classes @@ -26,12 +26,13 @@ debug.test.classpath=\ dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist -dist.jar=${dist.dir}/jshop-ee-lib.jar +dist.jar=${dist.dir}/jcustomer-lib.jar dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= file.reference.jcore.jar=lib/jcore.jar file.reference.jcoreee.jar=lib/jcoreee.jar +file.reference.jcustomer-core.jar=lib/jcustomer-core.jar file.reference.jshop-core.jar=lib/jshop-core.jar includes=** jar.archive.disabled=${jnlp.enabled} @@ -40,11 +41,13 @@ jar.index=${jnlp.enabled} javac.classpath=\ ${file.reference.jcore.jar}:\ ${file.reference.jcoreee.jar}:\ + ${file.reference.jcustomer-core.jar}:\ ${file.reference.jshop-core.jar}:\ ${libs.javaee-api-7.0.classpath} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=true +javac.external.vm=false javac.processorpath=\ ${javac.classpath} javac.source=1.7 @@ -95,6 +98,7 @@ run.test.classpath=\ source.encoding=UTF-8 source.reference.jcore.jar=../jcore/src/ source.reference.jcoreee.jar=../jcoreee/src/ +source.reference.jcustomer-core.jar=../jcustomer-core/src/ source.reference.jshop-core.jar=../jshop-core/src/ src.dir=src test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml index 7144edb..5516f62 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -3,7 +3,7 @@ org.netbeans.modules.java.j2seproject - jshop-ee-lib + jcustomer-lib diff --git a/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java b/src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java similarity index 89% rename from src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java rename to src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java index 3a63e60..6c4b5c1 100644 --- a/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java +++ b/src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java @@ -14,11 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.jshopcore.model.customer; +package org.mxchange.jcustomercore.model.customer; import java.io.Serializable; import javax.ejb.Remote; -import org.mxchange.jshopcore.exceptions.CustomerAlreadyRegisteredException; +import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException; /** * An interface for customer beans @@ -55,7 +55,7 @@ public interface CustomerSessionBeanRemote extends Serializable { * @return Prepared Customer instance *

* @throws - * org.mxchange.jshopcore.exceptions.CustomerAlreadyRegisteredException If + * org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException If * the customer is already registered. */ Customer registerCustomer (final Customer customer) throws CustomerAlreadyRegisteredException; diff --git a/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java deleted file mode 100644 index b5faad5..0000000 --- a/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2016 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.jshopcore.model.basket; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jshopcore.model.customer.Customer; - -/** - * An interface for a basket bean - *

- * @author Roland Haeder - */ -@Remote -public interface BasketSessionBeanRemote extends Serializable { - - /** - * Clears this bean from previous usage - */ - void clear (); - - /** - * Registers the order list of tems with the customer - *

- * @param customer Customer instance - * @param orderedItems Ordered items list - *

- * @return Access key - */ - String registerItems (final Customer customer, final List orderedItems); -} 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 945971c..0000000 --- a/src/org/mxchange/jshopcore/model/category/AdminCategorySessionBeanRemote.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2016 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.jshopcore.model.category; - -import java.io.Serializable; -import javax.ejb.Remote; -import org.mxchange.jshopcore.exceptions.CannotAddCategoryException; -import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException; - -/** - * An interface for categories for "ADMIN" role. - *

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

- * @param category Category instance - *

- * @return Updated category instance - *

- * @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 - */ - 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 6b08604..0000000 --- a/src/org/mxchange/jshopcore/model/category/CategorySessionBeanRemote.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2016 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.jshopcore.model.category; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; - -/** - * A remote-call interface for the shop - *

- * @author Roland Haeder - */ -@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 4c3d83d..0000000 --- a/src/org/mxchange/jshopcore/model/product/AdminProductSessionBeanRemote.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2016 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.jshopcore.model.product; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jshopcore.exceptions.CannotAddProductException; -import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException; - -/** - * Product interface for "ADMIN" role - *

- * @author Roland Haeder - */ -@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 - * org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the - * given product title is already used - * @throws org.mxchange.jshopcore.exceptions.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 a7922f5..0000000 --- a/src/org/mxchange/jshopcore/model/product/ProductSessionBeanRemote.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2016 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.jshopcore.model.product; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; - -/** - * An interface for non-admin purposes - *

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

- * @return Only available products - */ - List getAvailableProducts (); -} diff --git a/src/org/mxchange/jshopcore/model/receipt/ReceiptBeanRemote.java b/src/org/mxchange/jshopcore/model/receipt/ReceiptBeanRemote.java deleted file mode 100644 index 3e21191..0000000 --- a/src/org/mxchange/jshopcore/model/receipt/ReceiptBeanRemote.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2016 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.jshopcore.model.receipt; - -import java.io.Serializable; -import javax.ejb.Remote; -import org.mxchange.jshopcore.model.customer.Customer; - -/** - * A remote interface for official recipt creation - *

- * @author Roland Haeder - */ -@Remote -public interface ReceiptBeanRemote extends Serializable { - - /** - * Returns a wrapped PDF byte stream for given access key or null if not - * found. - *

- * @param accessKey Access key on the online PDF - *

- * @return Wrapped byte stream - */ - WrapableReceipt createReceiptFromAccessKey (final String accessKey); - - /** - * Fetches access key, if customer instance matches, else null is returned - *

- * @param customer Customer instance - *

- * @return Access key or null - */ - String fetchAccessKey (final Customer customer); - - /** - * Getter for access key - *

- * @return Access key - */ - String getAccessKey (); - - /** - * Setter for access key - *

- * @param accessKey Access key - */ - void setAccessKey (final String accessKey); - - /** - * Getter for customer instance - *

- * @return Customer instance - */ - Customer getCustomer (); - - /** - * Setter for customer instance - *

- * @param customer Customer instance - */ - void setCustomer (final Customer customer); -} diff --git a/src/org/mxchange/jshopcore/model/receipt/WrapableReceipt.java b/src/org/mxchange/jshopcore/model/receipt/WrapableReceipt.java deleted file mode 100644 index f619a09..0000000 --- a/src/org/mxchange/jshopcore/model/receipt/WrapableReceipt.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2016 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.jshopcore.model.receipt; - -import java.io.Serializable; - -/** - * A receipt wrapper interface. - *

- * @author Roland Haeder - */ -public interface WrapableReceipt extends Serializable { -} -- 2.39.5