From c845d4763b6e458d038181b2c82f5376eba48ac3 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 23 Apr 2016 12:28:35 +0200 Subject: [PATCH] Continued rewriting: - added new project dependency jaddressbook-lib (remote interfaces) - remove remote interfaces as they have been moved to upper mentioned lib --- lib/jaddressbook-lib.jar | Bin 0 -> 4335 bytes nbproject/project.properties | 3 + .../AddressbookSessionBeanRemote.java | 121 ------------------ .../SharedAddressbooksSessionBeanRemote.java | 71 ---------- 4 files changed, 3 insertions(+), 192 deletions(-) create mode 100644 lib/jaddressbook-lib.jar delete mode 100644 src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java delete mode 100644 src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java diff --git a/lib/jaddressbook-lib.jar b/lib/jaddressbook-lib.jar new file mode 100644 index 0000000000000000000000000000000000000000..5a076de06d42e6a6537899c613de8a8293b5d646 GIT binary patch literal 4335 zcmc&%&2Jl35TEC`apJ}_A5KeJ+PV~>RA6ra@zEL(o64pZaa`)sLph-5-G{Sgy&LVW zAx2z!LE^#{xF8|*$^i*+;J}4jrJnl-a7O$GRcChH_1m?*c9Kf0v{}EGnR)a1n>RN< znoDN^763lgez*bBvj}OZS8l7t+HO^O`~cu)NO~7Z)t`U;b|1;<&Ep%A*45owwbHy@ zs#ojWGCmisSG*$}*RZW?h1W`3xvXkQJL*2y_Cx{q@Sj&pZ{@Pr9l<@J7q|OF|4wP^ zv$tO_8kQ#e6t3IOzU^=iMPJEfbJ?MW<(M&P)X;X?%4CY%fTDY# z?QyFu5=b}Vq+Hh>;kqr`{vv_xViH@|)`gkC{K|CZ*|d0hx*&ItJ3@~s^S5>NpVbTi zz4hrbWM$N$dz$DbjMlc`)-BPsJyFt3?z#^i|M?fnd;?y}z{Ly{GH{8(DmTqfT+EzZ z+iRjqhSg^9)#eVxF^p2DhZLIa2qo|!EfwM_$LJ)5Bywq2k<=_-+3D~vxzh6tQ`s?G zugqYvX|yfw^&G+Am;XnLcVjk9wEcb5_kw2kEKd!5Nd6PLWTDI8y_t;|c*DfHP-<9+ zZFDcjr!725;LGiYoEp7UvUY^#l~j0Q|{`3!+zkgXhOVxMZ<&A^Me#Dfw*hitm_0&VNd$wQGzQ58@I6Jjjp(3xJJtqs%6=p-yX44R{g>}P(-Jt1lWri z^!#=c-W_bBIfvb63r67ar1y}^Y zZx&AC{u1t|@teb)=ipRGxs2--SPj=}xX#16#BmyT&cO4&tPMEp%RlG;eF4tncOGdk z$d@g;%Dn14JpUVNMsEX&A|8|+IEdPyfscazXx>EI@97Nn_q7b)t*_h9|oivkyDdEiab0(lu<{I$Co+8 zfN}Uj=n~+{Nu*c;nn_ZKFZA~mEaR8ZVTI6vrSfx==QgCoXBqxg=^Kt_!4x-S9XH1j z13mZe(Z~_9N>iPD__#UCXZH_(h(F1XNgQNj@Q}Ly;m?TYlUQjE3m#%U%VMl@)g_6c zxojxr<0LUpr?jC9;|?IF4TXI_UD&Kz(%d!_{Ajx10aU~-kI!*WrQW}HE|uWGL?9cj tb-%5|kB)b-;n6>0Z;gaq_DXQ{z?@ltW^nikYTj5;S-6aC^AA7Ko&euh6;l8J literal 0 HcmV?d00001 diff --git a/nbproject/project.properties b/nbproject/project.properties index 2e8327e..07caaaa 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -31,6 +31,7 @@ dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= file.reference.jaddressbook-core.jar=lib/jaddressbook-core.jar +file.reference.jaddressbook-lib.jar=lib/jaddressbook-lib.jar file.reference.jcontacts-business-core.jar=lib/jcontacts-business-core.jar file.reference.jcontacts-core.jar=lib/jcontacts-core.jar file.reference.jcore-logger-lib.jar=lib/jcore-logger-lib.jar @@ -55,6 +56,7 @@ javac.classpath=\ ${file.reference.juser-core.jar}:\ ${file.reference.juser-lib.jar}:\ ${file.reference.jaddressbook-core.jar}:\ + ${file.reference.jaddressbook-lib.jar}:\ ${libs.javaee-api-7.0.classpath}:\ ${libs.jpa20-persistence.classpath} # Space-separated list of extra javac options @@ -107,6 +109,7 @@ run.test.classpath=\ ${build.test.classes.dir} source.encoding=UTF-8 source.reference.jaddressbook-core.jar=../jaddressbook-core/src/ +source.reference.jaddressbook-lib.jar=../jaddressbook-lib/src/ source.reference.jcontacts-business-core.jar=../jcontacts-business-core/src/ source.reference.jcontacts-core.jar=../jcontacts-core/src/ source.reference.jcore-logger-lib.jar=../jcore-logger-lib/src/ diff --git a/src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java b/src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java deleted file mode 100644 index bfc99a4..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java +++ /dev/null @@ -1,121 +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.addressbook.model.addressbook; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -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.entry.AddressbookEntry; -import org.mxchange.jusercore.model.user.User; - -/** - * A remote session interface for addressbook handling - *

- * @author Roland Haeder - */ -@Remote -public interface AddressbookSessionBeanRemote extends Serializable { - - /** - * Retrieves a list of all users this user is not sharing the given address - * book with. - *

- * @param user User instance - * @param addressbook Address book instance - *

- * @return List of users - */ - List allUsersNotSharing (final User user, final Addressbook addressbook); - - /** - * Count all shared address books by given user - *

- * @param user User instance - *

- * @return Count of all user's shared address books - */ - Integer countAllUserSharedAddressbooks (final User user); - - /** - * Some getter for an address book instance from given id number. If the - * address book is not found, an exception is thrown. - *

- * @param addressbookId Id number for address book instance - *

- * @return Address book instance - *

- * @throws org.mxchange.jaddressbookcore.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. - *

- * @param addressbook Address book instance - *

- * @return List of all entries - */ - List allEntries (final Addressbook addressbook); - - /** - * Some "getter" for a list of address books the logged-in user has created - *

- * @param loggedInUser Logged-in user - *

- * @return List of all address books - */ - List getUsersAddressbookList (final User loggedInUser); - - /** - * Creates given address book by persisting it. A User instance must be set, - * else an exception is thrown. - *

- * @param addressbook Address book instance to create - *

- * @return Updated address book instance - *

- * @throws - * org.mxchange.jaddressbookcore.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). - *

- * @param addressbookId Address book id to check - *

- * @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. - *

- * @param addressbook Address bok instance to check - *

- * @return Whether the name has already been used by the user - */ - boolean isAddressbookNameUsed (final Addressbook addressbook); -} diff --git a/src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java b/src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java deleted file mode 100644 index c0e0bc0..0000000 --- a/src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java +++ /dev/null @@ -1,71 +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.addressbook.model.shared; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; -import org.mxchange.jaddressbookcore.exceptions.UserAlreadySharingAddressbookException; -import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; -import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook; -import org.mxchange.jusercore.model.user.User; - -/** - * A remote interface for sharing address books - *

- * @author Roland Haeder - */ -@Remote -public interface SharedAddressbooksSessionBeanRemote extends Serializable { - - /** - * Retrieves a list of all user's shared address books. The list contains - * only the shares. But the address books and sharee can be easily - * extracted. - *

- * @param user User instance to get list of shared address books (shares) - * from - * - * @return List of shares (= shared address book entries) - */ - List allSharedAddressbooks (final User user); - - /** - * Starts an address book share between currently logged-in user and - * assigned user for current address book. - *

- * @param sharee User sharee instance - * @param addressbook Address book instance - * - * @return Updated share instance - * - * @throws - * org.mxchange.addressbook.exceptions.UserAlreadySharingAddressbookException - * When the user is already sharing the address book - */ - ShareableAddressbook startSharing (final User sharee, final Addressbook addressbook) throws UserAlreadySharingAddressbookException; - - /** - * Checks if the given user is sharing address books with others - *

- * @param user User instance - * - * @return Whether the user is sharing address books - */ - Boolean isUserSharingAddressbooks (final User user); - -} -- 2.39.5