From: Roland Häder Date: Tue, 19 Apr 2016 15:55:11 +0000 (+0200) Subject: Continued with refacturing: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=df2001c855812e48f1c240be864bf4f3da221f87;p=jfinancials-war.git Continued with refacturing: - added general admin helper for just holding objects - used that new helper for user instance to have auto-completition back - updated properties Signed-off-by: Roland Häder --- diff --git a/lib/jaddressbook-core.jar b/lib/jaddressbook-core.jar new file mode 100644 index 00000000..246241db Binary files /dev/null and b/lib/jaddressbook-core.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 2344271a..73fed031 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -881,6 +881,9 @@ exists or setup the property manually. For example like this: + + + @@ -889,6 +892,9 @@ exists or setup the property manually. For example like this: + + + @@ -1042,16 +1048,13 @@ exists or setup the property manually. For example like this: - - + - - @@ -1062,16 +1065,13 @@ exists or setup the property manually. For example like this: - - + - - @@ -1486,6 +1486,7 @@ exists or setup the property manually. For example like this: --> + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 51588a82..b197c419 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=be5f34f7 build.xml.stylesheet.CRC32=651128d4@1.68.1.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=4a1292ce -nbproject/build-impl.xml.script.CRC32=5b321d36 +nbproject/build-impl.xml.data.CRC32=f889023f +nbproject/build-impl.xml.script.CRC32=4cc79cb6 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.75.1.1 diff --git a/nbproject/project.properties b/nbproject/project.properties index de0dc21c..7ce55d84 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -37,6 +37,7 @@ endorsed.classpath= excludes= file.reference.cdi-api.jar=lib/cdi-api.jar file.reference.gf-client.jar=lib/gf-client.jar +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.jcontacts-lib.jar=lib/jcontacts-lib.jar @@ -75,6 +76,7 @@ javac.classpath=\ ${file.reference.jphone-lib.jar}:\ ${file.reference.juser-core.jar}:\ ${file.reference.juser-lib.jar}:\ + ${file.reference.jaddressbook-core.jar}:\ ${reference.addressbook-lib.jar}:\ ${reference.addressbook-mailer.jar}:\ ${file.reference.cdi-api.jar}:\ @@ -108,8 +110,10 @@ lib.dir=${web.docbase.dir}/WEB-INF/lib persistence.xml.dir=${conf.dir} platform.active=default_platform project.addressbook-lib=../addressbook-lib +project.addressbook-lib-1=../../NetBeansProjects/addressbook-lib project.addressbook-mailer=../../NetBeansProjects/addressbook-mailer project.license=agpl30 +reference.addressbook-lib-1.jar=${project.addressbook-lib-1}/dist/addressbook-lib.jar reference.addressbook-lib.jar=${project.addressbook-lib}/dist/addressbook-lib.jar reference.addressbook-mailer.jar=${project.addressbook-mailer}/dist/addressbook-mailer.jar resource.dir=setup @@ -120,6 +124,7 @@ run.test.classpath=\ # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): runmain.jvmargs= 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.jcontacts-lib.jar=../jcontacts-lib/src/ diff --git a/nbproject/project.xml b/nbproject/project.xml index 0d7766ce..c57c6de6 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -32,7 +32,6 @@ ${file.reference.jcontacts-business-core.jar} - WEB-INF/lib ${file.reference.jcontacts-lib.jar} @@ -55,20 +54,21 @@ WEB-INF/lib - ${reference.addressbook-lib.jar} + ${file.reference.jaddressbook-core.jar} WEB-INF/lib + + ${reference.addressbook-lib.jar} + ${reference.addressbook-mailer.jar} WEB-INF/lib ${file.reference.cdi-api.jar} - WEB-INF/lib ${file.reference.gf-client.jar} - WEB-INF/lib @@ -91,6 +91,14 @@ clean jar + + addressbook-lib-1 + jar + + jar + clean + jar + addressbook-mailer jar diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java index 03cda15f..3a5347e0 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java @@ -36,14 +36,14 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; -import org.mxchange.addressbook.events.addressbook.AddressbookLoadedEvent; -import org.mxchange.addressbook.events.addressbook.LoadedAddressbookEvent; -import org.mxchange.addressbook.exceptions.AddressbookNameAlreadyUsedException; -import org.mxchange.addressbook.exceptions.AddressbookNotFoundException; -import org.mxchange.addressbook.model.addressbook.Addressbook; import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote; -import org.mxchange.addressbook.model.addressbook.UserAddressbook; -import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry; +import org.mxchange.jaddressbookcore.events.addressbook.AddressbookLoadedEvent; +import org.mxchange.jaddressbookcore.events.addressbook.LoadedAddressbookEvent; +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.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.model.user.User; diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionController.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionController.java index ec6b3f93..942b1c7c 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionController.java @@ -19,9 +19,9 @@ package org.mxchange.addressbook.beans.addressbook; import java.io.Serializable; import java.util.Calendar; import java.util.List; -import org.mxchange.addressbook.events.addressbook.AddressbookLoadedEvent; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry; +import org.mxchange.jaddressbookcore.events.addressbook.AddressbookLoadedEvent; +import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; +import org.mxchange.jaddressbookcore.model.addressbook.entry.AddressbookEntry; import org.mxchange.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.model.user.User; diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java new file mode 100644 index 00000000..ae08b086 --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.helper; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.User; + +/** + * An interface for general bean helper + *

