From 553d6b9094729cf96d984f582094523774110f09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 19 Apr 2016 16:29:28 +0200 Subject: [PATCH] Refacture: - moved model (entities) files to jaddressbook-care - added new dependency jaddressbook-core.jar --- lib/jaddressbook-core.jar | Bin 0 -> 34116 bytes nbproject/project.properties | 242 +++++++++--------- .../addressbook/AddressbookLoadedEvent.java | 35 --- .../addressbook/LoadedAddressbookEvent.java | 51 ---- .../sharing/AddressbookSharingEvent.java | 43 ---- .../sharing/EndedAddressbookSharingEvent.java | 58 ----- .../StartedAddressbookSharingEvent.java | 58 ----- .../events/sharing/type/SharingType.java | 36 --- .../AddressbookNameAlreadyUsedException.java | 43 ---- .../AddressbookNotFoundException.java | 43 ---- ...serAlreadySharingAddressbookException.java | 44 ---- .../model/addressbook/Addressbook.java | 134 ---------- .../AddressbookSessionBeanRemote.java | 11 +- .../model/addressbook/UserAddressbook.java | 237 ----------------- .../addressbook/entry/AddressbookEntry.java | 107 -------- .../entry/UserAddressbookEntry.java | 178 ------------- .../addressbook/shared/AddressbookShare.java | 232 ----------------- .../shared/ShareableAddressbook.java | 106 -------- .../addressbook/status/AddressbokStatus.java | 60 ----- .../SharedAddressbooksSessionBeanRemote.java | 6 +- .../addressbook/AddressbookIdValidator.java | 4 +- 21 files changed, 134 insertions(+), 1594 deletions(-) create mode 100644 lib/jaddressbook-core.jar delete mode 100644 src/org/mxchange/addressbook/events/addressbook/AddressbookLoadedEvent.java delete mode 100644 src/org/mxchange/addressbook/events/addressbook/LoadedAddressbookEvent.java delete mode 100644 src/org/mxchange/addressbook/events/sharing/AddressbookSharingEvent.java delete mode 100644 src/org/mxchange/addressbook/events/sharing/EndedAddressbookSharingEvent.java delete mode 100644 src/org/mxchange/addressbook/events/sharing/StartedAddressbookSharingEvent.java delete mode 100644 src/org/mxchange/addressbook/events/sharing/type/SharingType.java delete mode 100644 src/org/mxchange/addressbook/exceptions/AddressbookNameAlreadyUsedException.java delete mode 100644 src/org/mxchange/addressbook/exceptions/AddressbookNotFoundException.java delete mode 100644 src/org/mxchange/addressbook/exceptions/UserAlreadySharingAddressbookException.java delete mode 100644 src/org/mxchange/addressbook/model/addressbook/Addressbook.java delete mode 100644 src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java delete mode 100644 src/org/mxchange/addressbook/model/addressbook/entry/AddressbookEntry.java delete mode 100644 src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java delete mode 100644 src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java delete mode 100644 src/org/mxchange/addressbook/model/addressbook/shared/ShareableAddressbook.java delete mode 100644 src/org/mxchange/addressbook/model/addressbook/status/AddressbokStatus.java diff --git a/lib/jaddressbook-core.jar b/lib/jaddressbook-core.jar new file mode 100644 index 0000000000000000000000000000000000000000..658c2f7f7558efa17259f0c6f3e3a0d69c8d4204 GIT binary patch literal 34116 zcmeHQX>c6Jb$$aZFu-C!0^ofwF9{a`9y$q%BnW~MNDv?ikTONn@Ddo35Er{7b|I0v zZ&|V~>$DErvMx)CY#o#=N{VFpid`-%DW@uSrJO3+KkQVJayiKlSLLWA-|Oz#>6x89 z0a`9cK<)1IO!w>8*X!5cd)>2ZM|mhrR7KQr>qD23_E$|I+SxtWxvHmcTl@d~glJbf z>Uu=|{EAytcud?H*WRC3D6iPzlDhIh$g_27ijgF7TbJgM6Vo9Y=9nV!+P5J4a9JY^h z`{$~#6?w^wB}VL6jyhUhAcewe{DKmwp-+sT%E94oq0J`BS5drPIrLyCZZ$uNH>p?w&7Sbnf%HBy!!!YuA>^0s!XajDQwWRBX&wl zWYDI@re2l+>G7R0Xk{nJl52-S;eo`&_^`cgG-eyLKqIbmbY=9as6m(J&Z*!68dS#w z+hdSO?fr+Yw1-m$%@nsr6YT@`_-HgXdQJ3D%&s)ZpfY^QQ58nWfXuGoE2_kI8JS+e z_wN4CZ$F2a{3)qDWRbNx2x^bTVQ?|G8Z6B-X}(DdOj?K%B?a4R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DEm88`~~*E7{Sf| zr#Sqxr2I3^_#ei3ib;RQ{uAWgj2A91B4f6k6?&e$p9TNf$}S7H!vL1M?3p57Yl7gW z_Me#QX15rVc(K`ug1dq&I7|PL1#XsgTZ+$8PBU6L#eR+8oc&vr-JG9*Nw3(#%A9>g z&XK#{UDnP09$1Zv&0S4>TETf(XBp6b)Yr{=bG+oNMSgy0E^t`+(JD84bG(G?gE1MW V$twVf;aDF0-(V5F#;0)5{{dN(K$!pl literal 0 HcmV?d00001 diff --git a/nbproject/project.properties b/nbproject/project.properties index db1defa..b9bf42d 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,119 +1,123 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=true -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=addressbook-lib -application.vendor=Roland Haeder -auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml -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}/addressbook-lib.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -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 -file.reference.jcore-swing.jar=lib/jcore-swing.jar -file.reference.jcore.jar=lib/jcore.jar -file.reference.jcoreee.jar=lib/jcoreee.jar -file.reference.jcountry-core.jar=lib/jcountry-core.jar -file.reference.jphone-core.jar=lib/jphone-core.jar -file.reference.juser-core.jar=lib\\juser-core.jar -file.reference.juser-lib.jar=lib/juser-lib.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.jcore.jar}:\ - ${file.reference.jcoreee.jar}:\ - ${file.reference.jcore-swing.jar}:\ - ${file.reference.jcore-logger-lib.jar}:\ - ${file.reference.jcountry-core.jar}:\ - ${file.reference.jphone-core.jar}:\ - ${file.reference.jcontacts-core.jar}:\ - ${file.reference.jcontacts-business-core.jar}:\ - ${file.reference.juser-core.jar}:\ - ${file.reference.juser-lib.jar}:\ - ${libs.javaee-api-7.0.classpath}:\ - ${libs.jpa20-persistence.classpath} -# Space-separated list of extra javac options -javac.compilerargs=-Xlint:deprecation -Xlint:unchecked -javac.deprecation=true -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=true -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=true -javadoc.splitindex=true -javadoc.use=true -javadoc.version=true -javadoc.windowtitle=Addressbook Library -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed -manifest.custom.codebase= -# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) -manifest.custom.permissions= -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=true -platform.active=default_platform -project.license=gpl30 -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -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/ -source.reference.jcore-swing.jar=../jcore-swing/src -source.reference.jcore.jar=../jcore/src -source.reference.jcoreee.jar=../jcoreee/src/ -source.reference.jcountry-core.jar=../jcountry-core/src/ -source.reference.jphone-core.jar=../jphone-core/src/ -source.reference.juser-core.jar=../juser-core/src/ -source.reference.juser-lib.jar=../juser-lib/src/ -src.dir=src -test.src.dir=test +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=addressbook-lib +application.vendor=Roland Haeder +auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml +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}/addressbook-lib.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.jaddressbook-core.jar=lib/jaddressbook-core.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 +file.reference.jcore-swing.jar=lib/jcore-swing.jar +file.reference.jcore.jar=lib/jcore.jar +file.reference.jcoreee.jar=lib/jcoreee.jar +file.reference.jcountry-core.jar=lib/jcountry-core.jar +file.reference.jphone-core.jar=lib/jphone-core.jar +file.reference.juser-core.jar=lib\\juser-core.jar +file.reference.juser-lib.jar=lib/juser-lib.jar +includes=** +jar.archive.disabled=${jnlp.enabled} +jar.compress=false +jar.index=${jnlp.enabled} +javac.classpath=\ + ${file.reference.jcore.jar}:\ + ${file.reference.jcoreee.jar}:\ + ${file.reference.jcore-swing.jar}:\ + ${file.reference.jcore-logger-lib.jar}:\ + ${file.reference.jcountry-core.jar}:\ + ${file.reference.jphone-core.jar}:\ + ${file.reference.jcontacts-core.jar}:\ + ${file.reference.jcontacts-business-core.jar}:\ + ${file.reference.juser-core.jar}:\ + ${file.reference.juser-lib.jar}:\ + ${file.reference.jaddressbook-core.jar}:\ + ${libs.javaee-api-7.0.classpath}:\ + ${libs.jpa20-persistence.classpath} +# Space-separated list of extra javac options +javac.compilerargs=-Xlint:deprecation -Xlint:unchecked +javac.deprecation=true +javac.external.vm=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=true +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=true +javadoc.splitindex=true +javadoc.use=true +javadoc.version=true +javadoc.windowtitle=Addressbook Library +jnlp.codebase.type=no.codebase +jnlp.descriptor=application +jnlp.enabled=false +jnlp.mixed.code=default +jnlp.offline-allowed=false +jnlp.signed=false +jnlp.signing= +jnlp.signing.alias= +jnlp.signing.keystore= +# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed +manifest.custom.codebase= +# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) +manifest.custom.permissions= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=true +platform.active=default_platform +project.license=gpl30 +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +source.reference.jaddressbook-core.jar=../jaddressbook-core/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/ +source.reference.jcore-swing.jar=../jcore-swing/src +source.reference.jcore.jar=../jcore/src +source.reference.jcoreee.jar=../jcoreee/src/ +source.reference.jcountry-core.jar=../jcountry-core/src/ +source.reference.jphone-core.jar=../jphone-core/src/ +source.reference.juser-core.jar=../juser-core/src/ +source.reference.juser-lib.jar=../juser-lib/src/ +src.dir=src +test.src.dir=test diff --git a/src/org/mxchange/addressbook/events/addressbook/AddressbookLoadedEvent.java b/src/org/mxchange/addressbook/events/addressbook/AddressbookLoadedEvent.java deleted file mode 100644 index 655760d..0000000 --- a/src/org/mxchange/addressbook/events/addressbook/AddressbookLoadedEvent.java +++ /dev/null @@ -1,35 +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.events.addressbook; - -import java.io.Serializable; -import org.mxchange.addressbook.model.addressbook.Addressbook; - -/** - * An interface for an event if an address book has been loaded - *

- * @author Roland Haeder - */ -public interface AddressbookLoadedEvent extends Serializable { - - /** - * Getter for address book instance - *

- * @return Address book instance - */ - Addressbook getAddressbook (); -} diff --git a/src/org/mxchange/addressbook/events/addressbook/LoadedAddressbookEvent.java b/src/org/mxchange/addressbook/events/addressbook/LoadedAddressbookEvent.java deleted file mode 100644 index 8ee3729..0000000 --- a/src/org/mxchange/addressbook/events/addressbook/LoadedAddressbookEvent.java +++ /dev/null @@ -1,51 +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.events.addressbook; - -import org.mxchange.addressbook.model.addressbook.Addressbook; - -/** - * An event fired when an address book has been loaded - *

- * @author Roland Haeder - */ -public class LoadedAddressbookEvent implements AddressbookLoadedEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 1L; - - /** - * Adress book instance causing this event - */ - private final Addressbook addressbook; - - /** - * Constructor with address book instance - *

- * @param addressbook Address book instance - */ - public LoadedAddressbookEvent (final Addressbook addressbook) { - this.addressbook = addressbook; - } - - @Override - public Addressbook getAddressbook () { - return this.addressbook; - } -} diff --git a/src/org/mxchange/addressbook/events/sharing/AddressbookSharingEvent.java b/src/org/mxchange/addressbook/events/sharing/AddressbookSharingEvent.java deleted file mode 100644 index c539e98..0000000 --- a/src/org/mxchange/addressbook/events/sharing/AddressbookSharingEvent.java +++ /dev/null @@ -1,43 +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.events.sharing; - -import java.io.Serializable; -import org.mxchange.addressbook.events.sharing.type.SharingType; -import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook; - -/** - * An interface for address book sharing events - *

- * @author Roland Haeder - */ -public interface AddressbookSharingEvent extends Serializable { - - /** - * Getter for address book share instance - *

- * @return Address book share instance - */ - ShareableAddressbook getShareableAddressbook (); - - /** - * Getter for sharing type enum - *

- * @return Sharing type enum - */ - SharingType getSharingType (); -} diff --git a/src/org/mxchange/addressbook/events/sharing/EndedAddressbookSharingEvent.java b/src/org/mxchange/addressbook/events/sharing/EndedAddressbookSharingEvent.java deleted file mode 100644 index 1116d81..0000000 --- a/src/org/mxchange/addressbook/events/sharing/EndedAddressbookSharingEvent.java +++ /dev/null @@ -1,58 +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.events.sharing; - -import org.mxchange.addressbook.events.sharing.type.SharingType; -import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook; - -/** - * An event fired when a user ends sharing address books - *

- * @author Roland Haeder - */ -public class EndedAddressbookSharingEvent implements AddressbookSharingEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 152_896_748_186_018_497L; - - /** - * Shared address book entry - */ - private final ShareableAddressbook shareableAddressbook; - - /** - * Constructor with address book share entry - *

- * @param share Address book share entry - */ - public EndedAddressbookSharingEvent (final ShareableAddressbook share) { - this.shareableAddressbook = share; - } - - @Override - public ShareableAddressbook getShareableAddressbook () { - return this.shareableAddressbook; - } - - @Override - public SharingType getSharingType () { - // Started sharing - return SharingType.ENDED; - } -} diff --git a/src/org/mxchange/addressbook/events/sharing/StartedAddressbookSharingEvent.java b/src/org/mxchange/addressbook/events/sharing/StartedAddressbookSharingEvent.java deleted file mode 100644 index 36e0d4f..0000000 --- a/src/org/mxchange/addressbook/events/sharing/StartedAddressbookSharingEvent.java +++ /dev/null @@ -1,58 +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.events.sharing; - -import org.mxchange.addressbook.events.sharing.type.SharingType; -import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook; - -/** - * An event fired when a user starts sharing address books - *

- * @author Roland Haeder - */ -public class StartedAddressbookSharingEvent implements AddressbookSharingEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 152_896_748_186_018_497L; - - /** - * Shared address book entry - */ - private final ShareableAddressbook shareableAddressbook; - - /** - * Constructor with address book share entry - *

- * @param share Address book share entry - */ - public StartedAddressbookSharingEvent (final ShareableAddressbook share) { - this.shareableAddressbook = share; - } - - @Override - public ShareableAddressbook getShareableAddressbook () { - return this.shareableAddressbook; - } - - @Override - public SharingType getSharingType () { - // Started sharing - return SharingType.STARTED; - } -} diff --git a/src/org/mxchange/addressbook/events/sharing/type/SharingType.java b/src/org/mxchange/addressbook/events/sharing/type/SharingType.java deleted file mode 100644 index c924ae4..0000000 --- a/src/org/mxchange/addressbook/events/sharing/type/SharingType.java +++ /dev/null @@ -1,36 +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.events.sharing.type; - -/** - * An enumeration for sharing types - *

- * @author Roland Haeder - */ -public enum SharingType { - - /** - * Sharing has been started - */ - STARTED, - - /** - * Sharing has been ended - */ - ENDED; - -} diff --git a/src/org/mxchange/addressbook/exceptions/AddressbookNameAlreadyUsedException.java b/src/org/mxchange/addressbook/exceptions/AddressbookNameAlreadyUsedException.java deleted file mode 100644 index da12890..0000000 --- a/src/org/mxchange/addressbook/exceptions/AddressbookNameAlreadyUsedException.java +++ /dev/null @@ -1,43 +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.exceptions; - -import java.text.MessageFormat; -import org.mxchange.addressbook.model.addressbook.Addressbook; - -/** - * An exception thrown when the user has already used the name. - *

- * @author Roland Haeder - */ -public class AddressbookNameAlreadyUsedException extends Exception { - - /** - * Serial number - */ - private static final long serialVersionUID = 58_169_748_928_767_381L; - - /** - * Constructor with address book instance - *

- * @param addressbook Address book instance - */ - public AddressbookNameAlreadyUsedException (final Addressbook addressbook) { - super(MessageFormat.format("User {0} has already used the name {1}.", addressbook.getAddressbookUser(), addressbook.getAddressbookName())); //NOI18N - } - -} diff --git a/src/org/mxchange/addressbook/exceptions/AddressbookNotFoundException.java b/src/org/mxchange/addressbook/exceptions/AddressbookNotFoundException.java deleted file mode 100644 index e17dc15..0000000 --- a/src/org/mxchange/addressbook/exceptions/AddressbookNotFoundException.java +++ /dev/null @@ -1,43 +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.exceptions; - -import java.text.MessageFormat; - -/** - * An exception thrown when the address book's id number is not valid, so no - * address book can be found. - *

- * @author Roland Haeder - */ -public class AddressbookNotFoundException extends Exception { - - /** - * Serial number - */ - private static final long serialVersionUID = 14_986_976_417_658_920L; - - /** - * Creates an exception with given id number that could not be found. - *

- * @param addressbookId Address book id number - */ - public AddressbookNotFoundException (final Long addressbookId) { - super(MessageFormat.format("Address book with id number {0} does not exist.", addressbookId)); - } - -} diff --git a/src/org/mxchange/addressbook/exceptions/UserAlreadySharingAddressbookException.java b/src/org/mxchange/addressbook/exceptions/UserAlreadySharingAddressbookException.java deleted file mode 100644 index a6e0d48..0000000 --- a/src/org/mxchange/addressbook/exceptions/UserAlreadySharingAddressbookException.java +++ /dev/null @@ -1,44 +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.exceptions; - -import java.text.MessageFormat; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.jusercore.model.user.User; - -/** - * An exception thrown whent the address book is already shared with given user - *

- * @author Roland Haeder - */ -public class UserAlreadySharingAddressbookException extends Exception { - - /** - * Serial number - */ - private static final long serialVersionUID = 58_528_177_571_976_034L; - - /** - * Constructor with address book being already shared with sharee - *

- * @param addressbook Address book instance - * @param sharee User instance the address book is being shared with - */ - public UserAlreadySharingAddressbookException (final Addressbook addressbook, final User sharee) { - super(MessageFormat.format("Address book id {0} owned by user {1} is already shared with user {2}", addressbook.getAddressbookId(), addressbook.getAddressbookUser().getUserId(), sharee.getUserId())); - } -} diff --git a/src/org/mxchange/addressbook/model/addressbook/Addressbook.java b/src/org/mxchange/addressbook/model/addressbook/Addressbook.java deleted file mode 100644 index d4d4640..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/Addressbook.java +++ /dev/null @@ -1,134 +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.Calendar; -import org.mxchange.addressbook.model.addressbook.status.AddressbokStatus; -import org.mxchange.jusercore.model.user.User; - -/** - * A POJI for addressbooks - *

- * @author Roland Haeder - */ -public interface Addressbook extends Serializable { - - /** - * Getter for id number - *

- * @return Id number - */ - Long getAddressbookId (); - - /** - * Setter for id number - *

- * @param addressbookId Id number - */ - void setAddressbookId (final Long addressbookId); - - /** - * Getter for addressbook creation timestamp - *

- * @return Addressbook creation timestamp - */ - Calendar getAddressbookCreated (); - - /** - * Setter for addressbook creation timestamp - *

- * @param addressbookCreated Addressbook creation timestamp - */ - void setAddressbookCreated (final Calendar addressbookCreated); - - /** - * Getter for addressbook's name - *

- * @return Addressbook's name - */ - String getAddressbookName (); - - /** - * Setter for addressbook's name - *

- * @param addressbookName Addressbook's name - */ - void setAddressbookName (final String addressbookName); - - /** - * Getter for addressbook status - *

- * @return Addressbook status - */ - AddressbokStatus getAddressbookStatus (); - - /** - * Setter for addressbook status - *

- * @param addressbookStatus Addressbook status - */ - void setAddressbookStatus (final AddressbokStatus addressbookStatus); - - /** - * Getter for addressbook's user (owner) - *

- * @return Addressbook's user (owner) - */ - User getAddressbookUser (); - - /** - * Setter for addressbook's user (owner) - *

- * @param addressbookUser Addressbook's user (owner) - */ - void setAddressbookUser (final User addressbookUser); - - /** - * Getter for last locked timestamp - *

- * @return Last locked timestamp - */ - Calendar getAddressbookLastLocked (); - - /** - * Setter for last locked timestamp - *

- * @param addressbookLastLocked Last locked timestamp - */ - void setAddressbookLastLocked (final Calendar addressbookLastLocked); - - /** - * Getter for last locked reason - *

- * @return Last locked reason - */ - String getAddressbookLastLockedReason (); - - /** - * Getter for last locked reason - *

- * @param addressbookLastLockedReason Last locked reason - */ - void setAddressbookLastLockedReason (final String addressbookLastLockedReason); - - @Override - boolean equals (final Object object); - - @Override - int hashCode (); -} diff --git a/src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java b/src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java index 1d27563..bfc99a4 100644 --- a/src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java +++ b/src/org/mxchange/addressbook/model/addressbook/AddressbookSessionBeanRemote.java @@ -19,9 +19,10 @@ package org.mxchange.addressbook.model.addressbook; import java.io.Serializable; import java.util.List; import javax.ejb.Remote; -import org.mxchange.addressbook.exceptions.AddressbookNameAlreadyUsedException; -import org.mxchange.addressbook.exceptions.AddressbookNotFoundException; -import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry; +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; /** @@ -60,7 +61,7 @@ public interface AddressbookSessionBeanRemote extends Serializable { *

* @return Address book instance *

- * @throws org.mxchange.addressbook.exceptions.AddressbookNotFoundException + * @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 @@ -95,7 +96,7 @@ public interface AddressbookSessionBeanRemote extends Serializable { * @return Updated address book instance *

* @throws - * org.mxchange.addressbook.exceptions.AddressbookNameAlreadyUsedException + * 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; diff --git a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java deleted file mode 100644 index ce02a36..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java +++ /dev/null @@ -1,237 +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.util.Calendar; -import java.util.Objects; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.Lob; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import org.mxchange.addressbook.model.addressbook.status.AddressbokStatus; -import org.mxchange.jusercore.model.user.LoginUser; -import org.mxchange.jusercore.model.user.User; - -/** - * A POJO for user addressbooks - *

- * @author Roland Haeder - */ -@Entity (name = "addressbooks") -@Table (name = "addressbooks") -@NamedQueries ( - { - @NamedQuery (name = "AllUsersAddressbooks", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookUser = :param ORDER BY a.addressbookId ASC"), - @NamedQuery (name = "SearchUserAddressbookName", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookUser = :user AND LOWER(a.addressbookName) LIKE LOWER(:name)"), - @NamedQuery (name = "SearchAddressbookById", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookId = :id") - } -) -public class UserAddressbook implements Addressbook { - - /** - * Serial number - */ - private static final long serialVersionUID = 176_573_148_678_169L; - - /** - * When this address book has been created - */ - @Basic (optional = false) - @Temporal (value = TemporalType.TIMESTAMP) - @Column (name = "addressbook_created", nullable = false, updatable = false) - private Calendar addressbookCreated; - - /** - * Id number - */ - @Id - @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "addressbook_id", nullable = false, updatable = false) - private Long addressbookId; - - /** - * Last locked timestamp - */ - @Temporal (TemporalType.TIMESTAMP) - @Column (name = "addressbook_last_locked") - private Calendar addressbookLastLocked; - - /** - * Last locked timestamp - */ - @Lob - @Column (name = "addressbook_last_locked_reason") - private String addressbookLastLockedReason; - - /** - * Name for this address book - */ - @Basic (optional = false) - @Column (name = "addressbook_name", length = 50, nullable = false) - private String addressbookName; - - /** - * Adress book status - */ - @Basic (optional = false) - @Enumerated (EnumType.STRING) - @Column (name = "addressbook_status", nullable = false, length = 10) - private AddressbokStatus addressbookStatus; - - /** - * Connection to "users" table - */ - @JoinColumn (name = "addressbook_user_id", nullable = false) - @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false) - private User addressbookUser; - - /** - * Public constructor with address book name - *

- * @param addressbookName Address book name - * @param addressbookUser User instance - */ - public UserAddressbook (final String addressbookName, final User addressbookUser) { - // Call default constructor - this(); - - // Set name, user instance - this.addressbookName = addressbookName; - this.addressbookUser = addressbookUser; - } - - /** - * Default constructor - */ - public UserAddressbook () { - // Set status to UNLOCKED - this.addressbookStatus = AddressbokStatus.UNLOCKED; - } - - @Override - public boolean equals (final Object object) { - if (this == object) { - return true; - } else if (null == object) { - return false; - } else if (this.getClass() != object.getClass()) { - return false; - } - - final Addressbook other = (Addressbook) object; - - if (!Objects.equals(this.getAddressbookName(), other.getAddressbookName())) { - return false; - } else if (!Objects.equals(this.getAddressbookUser(), other.getAddressbookUser())) { - return false; - } - - return true; - } - - @Override - public int hashCode () { - int hash = 7; - hash = 59 * hash + Objects.hashCode(this.getAddressbookName()); - hash = 59 * hash + Objects.hashCode(this.getAddressbookUser()); - return hash; - } - - @Override - public Calendar getAddressbookCreated () { - return this.addressbookCreated; - } - - @Override - public void setAddressbookCreated (final Calendar addressbookCreated) { - this.addressbookCreated = addressbookCreated; - } - - @Override - public Long getAddressbookId () { - return this.addressbookId; - } - - @Override - public void setAddressbookId (final Long addressbookId) { - this.addressbookId = addressbookId; - } - - @Override - public Calendar getAddressbookLastLocked () { - return this.addressbookLastLocked; - } - - @Override - public void setAddressbookLastLocked (final Calendar addressbookLastLocked) { - this.addressbookLastLocked = addressbookLastLocked; - } - - @Override - public String getAddressbookLastLockedReason () { - return this.addressbookLastLockedReason; - } - - @Override - public void setAddressbookLastLockedReason (final String addressbookLastLockedReason) { - this.addressbookLastLockedReason = addressbookLastLockedReason; - } - - @Override - public String getAddressbookName () { - return this.addressbookName; - } - - @Override - public void setAddressbookName (final String addressbookName) { - this.addressbookName = addressbookName; - } - - @Override - public AddressbokStatus getAddressbookStatus () { - return this.addressbookStatus; - } - - @Override - public void setAddressbookStatus (final AddressbokStatus addressbookStatus) { - this.addressbookStatus = addressbookStatus; - } - - @Override - public User getAddressbookUser () { - return this.addressbookUser; - } - - @Override - public void setAddressbookUser (final User addressbookUser) { - this.addressbookUser = addressbookUser; - } - -} diff --git a/src/org/mxchange/addressbook/model/addressbook/entry/AddressbookEntry.java b/src/org/mxchange/addressbook/model/addressbook/entry/AddressbookEntry.java deleted file mode 100644 index 1b0898b..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/entry/AddressbookEntry.java +++ /dev/null @@ -1,107 +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.entry; - -import java.io.Serializable; -import java.util.Calendar; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontactsbusiness.BusinessContact; - -/** - * A POJI for addressbook entries - *

- * @author Roland Haeder - */ -public interface AddressbookEntry extends Serializable { - - /** - * Getter for id number - *

- * @return Id number - */ - Long getAddressbookEntryId (); - - /** - * Setter for id number - *

- * @param addressbookEntryId Id number - */ - void setAddressbookEntryId (final Long addressbookEntryId); - - /** - * Getter for business contact - *

- * @return Business contact - */ - BusinessContact getAddressbookEntryBusinessContact (); - - /** - * Setter for business contact - *

- * @param addressbookEntryBusinessContact Business contact - */ - void setAddressbookEntryBusinessContact (final BusinessContact addressbookEntryBusinessContact); - - /** - * Getter for entry created timestamp - *

- * @return Entry created timestamp - */ - Calendar getAddressbookEntryCreated (); - - /** - * Setter for entry created timestamp - *

- * @param addressbookEntryCreated Entry created timestamp - */ - void setAddressbookEntryCreated (final Calendar addressbookEntryCreated); - - /** - * Getter for private contact - *

- * @return Private contact - */ - Contact getAddressbookEntryPrivateContact (); - - /** - * Setter for private contact - *

- * @param addressbookEntryPrivateContact Private contact - */ - void setAddressbookEntryPrivateContact (final Contact addressbookEntryPrivateContact); - - /** - * Getter for address book - *

- * @return Address book - */ - Addressbook getAddressbookId (); - - /** - * Setter for address book - *

- * @param addressbookId Address book - */ - void setAddressbookId (final Addressbook addressbookId); - - @Override - boolean equals (final Object object); - - @Override - int hashCode (); -} diff --git a/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java b/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java deleted file mode 100644 index 8af65ce..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/entry/UserAddressbookEntry.java +++ /dev/null @@ -1,178 +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.entry; - -import java.util.Calendar; -import java.util.Objects; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.addressbook.model.addressbook.UserAddressbook; -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontacts.contact.UserContact; -import org.mxchange.jcontactsbusiness.BusinessContact; -import org.mxchange.jcontactsbusiness.CompanyContact; - -/** - * A POJO for address book entries - *

- * @author Roland Haeder - */ -@Entity (name = "addressbook_entries") -@Table (name = "addressbook_entries") -@NamedQueries ( - @NamedQuery ( - name = "SearchUsersAddressbookEntries", - query = "SELECT e FROM addressbook_entries AS e INNER JOIN addressbooks AS a ON e.addressbookId = a WHERE e.addressbookId = :addressbook AND a.addressbookUser = :owner ORDER BY e.addressbookEntryId ASC") -) -public class UserAddressbookEntry implements AddressbookEntry { - - /** - * Serial number - */ - private static final long serialVersionUID = 178_581_768_581_960L; - - /** - * Connection to table "business_contacts" (commercial contacts) - */ - @JoinColumn (name = "entry_business_contact_id", updatable = false) - @OneToOne (targetEntity = CompanyContact.class, cascade = CascadeType.REFRESH) - private BusinessContact addressbookEntryBusinessContact; - - /** - * When this address book entry has been created - */ - @Basic (optional = false) - @Temporal (TemporalType.TIMESTAMP) - @Column (name = "entry_created", nullable = false, updatable = false) - private Calendar addressbookEntryCreated; - - /** - * Id number - */ - @Id - @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "entry_id", nullable = false, updatable = false) - private Long addressbookEntryId; - - /** - * Connection to table "contacts" (private contacts) - */ - @JoinColumn (name = "entry_private_contact_id", updatable = false) - @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH) - private Contact addressbookEntryPrivateContact; - - /** - * Connection to table "addressbooks" - */ - @JoinColumn (name = "entry_addressbook_id", nullable = false, updatable = false) - @OneToOne (targetEntity = UserAddressbook.class, cascade = CascadeType.REFRESH, optional = false) - private Addressbook addressbookId; - - @Override - public boolean equals (final Object object) { - if (null == object) { - return false; - } else if (this.getClass() != object.getClass()) { - return false; - } - - final AddressbookEntry other = (AddressbookEntry) object; - - if (!Objects.equals(this.getAddressbookEntryBusinessContact(), other.getAddressbookEntryBusinessContact())) { - return false; - } else if (!Objects.equals(this.getAddressbookEntryPrivateContact(), other.getAddressbookEntryPrivateContact())) { - return false; - } else if (!Objects.equals(this.getAddressbookId(), other.getAddressbookId())) { - return false; - } - - return true; - } - - @Override - public int hashCode () { - int hash = 3; - hash = 19 * hash + Objects.hashCode(this.getAddressbookEntryBusinessContact()); - hash = 19 * hash + Objects.hashCode(this.getAddressbookEntryPrivateContact()); - hash = 19 * hash + Objects.hashCode(this.getAddressbookId()); - return hash; - } - - @Override - public BusinessContact getAddressbookEntryBusinessContact () { - return this.addressbookEntryBusinessContact; - } - - @Override - public void setAddressbookEntryBusinessContact (final BusinessContact addressbookEntryBusinessContact) { - this.addressbookEntryBusinessContact = addressbookEntryBusinessContact; - } - - @Override - public Calendar getAddressbookEntryCreated () { - return this.addressbookEntryCreated; - } - - @Override - public void setAddressbookEntryCreated (final Calendar addressbookEntryCreated) { - this.addressbookEntryCreated = addressbookEntryCreated; - } - - @Override - public Long getAddressbookEntryId () { - return this.addressbookEntryId; - } - - @Override - public void setAddressbookEntryId (final Long addressbookEntryId) { - this.addressbookEntryId = addressbookEntryId; - } - - @Override - public Contact getAddressbookEntryPrivateContact () { - return this.addressbookEntryPrivateContact; - } - - @Override - public void setAddressbookEntryPrivateContact (final Contact addressbookEntryPrivateContact) { - this.addressbookEntryPrivateContact = addressbookEntryPrivateContact; - } - - @Override - public Addressbook getAddressbookId () { - return this.addressbookId; - } - - @Override - public void setAddressbookId (final Addressbook addressbookId) { - this.addressbookId = addressbookId; - } - -} diff --git a/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java b/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java deleted file mode 100644 index 13dc9e4..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java +++ /dev/null @@ -1,232 +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.shared; - -import java.text.MessageFormat; -import java.util.Calendar; -import java.util.Objects; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.addressbook.model.addressbook.UserAddressbook; -import org.mxchange.jusercore.model.user.LoginUser; -import org.mxchange.jusercore.model.user.User; - -/** - * A POJO for sharing address books with other users - *

- * @author Roland Haeder - */ -@Entity (name = "addressbook_shares") -@Table (name = "addressbook_shares") -@NamedQueries ( - { - @NamedQuery ( - name = "SearchUserSharedAddressbooks", - query = "SELECT s FROM addressbook_shares AS s WHERE s.shareUserOwner = :user ORDER BY s.shareId ASC" - ), - @NamedQuery ( - name = "SearchShareeAddressbookShare", - query = "SELECT s FROM addressbook_shares AS s WHERE s.shareAddressbook = :addressbook AND s.shareUserSharee = :sharee" - ) - } -) -public class AddressbookShare implements ShareableAddressbook { - - /** - * Serial number - */ - private static final long serialVersionUID = 167_889_678_177_691_690L; - - /** - * Address book this share is for - */ - @JoinColumn (name = "share_addressbook_id", nullable = false, updatable = false) - @OneToOne (targetEntity = UserAddressbook.class, cascade = CascadeType.REFRESH, optional = false) - private Addressbook shareAddressbook; - - /** - * When this share has been created - */ - @Basic (optional = false) - @Temporal (TemporalType.TIMESTAMP) - @Column (name = "share_created", nullable = false, updatable = false) - private Calendar shareCreated; - - /** - * Id number - */ - @Id - @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "share_id", nullable = false, updatable = false) - private Long shareId; - - /** - * User who is owning the share - */ - @JoinColumn (name = "share_owner_id", nullable = false, updatable = false) - @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false) - private User shareUserOwner; - - /** - * User the address book is shared with - */ - @JoinColumn (name = "share_sharee_id", nullable = false, updatable = false) - @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false) - private User shareUserSharee; - - /** - * Default constructor - */ - public AddressbookShare () { - } - - /** - * Constructor with address book and sharee instance. Both parameters must - * not be null, their id numbers must be set and the adress book's user - * instance must be set and have a valid id set. - *

- * @param addressbook Address book instance - * @param sharee User sharee instance - */ - public AddressbookShare (final Addressbook addressbook, final User sharee) { - // Call default constructor - this(); - - // Check all conditions - if (null == sharee) { - // Throw NPE - throw new NullPointerException("sharee is null"); //NOI18N - } else if (sharee.getUserId() == null) { - // Throw NPE again - throw new NullPointerException("sharee.userId is null"); //NOI18N - } else if (sharee.getUserId() < 1) { - // Invalid id number - throw new IllegalStateException(MessageFormat.format("sharee.userId={0} is invalid", sharee.getUserId())); //NOI18N - } else if (null == addressbook) { - // Throw NPE again - throw new NullPointerException("addressbook is null"); //NOI18N - } else if (addressbook.getAddressbookId() == null) { - // Throw NPE again - 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())); //NOI18N - } else if (Objects.equals(addressbook.getAddressbookUser(), sharee)) { - // Sharing with yourself! - throw new IllegalStateException("User tries to share with himself."); //NOI18N - } - - // Set all instances - this.shareAddressbook = addressbook; - this.shareUserOwner = addressbook.getAddressbookUser(); - this.shareUserSharee = sharee; - } - - @Override - public boolean equals (final Object object) { - if (null == object) { - return false; - } else if (this.getClass() != object.getClass()) { - return false; - } - - final ShareableAddressbook other = (ShareableAddressbook) object; - - if (!Objects.equals(this.getShareAddressbook(), other.getShareAddressbook())) { - return false; - } else if (!Objects.equals(this.getShareUserOwner(), other.getShareUserOwner())) { - return false; - } else if (!Objects.equals(this.getShareUserOwner(), other.getShareUserOwner())) { - return false; - } - - return Objects.equals(this.getShareUserSharee(), other.getShareUserSharee()); - } - - @Override - public int hashCode () { - int hash = 7; - hash = 19 * hash + Objects.hashCode(this.getShareAddressbook()); - hash = 19 * hash + Objects.hashCode(this.getShareUserOwner()); - hash = 19 * hash + Objects.hashCode(this.getShareUserSharee()); - return hash; - } - - @Override - public Addressbook getShareAddressbook () { - return this.shareAddressbook; - } - - @Override - public void setShareAddressbook (final Addressbook shareAddressbook) { - this.shareAddressbook = shareAddressbook; - } - - @Override - public Calendar getShareCreated () { - return this.shareCreated; - } - - @Override - public void setShareCreated (final Calendar shareCreated) { - this.shareCreated = shareCreated; - } - - @Override - public Long getShareId () { - return this.shareId; - } - - @Override - public void setShareId (final Long shareId) { - this.shareId = shareId; - } - - @Override - public User getShareUserOwner () { - return this.shareUserOwner; - } - - @Override - public void setShareUserOwner (final User shareUserOwner) { - this.shareUserOwner = shareUserOwner; - } - - @Override - public User getShareUserSharee () { - return this.shareUserSharee; - } - - @Override - public void setShareUserSharee (final User shareUserSharee) { - this.shareUserSharee = shareUserSharee; - } - -} diff --git a/src/org/mxchange/addressbook/model/addressbook/shared/ShareableAddressbook.java b/src/org/mxchange/addressbook/model/addressbook/shared/ShareableAddressbook.java deleted file mode 100644 index 847d88d..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/shared/ShareableAddressbook.java +++ /dev/null @@ -1,106 +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.shared; - -import java.io.Serializable; -import java.util.Calendar; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.jusercore.model.user.User; - -/** - * A POJI for shared address books - *

- * @author Roland Haeder - */ -public interface ShareableAddressbook extends Serializable { - - /** - * Getter for shared address book instance - *

- * @return Shared address book instance - */ - Addressbook getShareAddressbook (); - - /** - * Setter for shared address book instance - *

- * @param shareAddressbook Shared address book instance - */ - void setShareAddressbook (final Addressbook shareAddressbook); - - /** - * Getter for id number - *

- * @return Id number - */ - Long getShareId (); - - /** - * Setter for id number - *

- * @param shareId Id number - */ - void setShareId (final Long shareId); - - /** - * Getter for address book owner instance - *

- * @return Address book owner instance - */ - User getShareUserOwner (); - - /** - * Setter for address book owner instance - *

- * @param shareUserOwner Address book owner instance - */ - void setShareUserOwner (final User shareUserOwner); - - /** - * Getter for address book sharee instance - *

- * @return Address book sharee instance - */ - User getShareUserSharee (); - - /** - * Setter for address book sharee instance - *

- * @param shareUserSharer Address book sharee instance - */ - void setShareUserSharee (final User shareUserSharer); - - /** - * Getter for share creation timestamp - *

- * @return Share creation timestamp - */ - Calendar getShareCreated (); - - /** - * Setter for share creation timestamp - *

- * @param shareCreated Share creation timestamp - */ - void setShareCreated (final Calendar shareCreated); - - @Override - boolean equals (final Object object); - - @Override - int hashCode (); -} diff --git a/src/org/mxchange/addressbook/model/addressbook/status/AddressbokStatus.java b/src/org/mxchange/addressbook/model/addressbook/status/AddressbokStatus.java deleted file mode 100644 index b53491f..0000000 --- a/src/org/mxchange/addressbook/model/addressbook/status/AddressbokStatus.java +++ /dev/null @@ -1,60 +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.status; - -import java.io.Serializable; - -/** - * An enumeration for the addressbook status - *

- * @author Roland Haeder - */ -public enum AddressbokStatus implements Serializable { - - /** - * When the addressbook is unlocked - */ - UNLOCKED("ADDRESSBOOK_STATUS_UNLOCKED"), //NOI18N - - /** - * When the addressbook is locked by administrator - */ - LOCKED("ADDRESSBOOK_STATUS_LOCKED"); //NOI18N - - /** - * Message key - */ - private final String messageKey; - - /** - * Constructor - *

- * @param messageKey Message key for this enum - */ - private AddressbokStatus (final String messageKey) { - this.messageKey = messageKey; - } - - /** - * Getter for message key - *

- * @return Message key - */ - public String getMessageKey () { - return this.messageKey; - } -} diff --git a/src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java b/src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java index af1a360..c0e0bc0 100644 --- a/src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java +++ b/src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java @@ -19,9 +19,9 @@ package org.mxchange.addressbook.model.shared; import java.io.Serializable; import java.util.List; import javax.ejb.Remote; -import org.mxchange.addressbook.exceptions.UserAlreadySharingAddressbookException; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook; +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; /** diff --git a/src/org/mxchange/addressbook/validator/addressbook/AddressbookIdValidator.java b/src/org/mxchange/addressbook/validator/addressbook/AddressbookIdValidator.java index d97d8ac..8cc496a 100644 --- a/src/org/mxchange/addressbook/validator/addressbook/AddressbookIdValidator.java +++ b/src/org/mxchange/addressbook/validator/addressbook/AddressbookIdValidator.java @@ -25,9 +25,9 @@ import javax.faces.validator.ValidatorException; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import org.mxchange.addressbook.exceptions.AddressbookNotFoundException; -import org.mxchange.addressbook.model.addressbook.Addressbook; import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote; +import org.mxchange.jaddressbookcore.exceptions.AddressbookNotFoundException; +import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; import org.mxchange.jcoreee.validator.number.BaseLongValidator; import org.mxchange.jcoreeelogger.beans.local.logger.Log; import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; -- 2.39.2