]> git.mxchange.org Git - jjobs-lib.git/commitdiff
Continued a bit:
authorRoland Haeder <roland@mxchange.org>
Tue, 5 Apr 2016 12:20:28 +0000 (14:20 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 5 Apr 2016 12:23:11 +0000 (14:23 +0200)
- changed JNDI lookup to portable (long) version
- renamed some interfaces to naming scheme
- updated jar(s)

lib/juser-lib.jar
src/org/mxchange/jjobs/model/addressbook/AddressbookSessionBeanRemote.java [deleted file]
src/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBeanRemote.java [new file with mode: 0644]
src/org/mxchange/jjobs/validator/addressbook/AddressbookIdValidator.java
src/org/mxchange/jjobs/validator/user/UserIdValidator.java
src/org/mxchange/jphone/phonenumbers/smsprovider/AddressbookSmsProviderSingletonBeanRemote.java [deleted file]
src/org/mxchange/jphone/phonenumbers/smsprovider/JobsSmsProviderSingletonBeanRemote.java [new file with mode: 0644]

index 89275c5218b48c3842588289e939ade13098c570..fdf6c73fa2eb69e4712ec404e9017de768b943d5 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
diff --git a/src/org/mxchange/jjobs/model/addressbook/AddressbookSessionBeanRemote.java b/src/org/mxchange/jjobs/model/addressbook/AddressbookSessionBeanRemote.java
deleted file mode 100644 (file)
index 1aa31b3..0000000
+++ /dev/null
@@ -1,101 +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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jjobs.model.addressbook;
-
-import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Remote;
-import org.mxchange.jjobs.exceptions.AddressbookNameAlreadyUsedException;
-import org.mxchange.jjobs.exceptions.AddressbookNotFoundException;
-import org.mxchange.jjobs.model.addressbook.entry.AddressbookEntry;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * A remote session interface for addressbook handling
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Remote
-public interface AddressbookSessionBeanRemote extends Serializable {
-
-       /**
-        * Some getter for an address book instance from given id number. If the
-        * address book is not found, an exception is thrown.
-        * <p>
-        * @param addressbookId Id number for address book instance
-        * <p>
-        * @return Address book instance
-        * <p>
-        * @throws org.mxchange.jjobs.exceptions.AddressbookNotFoundException
-        * If the address book cannot be found by given id number
-        * @throws NullPointerException If addressbookId is null
-        * @throws IllegalArgumentException If the id number is below 1
-        */
-       Addressbook getAddressbookById (final Long addressbookId) throws AddressbookNotFoundException;
-
-       /**
-        * Returns a list of all entries of given address book, whether the assigned
-        * user is the "owner" or "sharer" of the entry.
-        * <p>
-        * @param addressbook Address book instance
-        * <p>
-        * @return List of all entries
-        */
-       List<AddressbookEntry> allEntries (final Addressbook addressbook);
-
-       /**
-        * Some "getter" for a list of address books the logged-in user has created
-        * <p>
-        * @param loggedInUser Logged-in user
-        * <p>
-        * @return List of all address books
-        */
-       List<Addressbook> getUsersAddressbookList (final User loggedInUser);
-
-       /**
-        * Creates given address book by persisting it. A User instance must be set,
-        * else an exception is thrown.
-        * <p>
-        * @param addressbook Address book instance to create
-        * <p>
-        * @return Updated address book instance
-        * <p>
-        * @throws
-        * org.mxchange.jjobs.exceptions.AddressbookNameAlreadyUsedException
-        * If the address book's name has already been used by the user.
-        */
-       Addressbook createAddressbook (final Addressbook addressbook) throws AddressbookNameAlreadyUsedException;
-
-       /**
-        * Checks whether the given address book id is used (means available).
-        * <p>
-        * @param addressbookId Address book id to check
-        * <p>
-        * @return Whether the id is valid
-        */
-       boolean isAddressbookIdUsed (final Long addressbookId);
-
-       /**
-        * Checks if the given address book's name is already used by the user.
-        * <p>
-        * @param addressbook Address bok instance to check
-        * <p>
-        * @return Whether the name has already been used by the user
-        */
-       boolean isAddressbookNameUsed (final Addressbook addressbook);
-
-}
diff --git a/src/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBeanRemote.java b/src/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..6cd5780
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.model.addressbook;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+import org.mxchange.jjobs.exceptions.AddressbookNameAlreadyUsedException;
+import org.mxchange.jjobs.exceptions.AddressbookNotFoundException;
+import org.mxchange.jjobs.model.addressbook.entry.AddressbookEntry;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A remote session interface for addressbook handling
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Remote
+public interface JobsAddressbookSessionBeanRemote extends Serializable {
+
+       /**
+        * Some getter for an address book instance from given id number. If the
+        * address book is not found, an exception is thrown.
+        * <p>
+        * @param addressbookId Id number for address book instance
+        * <p>
+        * @return Address book instance
+        * <p>
+        * @throws org.mxchange.jjobs.exceptions.AddressbookNotFoundException
+        * If the address book cannot be found by given id number
+        * @throws NullPointerException If addressbookId is null
+        * @throws IllegalArgumentException If the id number is below 1
+        */
+       Addressbook getAddressbookById (final Long addressbookId) throws AddressbookNotFoundException;
+
+       /**
+        * Returns a list of all entries of given address book, whether the assigned
+        * user is the "owner" or "sharer" of the entry.
+        * <p>
+        * @param addressbook Address book instance
+        * <p>
+        * @return List of all entries
+        */
+       List<AddressbookEntry> allEntries (final Addressbook addressbook);
+
+       /**
+        * Some "getter" for a list of address books the logged-in user has created
+        * <p>
+        * @param loggedInUser Logged-in user
+        * <p>
+        * @return List of all address books
+        */
+       List<Addressbook> getUsersAddressbookList (final User loggedInUser);
+
+       /**
+        * Creates given address book by persisting it. A User instance must be set,
+        * else an exception is thrown.
+        * <p>
+        * @param addressbook Address book instance to create
+        * <p>
+        * @return Updated address book instance
+        * <p>
+        * @throws
+        * org.mxchange.jjobs.exceptions.AddressbookNameAlreadyUsedException
+        * If the address book's name has already been used by the user.
+        */
+       Addressbook createAddressbook (final Addressbook addressbook) throws AddressbookNameAlreadyUsedException;
+
+       /**
+        * Checks whether the given address book id is used (means available).
+        * <p>
+        * @param addressbookId Address book id to check
+        * <p>
+        * @return Whether the id is valid
+        */
+       boolean isAddressbookIdUsed (final Long addressbookId);
+
+       /**
+        * Checks if the given address book's name is already used by the user.
+        * <p>
+        * @param addressbook Address bok instance to check
+        * <p>
+        * @return Whether the name has already been used by the user
+        */
+       boolean isAddressbookNameUsed (final Addressbook addressbook);
+
+}
index 2a08538b4570d22757c00f8be863203ef99bcd06..475986ee6eb1da1d4a68c9690e348c27bcd032fc 100644 (file)
@@ -25,12 +25,12 @@ import javax.faces.validator.ValidatorException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import org.mxchange.jjobs.exceptions.AddressbookNotFoundException;
-import org.mxchange.jjobs.model.addressbook.Addressbook;
-import org.mxchange.jjobs.model.addressbook.AddressbookSessionBeanRemote;
 import org.mxchange.jcoreee.validator.number.BaseLongValidator;
 import org.mxchange.jcoreeelogger.beans.local.logger.Log;
 import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jjobs.exceptions.AddressbookNotFoundException;
+import org.mxchange.jjobs.model.addressbook.Addressbook;
+import org.mxchange.jjobs.model.addressbook.JobsAddressbookSessionBeanRemote;
 
 /**
  * A validator for address book id verification
@@ -48,7 +48,7 @@ public class AddressbookIdValidator extends BaseLongValidator {
        /**
         * Remote bean
         */
-       private AddressbookSessionBeanRemote addressbookBean;
+       private JobsAddressbookSessionBeanRemote addressbookBean;
 
        /**
         * Logger instance
@@ -69,7 +69,7 @@ public class AddressbookIdValidator extends BaseLongValidator {
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
 
                        // ... and user controller
-                       this.addressbookBean = (AddressbookSessionBeanRemote) context.lookup("java:global/addressbook-ejb/addressbook!org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote"); //NOI18N
+                       this.addressbookBean = (JobsAddressbookSessionBeanRemote) context.lookup("java:global/addressbook-ejb/addressbook!org.mxchange.addressbook.model.addressbook.JobsAddressbookSessionBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
                        throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
index 8d0a4dbceda89f1db9d638381b339427b6cfb1a6..f653b2aa9b463cd8c0fe9589f23e5eed7004c0f2 100644 (file)
@@ -78,7 +78,7 @@ public class UserIdValidator extends BaseLongValidator implements Validator {
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
 
                        // ... and user controller
-                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/juser-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jjobs-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
                        throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
diff --git a/src/org/mxchange/jphone/phonenumbers/smsprovider/AddressbookSmsProviderSingletonBeanRemote.java b/src/org/mxchange/jphone/phonenumbers/smsprovider/AddressbookSmsProviderSingletonBeanRemote.java
deleted file mode 100644 (file)
index b804700..0000000
+++ /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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jphone.phonenumbers.smsprovider;
-
-import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Remote;
-
-/**
- * A remote interface for cellphone carrier data retrieval
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Remote
-public interface AddressbookSmsProviderSingletonBeanRemote extends Serializable {
-
-       /**
-        * All registered SMS providers
-        * <p>
-        * @return A list of all SMS providers
-        */
-       List<SmsProvider> allSmsProvider ();
-}
diff --git a/src/org/mxchange/jphone/phonenumbers/smsprovider/JobsSmsProviderSingletonBeanRemote.java b/src/org/mxchange/jphone/phonenumbers/smsprovider/JobsSmsProviderSingletonBeanRemote.java
new file mode 100644 (file)
index 0000000..4659a0b
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jphone.phonenumbers.smsprovider;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+
+/**
+ * A remote interface for cellphone carrier data retrieval
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Remote
+public interface JobsSmsProviderSingletonBeanRemote extends Serializable {
+
+       /**
+        * All registered SMS providers
+        * <p>
+        * @return A list of all SMS providers
+        */
+       List<SmsProvider> allSmsProvider ();
+}