From: Roland Häder Date: Sun, 10 Sep 2017 14:44:36 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4e029109ca8c03b3ae58be64ecee75aa7ac9cfb8;p=jphone-lib.git Continued: - also moved these remote interfaces to 'model' package Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jphone/model/phonenumbers/mobileprovider/AdminMobileProviderSessionBeanRemote.java b/src/org/mxchange/jphone/model/phonenumbers/mobileprovider/AdminMobileProviderSessionBeanRemote.java new file mode 100644 index 0000000..ad79191 --- /dev/null +++ b/src/org/mxchange/jphone/model/phonenumbers/mobileprovider/AdminMobileProviderSessionBeanRemote.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.jphone.model.phonenumbers.mobileprovider; + +import java.io.Serializable; +import javax.ejb.Remote; +import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException; + +/** + * A remote interface for mobile provider data retrieval for administrative + * purposes. + *

+ * @author Roland Häder + */ +@Remote +public interface AdminMobileProviderSessionBeanRemote extends Serializable { + + /** + * Adds given mobile provider to database if not already added. If the + * providers dial prefix and country combination is found an exception is + * thrown. An updated instance is returned on success. + *

+ * @param mobileProvider Mobile provider instance + *

+ * @return Updated instance + *

+ * @throws org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException Thrown if the mobile provider is already added + */ + MobileProvider addMobileProvider (final MobileProvider mobileProvider) throws MobileProviderAlreadyAddedException; + +} diff --git a/src/org/mxchange/jphone/model/phonenumbers/mobileprovider/MobileProviderSingletonBeanRemote.java b/src/org/mxchange/jphone/model/phonenumbers/mobileprovider/MobileProviderSingletonBeanRemote.java new file mode 100644 index 0000000..66eee08 --- /dev/null +++ b/src/org/mxchange/jphone/model/phonenumbers/mobileprovider/MobileProviderSingletonBeanRemote.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.jphone.model.phonenumbers.mobileprovider; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.Remote; + +/** + * A remote interface for mobile provider data retrieval + *

+ * @author Roland Häder + */ +@Remote +public interface MobileProviderSingletonBeanRemote extends Serializable { + + /** + * All registered SMS providers + *

+ * @return A list of all SMS providers + */ + List allMobileProviders (); + +} diff --git a/src/org/mxchange/jphone/model/phonenumbers/phone/AdminPhoneSessionBeanRemote.java b/src/org/mxchange/jphone/model/phonenumbers/phone/AdminPhoneSessionBeanRemote.java new file mode 100644 index 0000000..bd70218 --- /dev/null +++ b/src/org/mxchange/jphone/model/phonenumbers/phone/AdminPhoneSessionBeanRemote.java @@ -0,0 +1,81 @@ +/* + * 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.jphone.model.phonenumbers.phone; + +import java.io.Serializable; +import javax.ejb.Remote; +import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; +import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber; + +/** + * A remote administrative interface for any kind of phone numbers. + *

+ * @author Roland Häder + */ +@Remote +public interface AdminPhoneSessionBeanRemote extends Serializable { + + /** + * Deletes given fax data. + *

+ * @param faxNumber Fax data to be deleted + */ + void deleteFaxData (final DialableFaxNumber faxNumber); + + /** + * Deletes given land-line data. + *

+ * @param landLineNumber Land-line data to be deleted + */ + void deleteLandLineData (final DialableLandLineNumber landLineNumber); + + /** + * Deletes given mobile data. + *

+ * @param mobileNumber Mobile data to be deleted + */ + void deleteMobileData (final DialableMobileNumber mobileNumber); + + /** + * Updates data from given fax number instance in database + *

+ * @param faxNumber Fax number instance to update + *

+ * @return Updated fax number instance + */ + DialableFaxNumber updateFaxData (final DialableFaxNumber faxNumber); + + /** + * Updates data from given land-line number instance in database + *

+ * @param landLineNumber Land-line number instance to update + *

+ * @return Updated landLine number instance + */ + DialableLandLineNumber updateLandLineData (final DialableLandLineNumber landLineNumber); + + /** + * Updates data from given mobile number instance in database + *

+ * @param mobileNumber Mobile number instance to update + *

+ * @return Updated mobile number instance + */ + DialableMobileNumber updateMobileData (final DialableMobileNumber mobileNumber); + +} diff --git a/src/org/mxchange/jphone/model/phonenumbers/phone/PhoneSessionBeanRemote.java b/src/org/mxchange/jphone/model/phonenumbers/phone/PhoneSessionBeanRemote.java new file mode 100644 index 0000000..570bf58 --- /dev/null +++ b/src/org/mxchange/jphone/model/phonenumbers/phone/PhoneSessionBeanRemote.java @@ -0,0 +1,89 @@ +/* + * 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.jphone.model.phonenumbers.phone; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.Remote; +import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException; +import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; +import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber; + +/** + * A remote interface for phone numbers (any kind) + *

+ * @author Roland Häder + */ +@Remote +public interface PhoneSessionBeanRemote extends Serializable { + + /** + * Finds a fax entry by given id number + *

+ * @param faxNumberId Fax entry id number + *

+ * @return A valid fax instance + *

+ * @throws PhoneEntityNotFoundException If the entity was not found + */ + DialableFaxNumber findFaxNumberById (final Long faxNumberId) throws PhoneEntityNotFoundException; + + /** + * Finds a land-line entry by given id number + *

+ * @param landLineNumberId Land-line entry id number + *

+ * @return A valid land-line instance + *

+ * @throws PhoneEntityNotFoundException If the entity was not found + */ + DialableLandLineNumber findLandLineNumberById (final Long landLineNumberId) throws PhoneEntityNotFoundException; + + /** + * Finds a mobile entry by given id number + *

+ * @param mobileNumberId Mobile entry id number + *

+ * @return A valid mobile instance + *

+ * @throws PhoneEntityNotFoundException If the entity was not found + */ + DialableMobileNumber findMobileNumberById (Long mobileNumberId) throws PhoneEntityNotFoundException; + + /** + * Returns a list of all cell phone numbers + *

+ * @return All cell phone numbers + */ + List allMobileNumbers (); + + /** + * Returns a list of all land-line numbers + *

+ * @return All land-line numbers + */ + List allLandLineNumbers (); + + /** + * Returns a list of all fax numbers + *

+ * @return All fax numbers + */ + List allFaxNumbers (); + +} diff --git a/src/org/mxchange/jphone/phonenumbers/mobileprovider/AdminMobileProviderSessionBeanRemote.java b/src/org/mxchange/jphone/phonenumbers/mobileprovider/AdminMobileProviderSessionBeanRemote.java deleted file mode 100644 index 5ef6838..0000000 --- a/src/org/mxchange/jphone/phonenumbers/mobileprovider/AdminMobileProviderSessionBeanRemote.java +++ /dev/null @@ -1,45 +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.jphone.phonenumbers.mobileprovider; - -import java.io.Serializable; -import javax.ejb.Remote; -import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException; - -/** - * A remote interface for mobile provider data retrieval for administrative - * purposes. - *

- * @author Roland Häder - */ -@Remote -public interface AdminMobileProviderSessionBeanRemote extends Serializable { - - /** - * Adds given mobile provider to database if not already added. If the - * providers dial prefix and country combination is found an exception is - * thrown. An updated instance is returned on success. - *

- * @param mobileProvider Mobile provider instance - *

- * @return Updated instance - *

- * @throws org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException Thrown if the mobile provider is already added - */ - MobileProvider addMobileProvider (final MobileProvider mobileProvider) throws MobileProviderAlreadyAddedException; - -} diff --git a/src/org/mxchange/jphone/phonenumbers/mobileprovider/MobileProviderSingletonBeanRemote.java b/src/org/mxchange/jphone/phonenumbers/mobileprovider/MobileProviderSingletonBeanRemote.java deleted file mode 100644 index 18886b4..0000000 --- a/src/org/mxchange/jphone/phonenumbers/mobileprovider/MobileProviderSingletonBeanRemote.java +++ /dev/null @@ -1,38 +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.jphone.phonenumbers.mobileprovider; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; - -/** - * A remote interface for mobile provider data retrieval - *

- * @author Roland Häder - */ -@Remote -public interface MobileProviderSingletonBeanRemote extends Serializable { - - /** - * All registered SMS providers - *

- * @return A list of all SMS providers - */ - List allMobileProviders (); - -} diff --git a/src/org/mxchange/jphone/phonenumbers/phone/AdminPhoneSessionBeanRemote.java b/src/org/mxchange/jphone/phonenumbers/phone/AdminPhoneSessionBeanRemote.java deleted file mode 100644 index 8011c94..0000000 --- a/src/org/mxchange/jphone/phonenumbers/phone/AdminPhoneSessionBeanRemote.java +++ /dev/null @@ -1,81 +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.jphone.phonenumbers.phone; - -import java.io.Serializable; -import javax.ejb.Remote; -import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; -import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; -import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; - -/** - * A remote administrative interface for any kind of phone numbers. - *

- * @author Roland Häder - */ -@Remote -public interface AdminPhoneSessionBeanRemote extends Serializable { - - /** - * Deletes given fax data. - *

- * @param faxNumber Fax data to be deleted - */ - void deleteFaxData (final DialableFaxNumber faxNumber); - - /** - * Deletes given land-line data. - *

- * @param landLineNumber Land-line data to be deleted - */ - void deleteLandLineData (final DialableLandLineNumber landLineNumber); - - /** - * Deletes given mobile data. - *

- * @param mobileNumber Mobile data to be deleted - */ - void deleteMobileData (final DialableMobileNumber mobileNumber); - - /** - * Updates data from given fax number instance in database - *

- * @param faxNumber Fax number instance to update - *

- * @return Updated fax number instance - */ - DialableFaxNumber updateFaxData (final DialableFaxNumber faxNumber); - - /** - * Updates data from given land-line number instance in database - *

- * @param landLineNumber Land-line number instance to update - *

- * @return Updated landLine number instance - */ - DialableLandLineNumber updateLandLineData (final DialableLandLineNumber landLineNumber); - - /** - * Updates data from given mobile number instance in database - *

- * @param mobileNumber Mobile number instance to update - *

- * @return Updated mobile number instance - */ - DialableMobileNumber updateMobileData (final DialableMobileNumber mobileNumber); - -} diff --git a/src/org/mxchange/jphone/phonenumbers/phone/PhoneSessionBeanRemote.java b/src/org/mxchange/jphone/phonenumbers/phone/PhoneSessionBeanRemote.java deleted file mode 100644 index 9ad04c5..0000000 --- a/src/org/mxchange/jphone/phonenumbers/phone/PhoneSessionBeanRemote.java +++ /dev/null @@ -1,89 +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.jphone.phonenumbers.phone; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException; -import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; -import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; -import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; - -/** - * A remote interface for phone numbers (any kind) - *

- * @author Roland Häder - */ -@Remote -public interface PhoneSessionBeanRemote extends Serializable { - - /** - * Finds a fax entry by given id number - *

- * @param faxNumberId Fax entry id number - *

- * @return A valid fax instance - *

- * @throws PhoneEntityNotFoundException If the entity was not found - */ - DialableFaxNumber findFaxNumberById (final Long faxNumberId) throws PhoneEntityNotFoundException; - - /** - * Finds a land-line entry by given id number - *

- * @param landLineNumberId Land-line entry id number - *

- * @return A valid land-line instance - *

- * @throws PhoneEntityNotFoundException If the entity was not found - */ - DialableLandLineNumber findLandLineNumberById (final Long landLineNumberId) throws PhoneEntityNotFoundException; - - /** - * Finds a mobile entry by given id number - *

- * @param mobileNumberId Mobile entry id number - *

- * @return A valid mobile instance - *

- * @throws PhoneEntityNotFoundException If the entity was not found - */ - DialableMobileNumber findMobileNumberById (Long mobileNumberId) throws PhoneEntityNotFoundException; - - /** - * Returns a list of all cell phone numbers - *

- * @return All cell phone numbers - */ - List allMobileNumbers (); - - /** - * Returns a list of all land-line numbers - *

- * @return All land-line numbers - */ - List allLandLineNumbers (); - - /** - * Returns a list of all fax numbers - *

- * @return All fax numbers - */ - List allFaxNumbers (); - -}