+ * @author Roland Haeder + */ +public interface AddressbookAdminWebRequestController extends Serializable { + + /** + * Getter for user instance + *

+ * @return User instance + */ + User getUser (); + + /** + * Setter for user instance + *

+ * @param user User instance + */ + void setUser (final User user); + +} diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java new file mode 100644 index 00000000..f00ec66f --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.helper; + +import javax.enterprise.context.RequestScoped; +import javax.inject.Named; +import org.mxchange.jusercore.model.user.User; + +/** + * A general helper for beans + *

+ * @author Roland Haeder + */ +@Named ("adminHelper") +@RequestScoped +public class AddressbookAdminWebRequestHelper implements AddressbookAdminWebRequestController { + + /** + * Serial number + */ + private static final long serialVersionUID = 17_258_793_567_145_701L; + + /** + * User instance + */ + private User user; + + /** + * Default constructor + */ + public AddressbookAdminWebRequestHelper () { + } + + @Override + public User getUser () { + return this.user; + } + + @Override + public void setUser (final User user) { + this.user = user; + } + +} diff --git a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java index 75275f39..e0706b73 100644 --- a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java @@ -32,13 +32,13 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; -import org.mxchange.addressbook.events.sharing.AddressbookSharingEvent; -import org.mxchange.addressbook.events.sharing.StartedAddressbookSharingEvent; -import org.mxchange.addressbook.events.sharing.type.SharingType; -import org.mxchange.addressbook.exceptions.UserAlreadySharingAddressbookException; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook; import org.mxchange.addressbook.model.shared.SharedAddressbooksSessionBeanRemote; +import org.mxchange.jaddressbookcore.events.sharing.AddressbookSharingEvent; +import org.mxchange.jaddressbookcore.events.sharing.StartedAddressbookSharingEvent; +import org.mxchange.jaddressbookcore.events.sharing.type.SharingType; +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.events.login.UserLoggedInEvent; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; diff --git a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionController.java b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionController.java index a6926248..a92576f2 100644 --- a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionController.java @@ -18,9 +18,9 @@ package org.mxchange.addressbook.beans.shares; import java.io.Serializable; import java.util.List; -import org.mxchange.addressbook.events.sharing.AddressbookSharingEvent; -import org.mxchange.addressbook.model.addressbook.Addressbook; -import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook; +import org.mxchange.jaddressbookcore.events.sharing.AddressbookSharingEvent; +import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; +import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook; import org.mxchange.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.model.user.User; diff --git a/web/admin/user/admin_user_delete.xhtml b/web/admin/user/admin_user_delete.xhtml index 9396c8b1..0fdcb199 100644 --- a/web/admin/user/admin_user_delete.xhtml +++ b/web/admin/user/admin_user_delete.xhtml @@ -8,6 +8,10 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > + + + + #{msg.PAGE_TITLE_ADMIN_DELETE_USER} @@ -16,6 +20,8 @@ + + Here goes your content. diff --git a/web/admin/user/admin_user_edit.xhtml b/web/admin/user/admin_user_edit.xhtml index 1e3bf5d9..4d3c97fe 100644 --- a/web/admin/user/admin_user_edit.xhtml +++ b/web/admin/user/admin_user_edit.xhtml @@ -8,6 +8,10 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > + + + + #{msg.PAGE_TITLE_ADMIN_EDIT_USER} @@ -16,6 +20,8 @@ + + Here goes your content. diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index 2e45ef73..f9caa671 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -1,184 +1,184 @@ - - - - - - - - - - #{msg.PAGE_TITLE_ADMIN_SHOW_USER} - - - #{msg.CONTENT_TITLE_ADMIN_SHOW_USER} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + #{msg.PAGE_TITLE_ADMIN_SHOW_USER} + + + #{msg.CONTENT_TITLE_ADMIN_SHOW_USER} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/admin/user/admin_user_unlock.xhtml b/web/admin/user/admin_user_unlock.xhtml index 5f45befc..fe96f551 100644 --- a/web/admin/user/admin_user_unlock.xhtml +++ b/web/admin/user/admin_user_unlock.xhtml @@ -8,6 +8,10 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > + + + + #{msg.PAGE_TITLE_ADMIN_UNLOCK_USER} @@ -16,6 +20,8 @@ + + Here goes your content.