]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
Continued rewriting:
authorRoland Haeder <roland@mxchange.org>
Sat, 23 Apr 2016 10:37:54 +0000 (12:37 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 23 Apr 2016 10:37:54 +0000 (12:37 +0200)
- added missing dependency jaddressbook-core
- this project doesn't have sharing addressbooks, so methods are not implemented

lib/jaddressbook-core.jar [new file with mode: 0644]
nbproject/build-impl.xml
nbproject/genfiles.properties
src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java

diff --git a/lib/jaddressbook-core.jar b/lib/jaddressbook-core.jar
new file mode 100644 (file)
index 0000000..ddd1e07
Binary files /dev/null and b/lib/jaddressbook-core.jar differ
index 42539e68dcadb2c897f030af8549c88b30bf5b8b..889194bf3c3e447dba06be5fc0178815f9d34348 100644 (file)
@@ -879,11 +879,11 @@ exists or setup the property manually. For example like this:
             <attribute name="jar-11-Extension-Name" value="${manifest.file.reference.juser-core.jar}"/>
             <attribute name="jar-12-Extension-Name" value="${manifest.file.reference.juser-lib.jar}"/>
             <attribute name="jar-13-Extension-Name" value="${manifest.file.reference.jletter-lib.jar}"/>
-            <attribute name="jar-13-Extension-Name" value="${manifest.file.reference.jaddressbook-core.jar}"/>
-            <attribute name="jar-14-Extension-Name" value="${manifest.file.reference.jaddressbook-lib.jar}"/>
-            <attribute name="jar-14-Extension-Name" value="${manifest.file.reference.jmailer-ee.jar}"/>
-            <attribute name="jar-15-Extension-Name" value="${manifest.file.reference.jjobs-mailer.jar}"/>
-            <attribute name="jar-16-Extension-Name" value="${manifest.reference.jjobs-lib.jar}"/>
+            <attribute name="jar-14-Extension-Name" value="${manifest.file.reference.jaddressbook-core.jar}"/>
+            <attribute name="jar-15-Extension-Name" value="${manifest.file.reference.jaddressbook-lib.jar}"/>
+            <attribute name="jar-16-Extension-Name" value="${manifest.file.reference.jmailer-ee.jar}"/>
+            <attribute name="jar-17-Extension-Name" value="${manifest.file.reference.jjobs-mailer.jar}"/>
+            <attribute name="jar-18-Extension-Name" value="${manifest.reference.jjobs-lib.jar}"/>
         </manifest>
     </target>
     <target depends="compile" name="library-inclusion-in-manifest">
index f58b6c49107634748cbd3d3706b3fa379eb90a9c..f784d58f355379eeb2d92c52ff48afe414602cc7 100644 (file)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=1e826b2b
+build.xml.data.CRC32=09f25a4d
 build.xml.script.CRC32=9c0f08a9
 build.xml.stylesheet.CRC32=5910fda3@1.55.1
 # 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=1e826b2b
-nbproject/build-impl.xml.script.CRC32=4ae2c537
+nbproject/build-impl.xml.data.CRC32=09f25a4d
+nbproject/build-impl.xml.script.CRC32=1d0ab521
 nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.55.1
index f71bdd1297bca55428c0e5a8583f553287dadc45..22c4a131621395358011a84e06a601583a2b4752 100644 (file)
@@ -22,10 +22,13 @@ import java.util.List;
 import javax.ejb.Stateless;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
+import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote;
+import org.mxchange.jaddressbookcore.exceptions.AddressbookNameAlreadyUsedException;
+import org.mxchange.jaddressbookcore.exceptions.AddressbookNotFoundException;
+import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.UserAddressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.entry.AddressbookEntry;
 import org.mxchange.jcoreee.database.BaseDatabaseBean;
-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;
 
 /**
@@ -34,7 +37,7 @@ import org.mxchange.jusercore.model.user.User;
  * @author Roland Haeder<roland@mxchange.org>
  */
 @Stateless (name = "addressbook", mappedName = "ejb/stateless-jjobs-adr", description = "A stateless bean for handling JJobs addressbooks")
-public class JobsAddressbookSessionBean extends BaseDatabaseBean implements JobsAddressbookSessionBeanRemote {
+public class JobsAddressbookSessionBean extends BaseDatabaseBean implements AddressbookSessionBeanRemote {
 
        /**
         * Serial number
@@ -50,22 +53,22 @@ public class JobsAddressbookSessionBean extends BaseDatabaseBean implements Jobs
                // Validate parameter
                if (null == addressbook) {
                        // Throw NPE
-                       throw new NullPointerException("addressbook is null");
+                       throw new NullPointerException("addressbook is null"); //NOI18N
                } else if (addressbook.getAddressbookId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("addressbook.addressbookId is null");
+                       throw new NullPointerException("addressbook.addressbookId is null"); //NOI18N
                } else if (addressbook.getAddressbookId() < 1) {
                        // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookId={0} is invalid.", addressbook.getAddressbookId()));
+                       throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookId={0} is invalid.", addressbook.getAddressbookId())); //NOI18N
                } else if (addressbook.getAddressbookUser() == null) {
                        // Throw again NPE
-                       throw new NullPointerException("addressbook.addressbookUser is null");
+                       throw new NullPointerException("addressbook.addressbookUser is null"); //NOI18N
                } else if (addressbook.getAddressbookUser().getUserId() == null) {
                        // Throw again NPE
-                       throw new NullPointerException("addressbook.addressbookUser.userId is null");
+                       throw new NullPointerException("addressbook.addressbookUser.userId is null"); //NOI18N
                } else if (addressbook.getAddressbookUser().getUserId() < 1) {
                        // Invalid id number again
-                       throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookUser.userId={0} is invalid", addressbook.getAddressbookUser().getUserId()));
+                       throw new IllegalArgumentException(MessageFormat.format("addressbook.addressbookUser.userId={0} is invalid", addressbook.getAddressbookUser().getUserId())); //NOI18N
                }
 
                // Generate query
@@ -79,6 +82,16 @@ public class JobsAddressbookSessionBean extends BaseDatabaseBean implements Jobs
                return query.getResultList();
        }
 
+       @Override
+       public List<User> allUsersNotSharing (final User user, final Addressbook addressbook) {
+               throw new UnsupportedOperationException("JJobs don't have addressbok sharing (maybe yet?)"); //NOI18N
+       }
+
+       @Override
+       public Integer countAllUserSharedAddressbooks (final User user) {
+               throw new UnsupportedOperationException("JJobs don't have addressbok sharing (maybe yet?)"); //NOI18N
+       }
+
        @Override
        public Addressbook createAddressbook (final Addressbook addressbook) throws AddressbookNameAlreadyUsedException {
                // Is it not null?