From: Roland Haeder Date: Sat, 5 Sep 2015 14:23:31 +0000 (+0200) Subject: Initial import X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7a1b7b264923d6666e1c124645ea409ef62f6f53;p=jshop-lib.git Initial import Signed-off-by: Roland Häder --- 7a1b7b264923d6666e1c124645ea409ef62f6f53 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1cd7a86 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/nbproject/private/ +/manifest.mf +/build/ +/dist/ +/*.properties diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..4b97cbc --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project jshop-ee-lib. + + + diff --git a/dist.sh b/dist.sh new file mode 100755 index 0000000..f58ac6e --- /dev/null +++ b/dist.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +NAME="jshop-ee-lib" +LIST=`find ../*/lib/${NAME}.jar` +LIST="${LIST} `find ../*/*-ejb/lib/${NAME}.jar`" + +for entry in ${LIST}; +do + cp -v dist/${NAME}.jar ${entry} +done diff --git a/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar new file mode 100644 index 0000000..2cc00f0 Binary files /dev/null and b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar differ diff --git a/lib/commons-codec-1.10.jar b/lib/commons-codec-1.10.jar new file mode 100644 index 0000000..1d7417c Binary files /dev/null and b/lib/commons-codec-1.10.jar differ diff --git a/lib/commons-lang3-3.4.jar b/lib/commons-lang3-3.4.jar new file mode 100644 index 0000000..8ec91d4 Binary files /dev/null and b/lib/commons-lang3-3.4.jar differ diff --git a/lib/javaee-api-7.0/javaee-api-7.0.jar b/lib/javaee-api-7.0/javaee-api-7.0.jar new file mode 100644 index 0000000..09de736 Binary files /dev/null and b/lib/javaee-api-7.0/javaee-api-7.0.jar differ diff --git a/lib/javaee-api-7.0/javaee-doc-api.jar b/lib/javaee-api-7.0/javaee-doc-api.jar new file mode 100644 index 0000000..bdebe91 Binary files /dev/null and b/lib/javaee-api-7.0/javaee-doc-api.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar new file mode 100644 index 0000000..512369d Binary files /dev/null and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar new file mode 100644 index 0000000..5f80768 Binary files /dev/null and b/lib/jcoreee.jar differ diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar new file mode 100644 index 0000000..48fd3ca Binary files /dev/null and b/lib/jshop-core.jar differ diff --git a/lib/log4j-api-2.3.jar b/lib/log4j-api-2.3.jar new file mode 100644 index 0000000..2a61bbe Binary files /dev/null and b/lib/log4j-api-2.3.jar differ diff --git a/lib/log4j-core-2.3.jar b/lib/log4j-core-2.3.jar new file mode 100644 index 0000000..5438b0b Binary files /dev/null and b/lib/log4j-core-2.3.jar differ diff --git a/lib/nblibraries.properties b/lib/nblibraries.properties new file mode 100644 index 0000000..1f1df42 --- /dev/null +++ b/lib/nblibraries.properties @@ -0,0 +1,10 @@ +libs.CopyLibs.classpath=\ + ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar +libs.CopyLibs.displayName=CopyLibs Task +libs.CopyLibs.prop-version=2.0 +libs.javaee-api-7.0.classpath=\ + ${base}/javaee-api-7.0/javaee-api-7.0.jar +libs.javaee-api-7.0.displayName=Java EE 7 API Library +libs.javaee-api-7.0.javadoc=\ + ${base}/javaee-api-7.0/javaee-doc-api.jar +libs.javaee-api-7.0.prop-maven-dependencies=javax:javaee-api:7.0:jar diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..4c1276d --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..bdd86e7 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=4a3637b0 +build.xml.script.CRC32=7a07e688 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=4a3637b0 +nbproject/build-impl.xml.script.CRC32=4eec5454 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..f10644e --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,85 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/jshop-ee-lib.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +file.reference.jcore.jar=lib/jcore.jar +file.reference.jcoreee.jar=lib/jcoreee.jar +file.reference.jshop-core.jar=lib/jshop-core.jar +file.reference.log4j-api-2.3.jar=lib/log4j-api-2.3.jar +file.reference.log4j-core-2.3.jar=lib/log4j-core-2.3.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.jcore.jar}:\ + ${file.reference.jcoreee.jar}:\ + ${file.reference.jshop-core.jar}:\ + ${file.reference.log4j-api-2.3.jar}:\ + ${file.reference.log4j-core-2.3.jar}:\ + ${libs.javaee-api-7.0.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=true +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +source.reference.jcore.jar=../jcore/src/ +source.reference.jcoreee.jar=../jcoreee/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 new file mode 100644 index 0000000..1f83014 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,18 @@ + + + org.netbeans.modules.java.j2seproject + + + jshop-ee-lib + + + + + + + + + ./lib/nblibraries.properties + + + diff --git a/src/org/mxchange/jshopeelib/beans/ShopBean.java b/src/org/mxchange/jshopeelib/beans/ShopBean.java new file mode 100644 index 0000000..a01df54 --- /dev/null +++ b/src/org/mxchange/jshopeelib/beans/ShopBean.java @@ -0,0 +1,49 @@ +/* + * 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.jshopeelib.beans; + +import org.mxchange.jcoreee.beans.FrameworkBean; +import org.mxchange.jshopcore.model.item.AddableBasketItem; +import org.mxchange.jshopcore.model.product.Product; + +/** + * A shop bean interface + * + * @author Roland Haeder + */ +public interface ShopBean extends FrameworkBean { + + /** + * @return the item + */ + public AddableBasketItem getItem (); + + /** + * @param item the item to set + */ + public void setItem (final AddableBasketItem item); + + /** + * @return the product + */ + public Product getProduct (); + + /** + * @param product the product to set + */ + public void setProduct (final Product product); +} diff --git a/src/org/mxchange/jshopeelib/beans/remote/basket/BasketSessionBeanRemote.java b/src/org/mxchange/jshopeelib/beans/remote/basket/BasketSessionBeanRemote.java new file mode 100644 index 0000000..27a40b4 --- /dev/null +++ b/src/org/mxchange/jshopeelib/beans/remote/basket/BasketSessionBeanRemote.java @@ -0,0 +1,107 @@ +/* + * 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.jshopeelib.beans.remote.basket; + +import java.rmi.RemoteException; +import java.util.Map; +import javax.ejb.Remote; +import javax.faces.FacesException; +import javax.faces.view.facelets.FaceletException; +import org.mxchange.jshopcore.model.item.AddableBasketItem; +import org.mxchange.jshopeelib.beans.ShopBean; + +/** + * An interface for a basket bean + * + * @author Roland Haeder + */ +@Remote +public interface BasketSessionBeanRemote extends ShopBean { + /** + * Initializes this instance. Please note that no checked exceptions can be + * thrown as this method is invoked over @PostConstruct anotation. + * + * @throws FacesException If something was wrong + */ + public void init () throws FaceletException; + + /** + * Adds given item instance to this basket + * @param item Item instance to add + * @throws java.rmi.RemoteException If something bad happens + */ + public void addItem (final AddableBasketItem item) throws RemoteException; + + /** + * Adds given item instance to basket. Remember that the product instance + * itself is not added. Instead a AddableBasketItem is created which holds + * information about amoutn and item type. + * + * @param item Item instance + * @throws java.rmi.RemoteException If something bad happens + */ + public void addToBasket (final AddableBasketItem item) throws RemoteException; + + /** + * Checks if the basket is empty + * + * @return Whether the basket is empty + * @throws java.rmi.RemoteException If something bad happens + */ + public boolean isEmpty () throws RemoteException; + + /** + * 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 + * @throws java.rmi.RemoteException If something bad happens + */ + public boolean isAdded (final AddableBasketItem item) throws RemoteException; + + /** + * Getter for human-readable string from given key + * + * @param key Key to return + * @return Human-readable message + */ + public String getMessageStringFromKey (final String key); + + /** + * Some "getter" for all entries in this basket + * + * @return Map on all basket items + * @throws java.rmi.RemoteException If something bad happens + */ + public Map getAll () throws RemoteException; + + /** + * Getter for last entry + * + * @return Last added item in basket + * @throws java.rmi.RemoteException If something bad happens + */ + public AddableBasketItem getLast () throws RemoteException; + + /** + * Getter for last num rows + * + * @return Last num rows + */ + public int getLastNumRows (); +} diff --git a/src/org/mxchange/jshopeelib/beans/remote/customer/CustomerSessionBeanRemote.java b/src/org/mxchange/jshopeelib/beans/remote/customer/CustomerSessionBeanRemote.java new file mode 100644 index 0000000..3676b20 --- /dev/null +++ b/src/org/mxchange/jshopeelib/beans/remote/customer/CustomerSessionBeanRemote.java @@ -0,0 +1,253 @@ +/* + * 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.jshopeelib.beans.remote.customer; + +import javax.ejb.Remote; +import org.mxchange.jcore.model.contact.gender.Gender; +import org.mxchange.jshopeelib.beans.ShopBean; + +/** + * An interface for customer beans + * + * @author Roland Haeder + */ +@Remote +public interface CustomerSessionBeanRemote extends ShopBean { + /** + * Some "getter" for translated gender of the contact + * + * @return Translated / human-readable gender + */ + public String getTranslatedGender (); + + /** + * Gender of the contact + * + * @return the gender + */ + public Gender getGender (); + + /** + * Gender of the contact + * + * @param gender the gender to set + */ + public void setGender (final Gender gender); + + /** + * First name + * + * @return the first name + */ + public String getFirstName (); + + /** + * First name + * + * @param firstName the first name to set + */ + public void setFirstName (final String firstName); + + /** + * Family name + * + * @return the familyName + */ + public String getFamilyName (); + + /** + * Family name + * + * @param familyName the familyName to set + */ + public void setFamilyName (final String familyName); + + /** + * Companyname + * + * @return the companyName + */ + public String getCompanyName (); + + /** + * Companyname + * + * @param companyName the companyName to set + */ + public void setCompanyName (final String companyName); + + /** + * Street + * + * @return the street + */ + public String getStreet (); + + /** + * Street + * + * @param street the street to set + */ + public void setStreet (final String street); + + /** + * House number + * + * @return the houseNumber + */ + public Long getHouseNumber (); + + /** + * House number + * + * @param houseNumber the houseNumber to set + */ + public void setHouseNumber (final Long houseNumber); + + /** + * ZIP code + * + * @return the zipCode + */ + public Long getZipCode (); + + /** + * ZIP code + * + * @param zipCode the zipCode to set + */ + public void setZipCode (final Long zipCode); + + /** + * City + * + * @return the city + */ + public String getCity (); + + /** + * City + * + * @param city the city to set + */ + public void setCity (final String city); + + /** + * Country code + * + * @return the countryCode + */ + public String getCountryCode (); + + /** + * Country code + * + * @param countryCode the countryCode to set + */ + public void setCountryCode (final String countryCode); + + /** + * Email address + * + * @return the emailAddress + */ + public String getEmailAddress (); + + /** + * Email address + * + * @param emailAddress the emailAddress to set + */ + public void setEmailAddress (final String emailAddress); + + /** + * Phone number + * + * @return the phoneNumber + */ + public String getPhoneNumber (); + + /** + * Phone number + * + * @param phoneNumber the phoneNumber to set + */ + public void setPhoneNumber (final String phoneNumber); + + /** + * Fax number + * + * @return the faxNumber + */ + public String getFaxNumber (); + + /** + * Fax number + * + * @param faxNumber the faxNumber to set + */ + public void setFaxNumber (final String faxNumber); + + /** + * Cellphone number + * + * @return the cellphoneNumber + */ + public String getCellphoneNumber (); + + /** + * Cellphone number + * + * @param cellphoneNumber the cellphoneNumber to set + */ + public void setCellphoneNumber (final String cellphoneNumber); + + /** + * Birth day + * + * @return the birthday + */ + public String getBirthday (); + + /** + * Birth day + * + * @param birthday the birthday to set + */ + public void setBirthday (final String birthday); + + /** + * Comments + * + * @return the comment + */ + public String getComment (); + + /** + * Comments + * + * @param comment the comment to set + */ + public void setComment (final String comment); + + /** + * Checks whether the contact is user's own data + * + * @return Own data? + */ + public boolean isOwnContact (); +} diff --git a/src/org/mxchange/jshopeelib/beans/remote/data/ShopDataBeanRemote.java b/src/org/mxchange/jshopeelib/beans/remote/data/ShopDataBeanRemote.java new file mode 100644 index 0000000..0c3157e --- /dev/null +++ b/src/org/mxchange/jshopeelib/beans/remote/data/ShopDataBeanRemote.java @@ -0,0 +1,45 @@ +/* + * 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.jshopeelib.beans.remote.data; + +import java.util.List; +import javax.ejb.Remote; +import org.mxchange.jcore.model.contact.gender.Gender; +import org.mxchange.jshopeelib.beans.ShopBean; + +/** + * A remote interface for static shop data + * + * @author Roland Haeder + */ +@Remote +public interface ShopDataBeanRemote extends ShopBean { + + /** + * 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/jshopeelib/beans/remote/shop/ShopSessionBeanRemote.java b/src/org/mxchange/jshopeelib/beans/remote/shop/ShopSessionBeanRemote.java new file mode 100644 index 0000000..0187d68 --- /dev/null +++ b/src/org/mxchange/jshopeelib/beans/remote/shop/ShopSessionBeanRemote.java @@ -0,0 +1,100 @@ +/* + * 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.jshopeelib.beans.remote.shop; + +import java.rmi.RemoteException; +import java.util.Deque; +import java.util.Iterator; +import javax.ejb.Remote; +import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException; +import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException; +import org.mxchange.jshopcore.model.category.Category; +import org.mxchange.jshopcore.model.product.Product; +import org.mxchange.jshopeelib.beans.ShopBean; + +/** + * A remote-call interface for the shop + * @author Roland Haeder + */ +@Remote +public interface ShopSessionBeanRemote extends ShopBean { + /** + * Some "getter" for an iterator of only available products + * + * @return Only available products + * @throws java.rmi.RemoteException If anything went wrong + */ + public Iterator getAvailableProductsIterator () throws RemoteException; + + /** + * Some "getter" for an iterator of all products + * + * @return All products + * @throws java.rmi.RemoteException If anything went wrong + */ + public Iterator getAllProductsIterator () throws RemoteException; + + /** + * Some "getter" for an iterator of all categories + * + * @return All categories + * @throws java.rmi.RemoteException If anything went wrong + */ + public Iterator getAllCategoriesIterator () throws RemoteException; + + /** + * Some "getter" for a linked list of only available products + * + * @return Only available products + * @throws java.rmi.RemoteException If anything went wrong + */ + public Deque getAvailableProducts () throws RemoteException; + + /** + * Some "getter" for a linked list of all products + * + * @return All products + * @throws java.rmi.RemoteException If anything went wrong + */ + public Deque getAllProducts () throws RemoteException; + + /** + * Some "getter" for a linked list of all categories + * + * @return All categories + * @throws java.rmi.RemoteException If anything went wrong + */ + public Deque getAllCategories () throws RemoteException; + + /** + * Adds given category data from request to database + * + * @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 + */ + public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException; + + /** + * Adds given product data from request to database + * + * @param product Product instance + * @throws java.rmi.RemoteException If something unexpected happened + * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used + */ + public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException; +}