From fa3975221539f6c035c9c0760d70de48b9e706dd Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 17 Apr 2016 15:51:08 +0200 Subject: [PATCH] Continued with admin area: - added a lot new administrative pages for contact's cellphone, mobile provider and user - used templates for repeated content - added a lot new language strings - added converter for contacts and cellphone - added new project dependency jcontacts-lib.jar - updated some older (hope, it doesn't conflict) - added mini-navigation CSS classes - removed old controller MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- monitor/README.txt | 6 +- nbproject/faces-config.NavData | 86 +++++---- ...obsAdminMobileProviderWebRequestBean.java} | 12 +- ...inMobileProviderWebRequestController.java} | 4 +- .../JobsMobileProviderWebApplicationBean.java | 85 -------- ...obileProviderWebApplicationController.java | 37 ---- .../JobsMobileProviderWebRequestBean.java} | 8 +- ...bsMobileProviderWebRequestController.java} | 4 +- .../JobsAdminContactPhoneWebRequestBean.java | 145 ++++++++++++++ ...AdminContactPhoneWebRequestController.java | 93 +++++++++ .../user/JobsAdminUserWebSessionBean.java | 18 +- .../beans/user/JobsUserWebSessionBean.java | 39 +++- .../user/JobsUserWebSessionController.java | 14 ++ .../cellphone/JobsCellphoneConverter.java | 133 +++++++++++++ .../contact/JobsContactConverter.java | 133 +++++++++++++ .../localization/bundle_de_DE.properties | 98 +++++++++- .../localization/bundle_en_US.properties | 74 ++++++- web/WEB-INF/faces-config.xml | 142 ++++++++++++-- .../templates/admin/admin_cellphone_data.tpl | 48 +++++ .../templates/admin/admin_cellphone_links.tpl | 46 +++++ .../admin/admin_form_mobile_provider.tpl | 8 +- web/WEB-INF/templates/admin/admin_menu.tpl | 3 - .../templates/admin/admin_user_links.tpl | 40 ++++ .../generic/gender_selection_box.tpl | 4 +- .../generic/mobile_selection_box.tpl | 4 +- .../admin_contact_cellphone_delete.xhtml | 24 +++ web/admin/admin_contact_cellphone_edit.xhtml | 24 +++ web/admin/admin_contact_cellphone_list.xhtml | 20 ++ web/admin/admin_contact_cellphone_show.xhtml | 92 +++++++++ .../admin_contact_cellphone_unlink.xhtml | 25 +++ web/admin/admin_contact_show.xhtml | 20 ++ web/admin/admin_mobile_provider_list.xhtml | 4 +- web/admin/admin_mobile_provider_show.xhtml | 20 ++ web/admin/admin_user_list.xhtml | 4 +- web/admin/admin_user_show.xhtml | 182 ++++++++++++++++++ web/resources/css/cssLayout.css | 38 +++- 36 files changed, 1497 insertions(+), 240 deletions(-) rename src/java/org/mxchange/{pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java => jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java} (92%) rename src/java/org/mxchange/{pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestController.java => jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestController.java} (94%) delete mode 100644 src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationBean.java delete mode 100644 src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationController.java rename src/java/org/mxchange/{pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestBean.java => jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java} (90%) rename src/java/org/mxchange/{pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestController.java => jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java} (91%) create mode 100644 src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestBean.java create mode 100644 src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestController.java create mode 100644 src/java/org/mxchange/jjobs/converter/cellphone/JobsCellphoneConverter.java create mode 100644 src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java create mode 100644 web/WEB-INF/templates/admin/admin_cellphone_data.tpl create mode 100644 web/WEB-INF/templates/admin/admin_cellphone_links.tpl create mode 100644 web/WEB-INF/templates/admin/admin_user_links.tpl create mode 100644 web/admin/admin_contact_cellphone_delete.xhtml create mode 100644 web/admin/admin_contact_cellphone_edit.xhtml create mode 100644 web/admin/admin_contact_cellphone_list.xhtml create mode 100644 web/admin/admin_contact_cellphone_show.xhtml create mode 100644 web/admin/admin_contact_cellphone_unlink.xhtml create mode 100644 web/admin/admin_contact_show.xhtml create mode 100644 web/admin/admin_mobile_provider_show.xhtml create mode 100644 web/admin/admin_user_show.xhtml diff --git a/monitor/README.txt b/monitor/README.txt index 6527106e..ca431b6d 100644 --- a/monitor/README.txt +++ b/monitor/README.txt @@ -1,8 +1,8 @@ How to use this monitoring scripts: ----------------------------------- -1) Copy .monitor-config.sh to ${HOME}/.monitor-pizzaservice-war-cron.sh - Please note that your clone path must be 'pizzaservice-war' then. +1) Copy .monitor-config.sh to ${HOME}/.monitor-jjobs-war-cron.sh + Please note that your clone path must be 'jjobs-war' then. 2) Execute "crontab -e" as same user @@ -11,7 +11,7 @@ How to use this monitoring scripts: PATH="/bla/foo/bin:/bar/bin" SHELL="/bin/bash" -*/10 * * * * cd ${HOME}/checkouts/pizzaservice-war/monitor/ && ./monitor-cron.sh +*/10 * * * * cd ${HOME}/checkouts/jjobs-war/monitor/ && ./monitor-cron.sh Please make sure PATH and SHELL are set (maybe prevents some problems). diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index 7513fe97..84f18adc 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -2,44 +2,54 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java similarity index 92% rename from src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java rename to src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java index 02aae750..07beaba0 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.pizzaapplication.beans.mobileprovider; +package org.mxchange.jjobs.beans.mobileprovider; import java.util.Iterator; import java.util.List; @@ -41,9 +41,9 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; *

* @author Roland Haeder */ -@Named ("adminMobileController") +@Named ("adminMobileProviderController") @RequestScoped -public class PizzaAdminMobileProviderWebRequestBean implements PizzaAdminMobileProviderWebRequestController { +public class JobsAdminMobileProviderWebRequestBean implements JobsAdminMobileProviderWebRequestController { /** * Serial number @@ -59,7 +59,7 @@ public class PizzaAdminMobileProviderWebRequestBean implements PizzaAdminMobileP * Regular bean */ @Inject - private PizzaMobileProviderWebRequestController mobileController; + private JobsMobileProviderWebRequestController mobileController; /** * Event being fired when the mobile provider was added @@ -91,14 +91,14 @@ public class PizzaAdminMobileProviderWebRequestBean implements PizzaAdminMobileP /** * Default constructor */ - public PizzaAdminMobileProviderWebRequestBean () { + public JobsAdminMobileProviderWebRequestBean () { // Try it try { // Get initial context Context context = new InitialContext(); // Try to lookup the beans - this.adminRemoteBean = (AdminMobileProviderSingletonBeanRemote) context.lookup("java:global/PizzaService-ejb/adminmobileprovider!org.mxchange.jphone.phonenumbers.mobileprovider.AdminMobileProviderSingletonBeanRemote"); //NOI18N + this.adminRemoteBean = (AdminMobileProviderSingletonBeanRemote) context.lookup("java:global/jjobs-ejb/adminmobileprovider!org.mxchange.jphone.phonenumbers.mobileprovider.AdminMobileProviderSingletonBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw it again throw new FaceletException(e); diff --git a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestController.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestController.java similarity index 94% rename from src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestController.java rename to src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestController.java index 558de55b..5efe9bfe 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaAdminMobileProviderWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestController.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.pizzaapplication.beans.mobileprovider; +package org.mxchange.jjobs.beans.mobileprovider; import java.io.Serializable; import java.util.List; @@ -27,7 +27,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; *

* @author Roland Haeder */ -public interface PizzaAdminMobileProviderWebRequestController extends Serializable { +public interface JobsAdminMobileProviderWebRequestController extends Serializable { /** * Adds a mobile provider to database by calling the EJB. A pre-check on diff --git a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationBean.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationBean.java deleted file mode 100644 index c51927ce..00000000 --- a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationBean.java +++ /dev/null @@ -1,85 +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 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.jjobs.beans.mobileprovider; - -import java.util.Collections; -import java.util.List; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.faces.view.facelets.FaceletException; -import javax.inject.Named; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; -import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote; - -/** - * A SMS provider bean - *

- * @author Roland Haeder - */ -@Named ("cellphone") -@ApplicationScoped -public class JobsMobileProviderWebApplicationBean implements JobsMobileProviderWebApplicationController { - - /** - * Serial number - */ - private static final long serialVersionUID = 176_985_298_681_742_960L; - - /** - * Remote country EJB - */ - private MobileProviderSingletonBeanRemote cellphoneBean; - - /** - * List of all countries - */ - private List cellphoneList; - - /** - * Default constructor - */ - public JobsMobileProviderWebApplicationBean () { - // Try this - try { - // Get initial context - Context context = new InitialContext(); - - // Try to lookup the bean - this.cellphoneBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/jjobs-ejb/mobileprovider!org.mxchange.jphone.phonenumbers.MobileProvider.MobileProviderSingletonBeanRemote"); //NOI18N - } catch (final NamingException ex) { - // Continue to throw - throw new FaceletException(ex); - } - } - - @Override - public List allMobileProvider () { - // Return "cached" version - return Collections.unmodifiableList(this.cellphoneList); - } - - /** - * Post-initialization of this class - */ - @PostConstruct - public void init () { - this.cellphoneList = this.cellphoneBean.allMobileProvider(); - } -} diff --git a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationController.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationController.java deleted file mode 100644 index 2263c5e9..00000000 --- a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebApplicationController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2016 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU 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.jjobs.beans.mobileprovider; - -import java.io.Serializable; -import java.util.List; -import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; - -/** - * An interface for country beans - *

- * @author Roland Haeder - */ -public interface JobsMobileProviderWebApplicationController extends Serializable { - - /** - * A list of all countries - *

- * @return All countries - */ - List allMobileProvider (); - -} diff --git a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java similarity index 90% rename from src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestBean.java rename to src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java index 32656b23..e217b30a 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.pizzaapplication.beans.mobileprovider; +package org.mxchange.jjobs.beans.mobileprovider; import java.text.MessageFormat; import java.util.List; @@ -37,7 +37,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBe */ @Named ("mobileController") @SessionScoped -public class PizzaMobileProviderWebRequestBean implements PizzaMobileProviderWebRequestController { +public class JobsMobileProviderWebRequestBean implements JobsMobileProviderWebRequestController { /** * Serial number @@ -57,14 +57,14 @@ public class PizzaMobileProviderWebRequestBean implements PizzaMobileProviderWeb /** * Default constructor */ - public PizzaMobileProviderWebRequestBean () { + public JobsMobileProviderWebRequestBean () { // Try it try { // Get initial context Context context = new InitialContext(); // Try to lookup the beans - this.mobileRemoteBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/PizzaService-ejb/mobileprovider!org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote"); //NOI18N + this.mobileRemoteBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/jjobs-ejb/mobileprovider!org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw it again throw new FaceletException(e); diff --git a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestController.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java similarity index 91% rename from src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestController.java rename to src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java index ba780e5c..e774dad5 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.pizzaapplication.beans.mobileprovider; +package org.mxchange.jjobs.beans.mobileprovider; import java.io.Serializable; import java.util.List; @@ -26,7 +26,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; *

* @author Roland Haeder */ -public interface PizzaMobileProviderWebRequestController extends Serializable { +public interface JobsMobileProviderWebRequestController extends Serializable { /** * Returns a list of all mobile providers diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestBean.java new file mode 100644 index 00000000..3e826b67 --- /dev/null +++ b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestBean.java @@ -0,0 +1,145 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * 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.jjobs.beans.phone; + +import java.util.List; +import javax.enterprise.context.RequestScoped; +import javax.faces.view.facelets.FaceletException; +import javax.inject.Named; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; +import org.mxchange.jusercore.model.user.User; + +/** + * Administrative bean (controller) for contact's phone numbers + *

+ * @author Roland Haeder + */ +@Named ("adminContactPhoneController") +@RequestScoped +public class JobsAdminContactPhoneWebRequestBean implements JobsAdminContactPhoneWebRequestController { + + /** + * Serial number + */ + private static final long serialVersionUID = 184_598_175_371_269_016L; + + /** + * Remote EJB for phone number (administrative) + */ + private AdminContactsPhoneSessionBeanRemote adminRemoteBean; + + /** + * Cell phone number + */ + private DialableCellphoneNumber cellPhone; + + /** + * Fax number + */ + private DialableFaxNumber fax; + + /** + * Land-line number + */ + private DialableLandLineNumber landLine; + + /** + * Instance of linked user account + */ + private User user; + + /** + * Default constructor + */ + public JobsAdminContactPhoneWebRequestBean () { + // Try it + try { + // Get initial context + Context context = new InitialContext(); + + // Try to lookup the beans + this.adminRemoteBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N + } catch (final NamingException e) { + // Throw it again + throw new FaceletException(e); + } + } + + @Override + public List allCellphoneContacts () { + return this.adminRemoteBean.allContacts(this.getCellPhone()); + } + + @Override + public DialableCellphoneNumber getCellPhone () { + return this.cellPhone; + } + + @Override + public void setCellPhone (final DialableCellphoneNumber cellPhone) { + this.cellPhone = cellPhone; + } + + @Override + public DialableFaxNumber getFax () { + return this.fax; + } + + @Override + public void setFax (final DialableFaxNumber fax) { + this.fax = fax; + } + + @Override + public DialableLandLineNumber getLandLine () { + return this.landLine; + } + + @Override + public void setLandLine (final DialableLandLineNumber landLine) { + this.landLine = landLine; + } + + @Override + public User getUser () { + return this.user; + } + + @Override + public void setUser (final User user) { + this.user = user; + } + + /** + * Clears this bean + */ + private void clear () { + // Clear all instances + this.setCellPhone(null); + this.setFax(null); + this.setLandLine(null); + this.setUser(null); + } + +} diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestController.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestController.java new file mode 100644 index 00000000..1d881447 --- /dev/null +++ b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebRequestController.java @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * 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.jjobs.beans.phone; + +import java.io.Serializable; +import java.util.List; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; +import org.mxchange.jusercore.model.user.User; + +/** + * An interface for a request web controller (bean) for administrative phone + * number purposes. + *

+ * @author Roland Haeder + */ +public interface JobsAdminContactPhoneWebRequestController extends Serializable { + + List allCellphoneContacts (); + + /** + * Getter for dialable cellphone number instance + *

+ * @return Dialable cellphone number instance + */ + DialableCellphoneNumber getCellPhone (); + + /** + * Setter for dialable land-line number instance + *

+ * @param landLine Dialable land-line number instance + */ + void setLandLine (final DialableLandLineNumber landLine); + + /** + * Getter for dialable land-line number instance + *

+ * @return Dialable land-line number instance + */ + DialableLandLineNumber getLandLine (); + + /** + * Setter for dialable fax number instance + *

+ * @param fax Dialable fax number instance + */ + void setFax (final DialableFaxNumber fax); + + /** + * Getter for dialable fax number instance + *

+ * @return Dialable fax number instance + */ + DialableFaxNumber getFax (); + + /** + * Setter for dialable cellphone number instance + *

+ * @param cellPhone Dialable cellphone number instance + */ + void setCellPhone (final DialableCellphoneNumber cellPhone); + + /** + * Getter for linked user account + *

+ * @return Linked user account + */ + User getUser (); + + /** + * Setter for linked user account + *

+ * @param user Linked user account + */ + void setUser (final User user); + +} diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java index 0f5b8b96..0d9cd7e7 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java @@ -578,15 +578,6 @@ public class JobsAdminUserWebSessionBean implements JobsAdminUserWebSessionContr this.userList = this.userBean.allUsers(); } - /** - * Checks if same password is entered and that they are not empty. - *

- * @return Whether the same password was entered - */ - private boolean isSamePasswordEntered () { - return ((!this.getUserPassword().isEmpty()) && (Objects.equals(this.getUserPassword(), this.getUserPasswordRepeat()))); - } - @Override public User lookupUserById (final Long userId) throws UserNotFoundException { // Init variable @@ -644,4 +635,13 @@ public class JobsAdminUserWebSessionBean implements JobsAdminUserWebSessionContr this.setZipCode(null); } + /** + * Checks if same password is entered and that they are not empty. + *

+ * @return Whether the same password was entered + */ + private boolean isSamePasswordEntered () { + return ((!this.getUserPassword().isEmpty()) && (Objects.equals(this.getUserPassword(), this.getUserPasswordRepeat()))); + } + } diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java index 0a65992e..2b16ef71 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java @@ -172,6 +172,11 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { */ private String street; + /** + * User instance + */ + private User user; + /** * Remote user bean */ @@ -270,7 +275,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { this.addUserNameEmailAddress(registeredUser); // Clear all data - this.clearData(); + this.clear(); // Set user id again this.setUserId(registeredUser.getUserId()); @@ -418,7 +423,6 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { // Trace message //this.getLogger().logTrace(MessageFormat.format("createUserInstance: user={0} - EXIT!", user)); - // Return it return user; } @@ -686,6 +690,16 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { this.street = street; } + @Override + public User getUser () { + return this.user; + } + + @Override + public void setUser (final User user) { + this.user = user; + } + @Override public Long getUserId () { return this.userId; @@ -829,7 +843,10 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { @Override public User lookupUserById (final Long userId) throws UserNotFoundException { // Init variable - User user = null; + User localUser = null; + + // Clear this bean + this.clear(); // Try to lookup it in visible user list for (final Iterator iterator = this.visibleUserList.iterator(); iterator.hasNext();) { @@ -839,19 +856,22 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { // Is the user id found? if (Objects.equals(next.getUserId(), userId)) { // Copy to other variable - user = next; + localUser = next; break; } } // Is it still null? - if (null == user) { + if (null == localUser) { // Not visible for the current user throw new UserNotFoundException(userId); } + // Copy all data to this bean + this.copyUser(localUser); + // Return it - return user; + return localUser; } /** @@ -878,9 +898,9 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { } /** - * Clears all data in this bean + * Clears this bean */ - private void clearData () { + private void clear () { // Clear all data // - personal data this.setUserId(null); @@ -907,6 +927,9 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController { this.setUserName(null); this.setUserPassword(null); this.setUserPasswordRepeat(null); + + // - user instance + this.setUser(null); } /** diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java index 092f904b..8a01448b 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java @@ -346,6 +346,20 @@ public interface JobsUserWebSessionController extends Serializable { */ void setStreet (final String street); + /** + * Getter for user instance (e.g. from show_user) + *

+ * @return User instance + */ + User getUser (); + + /** + * Setter for user instance (e.g. from show_user) + *

+ * @param user User instance + */ + void setUser (final User user); + /** * Getter for user id *

diff --git a/src/java/org/mxchange/jjobs/converter/cellphone/JobsCellphoneConverter.java b/src/java/org/mxchange/jjobs/converter/cellphone/JobsCellphoneConverter.java new file mode 100644 index 00000000..4412841c --- /dev/null +++ b/src/java/org/mxchange/jjobs/converter/cellphone/JobsCellphoneConverter.java @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * 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.jjobs.converter.cellphone; + +import java.text.MessageFormat; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; +import javax.faces.convert.FacesConverter; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import org.mxchange.jcoreeelogger.beans.local.logger.Log; +import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; +import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException; +import org.mxchange.jphone.phonenumbers.DialableNumber; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote; + +/** + * Converter for cellphone id <-> valid cellphone instance + *

+ * @author Roland Haeder + */ +@FacesConverter (value = "CellphoneConverter") +public class JobsCellphoneConverter implements Converter { + + /** + * Logger instance + */ + @Log + private LoggerBeanLocal loggerBeanLocal; + + /** + * Phone EJB + */ + private PhoneSessionBeanRemote phoneBean; + + /** + * Initialization of this converter + */ + public JobsCellphoneConverter () { + // Try to get it + try { + // Get initial context + Context context = new InitialContext(); + + // Lookup logger + this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N + + // ... and user controller + this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N + } catch (final NamingException ex) { + // Continue to throw it + throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N + } + } + + @Override + public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + // Trace message + // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N + + // Is the value null or empty? + if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { + // Warning message + this.loggerBeanLocal.logWarning("getAsObject: submittedValue is null or empty - EXIT!"); //NOI18N + + // Return null + return null; + } + + // Init instance + DialableCellphoneNumber cellphone = null; + + try { + // Try to parse the value as long + Long cellphoneId = Long.valueOf(submittedValue); + + // Debug message + // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: userId{0}", userId)); //NOI18N + + // Try to get cellphone instance from it + cellphone = this.phoneBean.findCellphoneById(cellphoneId); + + // Debug message + // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: cellphone={0}", cellphone)); //NOI18N + } catch (final NumberFormatException ex) { + // Throw again + throw new ConverterException(ex); + } catch (final PhoneEntityNotFoundException ex) { + // Debug message + this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: Exception: {0} - Returning null ...", ex)); //NOI18N + } + + // Trace message + // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: cellphone={0} - EXIT!", cellphone)); //NOI18N + + // Return it + return cellphone; + } + + @Override + public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + // Is the object null? + if ((null == value) || ((String.valueOf(value)).isEmpty())) { + // Is null + return ""; //NOI18N + } else if (!(value instanceof DialableNumber)) { + // Not same interface + throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement DialableNumber.", value)); //NOI18N + } + + // Return category id + return String.valueOf(((DialableNumber) value).getPhoneId()); + } + +} diff --git a/src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java b/src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java new file mode 100644 index 00000000..e8299c7d --- /dev/null +++ b/src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * 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.jjobs.converter.contact; + +import java.text.MessageFormat; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; +import javax.faces.convert.FacesConverter; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; +import org.mxchange.jcontacts.exceptions.ContactNotFoundException; +import org.mxchange.jcoreeelogger.beans.local.logger.Log; +import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; +import org.mxchange.jusercore.model.user.User; + +/** + * Converter for contact id <-> valid contact instance + *

+ * @author Roland Haeder + */ +@FacesConverter (value = "ContactConverter") +public class JobsContactConverter implements Converter { + + /** + * Logger instance + */ + @Log + private LoggerBeanLocal loggerBeanLocal; + + /** + * User EJB + */ + private ContactSessionBeanRemote contactBean; + + /** + * Initialization of this converter + */ + public JobsContactConverter () { + // Try to get it + try { + // Get initial context + Context context = new InitialContext(); + + // Lookup logger + this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N + + // ... and user controller + this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/jjobs-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N + } catch (final NamingException ex) { + // Continue to throw it + throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N + } + } + + @Override + public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + // Trace message + // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N + + // Is the value null or empty? + if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { + // Warning message + this.loggerBeanLocal.logWarning("getAsObject: submittedValue is null or empty - EXIT!"); //NOI18N + + // Return null + return null; + } + + // Init instance + Contact contact = null; + + try { + // Try to parse the value as long + Long contactId = Long.valueOf(submittedValue); + + // Debug message + // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: contactId{0}", contactId)); //NOI18N + + // Try to get user instance from it + contact = this.contactBean.findContactById(contactId); + + // Debug message + // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: user={0}", user)); //NOI18N + } catch (final NumberFormatException ex) { + // Throw again + throw new ConverterException(ex); + } catch (final ContactNotFoundException ex) { + // Debug message + this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: Exception: {0} - Returning null ...", ex)); //NOI18N + } + + // Trace message + // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: contact={0} - EXIT!", contact)); //NOI18N + + // Return it + return contact; + } + + @Override + public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + // Is the object null? + if ((null == value) || ((String.valueOf(value)).isEmpty())) { + // Is null + return ""; //NOI18N + } else if (!(value instanceof User)) { + // Not same interface + throw new IllegalArgumentException(MessageFormat.format("value {0} does not implement User.", value)); //NOI18N + } + + // Return category id + return String.valueOf(((User) value).getUserId()); + } + +} diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 1d12106e..d961ee54 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -305,8 +305,7 @@ LINK_ADMIN_UNLOCK_USER=Ent-/Sperren von Benutzeraccounts LINK_ADMIN_UNLOCK_USER_TITLE=Sperren oder entsperren Sie hier Benutzeraccounts. PAGE_TITLE_ADMIN_LIST_USER=Benutzeraccounts auflisten CONTENT_TITLE_ADMIN_LIST_USER=Auflisten von Benutzeraccounts: -#@TODO Please fix German umlauts! -PAGE_TITLE_ADMIN_EDIT_USER=Benuzteraccount aendern +PAGE_TITLE_ADMIN_EDIT_USER=Benuzteraccount editieren #@TODO Please fix German umlauts! CONTENT_TITLE_ADMIN_EDIT_USER=Aendern von Benutzeraccounts: PAGE_TITLE_ADMIN_UNLOCK_USER=Ent-/Sperren von Benutzeraccounts @@ -390,18 +389,18 @@ ADMIN_LIST_COUNTRY_DATA_COUNTRY_CODE=Laendercode: ADMIN_LIST_COUNTRY_DATA_COUNTRY_EXTERNAL_DIAL_PREFIX=Vorwahl ausserorts: ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Land: #@TODO Please fix German umlauts! -ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE=Aendern oder loeschen der Laenderdaten +ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE=Editieren oder loeschen der Laenderdaten #@TODO Please fix German umlauts! TABLE_SUMMARY_ADMIN_LIST_COUNTRIES=Listet alle bereits angelegten Laenderdaten auf. COUNTRY_GERMANY=Deutschland -ERROR_TARGET_CONTROLLER_PARAMETER_NOT_SET=Fehler: Der Parameter 'targetController' ist nicht gesetzt. +ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET=Fehler: Der Parameter 'targetController' ist nicht gesetzt. ADMIN_MENU_MOBILE_PROVIDER_TITLE=Handyanbieter verwalten #@TODO Please fix German umlauts! LINK_ADMIN_LIST_MOBILE_PROVIDER_TITLE=Hinzufuegen, auflisten, aendern und loeschen von Handyanbietern. PAGE_TITLE_ADMIN_MOBILE_PROVIDER_LIST=Handyanbieter verwalten CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_LIST=Verwalten von Handyanbietern: #@TODO Please fix German umlauts! -PAGE_TITLE_ADMIN_MOBILE_PROVIDER_EDIT=Handyanbieter aendern +PAGE_TITLE_ADMIN_MOBILE_PROVIDER_EDIT=Handyanbieter editieren #@TODO Please fix German umlauts! CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_EDIT=Aendern des Handyanbieters: #@TODO Please fix German umlauts! @@ -436,7 +435,7 @@ ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX=Vorwahl: ADMIN_LIST_MOBILE_PROVIDER_COUNTRY=Land: ADMIN_LIST_MOBILE_PROVIDER_ENTRY_CREATED=Erstellt: #@TODO Please fix German umlauts! -ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE=Aendern oder loeschen des Handyanbieters +ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE=Editieren oder loeschen des Handyanbieters ADMIN_ADD_USER_ENTER_PASSWORD1=Passwort eingeben: ADMIN_ADD_USER_ENTER_PASSWORD2=Passwort wiederholen: ADMIN_LIST_USER_ID=Benutzer-Id: @@ -456,3 +455,90 @@ USER_PROFILE_MODE_INVISIBLE=Durchsichtig USER_PROFILE_MODE_MEMBERS=Nur Mitglieder #@TODO Please fix German umlauts! USER_PROFILE_MODE_PUBLIC=Oeffentlich +ADMIN_LINK_SHOW_USER_TITLE=Administratives Benutzerprofil anzeigen +PAGE_TITLE_ADMIN_SHOW_USER=Benutzerprofil anzeigen +CONTENT_TITLE_ADMIN_SHOW_USER=Profil eines Benutzers anzeigen: +ERROR_PARAMETER_USER_ID_NOT_SET=Fehler: Benutzer-Id nicht gesetzt (Parameter: userId). +ERROR_USER_ID_NOT_FOUND=Fehler: Benutzer-Id nicht gefunden. +#@TODO Please fix German umlauts! +ADMIN_TABLE_SUMMARY_SHOW_USER=Zeigt ein Benutzerprofil fuer administrative Zwecke an. +ADMIN_HEADER_SHOW_USER=Benutzer {0} (Nummer {1}): +ADMIN_SHOW_USER_ID=Benutzer-Id: +ADMIN_SHOW_USER_NAME=Benutzername: +ADMIN_SHOW_USER_CREATED=Wann Benutzer erstellt: +#@TODO Please fix German umlauts! +ADMIN_SHOW_USER_UPDATED=Wann Benutzer geaendert: +ADMIN_SHOW_USER_ACCOUNT_STATUS=Account-Status: +ADMIN_SHOW_USER_PROFILE_MODE=Profilmodus: +ADMIN_SHOW_USER_LAST_LOCKED=Zuletzt gesperrt: +ADMIN_SHOW_USER_LAST_LOCKED_REASON=Letzter Sperrgrund: +ADMIN_SHOW_USER_CONTACT_CREATED=Wann Kontaktdaten erstellt: +#@TODO Please fix German umlauts! +ADMIN_SHOW_USER_CONTACT_UPDATED=Wann Kontaktdaten geaendert: +ADMIN_SHOW_USER_IS_OWN_CONTACT=Eigenes Account: +ADMIN_SHOW_USER_GENDER=Anrede: +ADMIN_SHOW_USER_TITLE=Titel: +ADMIN_SHOW_USER_FIRST_NAME=Vorname: +ADMIN_SHOW_USER_FAMILY_NAME=Nachname: +ADMIN_SHOW_USER_STREET=Strasse: +ADMIN_SHOW_USER_HOUSE_NUMBER=Hausnummer: +ADMIN_SHOW_USER_ZIP_CODE=Postleitzahl: +ADMIN_SHOW_USER_CITY=Stadt: +ADMIN_SHOW_USER_EMAIL_ADDRESS=Email-Adresse: +ADMIN_SHOW_USER_BIRTHDAY=Geburtstag: +ADMIN_LINKS_HEADER=Administrative Links: +ADMIN_LINK_EDIT_USER=Benutzeraccount editieren +ADMIN_LINK_EDIT_USER_TITLE=Editieren der Benutzer- und Kontaktdaten. +ADMIN_LINK_UNLOCK_USER=Ent-/Sperren des Benutzeraccounts +ADMIN_LINK_UNLOCK_USER_TITLE=Sperren und entsperren des Benutzeraccounts. +#@TODO Please fix German umlauts! +ADMIN_LINK_DELETE_USER=Benutzeraccount loeschen +#@TODO Please fix German umlauts! +ADMIN_LINK_DELETE_USER_TITLE=Loescht das Benutzeraccount (nach Bestaetigung). +#@TODO Please fix German umlauts! +CONTENT_TITLE_ADMIN_DELETE_USER=Benutzeraccount loeschen: +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_DELETE_USER=Benutzeraccount loeschen +ADMIN_HEADER_SHOW_CELLPHONE_DATA=Daten des Mobiltelefons: +ADMIN_SHOW_CELLPHONE_ID=Id-Nummer: +ADMIN_SHOW_CELLPHONE_PROVIDER_NAME=Mobilanbieter: +ADMIN_SHOW_CELLPHONE_NUMBER_COMPLETE=Komplette Nummer: +ADMIN_SHOW_CELLPHONE_LINKS=Administrative Links: +ERROR_PARAMETER_USER_NOT_SET=Fehler: Parameter 'user' nicht gesetzt. +ADMIN_LINK_SHOW_SHORT=Anzeigen +ADMIN_LINK_SHOW_SHORT_TITLE=Eintrag einzelnt anzeigen. +ADMIN_LINK_EDIT_SHORT=Editieren +ADMIN_LINK_EDIT_SHORT_TITLE=Eintrag editieren. +#@TODO Please fix German umlauts! +ADMIN_LINK_DELETE_SHORT=Loeschen +#@TODO Please fix German umlauts! +ADMIN_LINK_DELETE_SHORT_TITLE=Eintrag loeschen. +ADMIN_LINK_UNLINK_SHORT=Abtrennen +#@TODO Please fix German umlauts! +ADMIN_LINK_UNLINK_SHORT_TITLE=Entfernt Verknuepfung zum Eintrag. +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_DELETE_CELLPHONE=Mobiletelefoneintrag eines Kontaktes loeschen +#@TODO Fix German umlauts! +CONTENT_TITLE_ADMIN_DELETE_CONTACT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes loeschen: +PAGE_TITLE_ADMIN_EDIT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes editieren +CONTENT_TITLE_ADMIN_EDIT_CONTACT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes editieren: +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_LIST_CONTACT_CELLPHONE=Eintraege von Mobiletelefonen auflisten +PAGE_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Mobiltelefoneintrag eines Kontaktes anzeigen +CONTENT_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Anzeigen eines Mobiltelefoneintrags eines Kontaktes: +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Verknuepfung Kontakt-Mobiletelfon loeschen +CONTENT_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Entfernen einer Verknuepfung Kontakt-Mobiltelefon: +ERROR_PARAMETER_PHONE_ID_NOT_SET=Fehler: Parameter 'phoneId' ist nicht gesetzt. +PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Mobilfunkbetreiber anzeigen +CONTENT_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Mobilfunkbetreiber anzeigen: +TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE=Ein einzelner Mobiltelefoneintrag eines Kontaktes. +#@TODO Please fix German umlauts! +TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE_LINKS=Diese Tabelle zeigt Verknuepfungen von der Mobilfunknummern zu allen Kontaktdaten an. +#@TODO Please fix German umlauts! +ADMIN_HEADER_SHOW_CONTACT_CELLPHONE_LINKS=Alle Kontakt-Mobiltelefon-Verknuepfungen fuer Id-Nummer {0}: +ERROR_PARAMETER_CONTACT_ID_NOT_SET=Fehler: Parameter 'contactId' ist nicht gesetzt. +ADMIN_SHOW_CELLPHONE_UNLINK=Trennen: +ADMIN_SHOW_CONTACT_ID=Kontakt-Id: +PAGE_TITLE_ADMIN_SHOW_CONTACT=Kontaktdaten anzeigen +CONTENT_TITLE_ADMIN_SHOW_CONTACT=Kontaktdaten anzeigen: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 18715d8f..fa882fbb 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -335,7 +335,7 @@ ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Country: ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE=Edit or delete country TABLE_SUMMARY_ADMIN_LIST_COUNTRIES=List of all already added countries. COUNTRY_GERMANY=Germany -ERROR_TARGET_CONTROLLER_PARAMETER_NOT_SET=Error: The parameter 'targetController' is not set. +ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET=Error: The parameter 'targetController' is not set. ADMIN_MENU_MOBILE_PROVIDER_TITLE=Mobile providers LINK_ADMIN_LIST_MOBILE_PROVIDER=Manage ... LINK_ADMIN_LIST_MOBILE_PROVIDER_TITLE=Add, list, edit and delete mobile providers. @@ -380,3 +380,75 @@ USER_ACCOUNT_STATUS_LOCKED=Locked USER_PROFILE_MODE_INVISIBLE=Invisible USER_PROFILE_MODE_MEMBERS=Only members USER_PROFILE_MODE_PUBLIC=Public +ADMIN_LINK_SHOW_USER_TITLE=Show administrative user profile +PAGE_TITLE_ADMIN_SHOW_USER=Show user profile +CONTENT_TITLE_ADMIN_SHOW_USER=Show profile of a user: +ERROR_PARAMETER_USER_ID_NOT_SET=Error: User id not set (parameter userId). +ERROR_USER_ID_NOT_FOUND=Error: User id not found. +ADMIN_TABLE_SUMMARY_SHOW_USER=Shows a single user profile for administrative purposes. +ADMIN_HEADER_SHOW_USER=User {0} (id {1}): +ADMIN_SHOW_USER_ID=User id: +ADMIN_SHOW_USER_NAME=User name: +ADMIN_SHOW_USER_CREATED=When user created: +ADMIN_SHOW_USER_UPDATED=When user changed: +ADMIN_SHOW_USER_ACCOUNT_STATUS=Account status: +ADMIN_SHOW_USER_PROFILE_MODE=Profile mode: +ADMIN_SHOW_USER_LAST_LOCKED=Last locked: +ADMIN_SHOW_USER_LAST_LOCKED_REASON=Last lock reason: +ADMIN_SHOW_USER_CONTACT_CREATED=When contact data created: +ADMIN_SHOW_USER_CONTACT_UPDATED=When contact data updated: +ADMIN_SHOW_USER_IS_OWN_CONTACT=Own account: +ADMIN_SHOW_USER_GENDER=Gender: +ADMIN_SHOW_USER_TITLE=Title: +ADMIN_SHOW_USER_FIRST_NAME=First name: +ADMIN_SHOW_USER_FAMILY_NAME=Family name: +ADMIN_SHOW_USER_STREET=Street: +ADMIN_SHOW_USER_HOUSE_NUMBER=House number: +ADMIN_SHOW_USER_ZIP_CODE=ZIP code: +ADMIN_SHOW_USER_CITY=City: +ADMIN_SHOW_USER_EMAIL_ADDRESS=Email address: +ADMIN_SHOW_USER_BIRTHDAY=Birthday: +ADMIN_LINKS_HEADER=Administrative links: +ADMIN_LINK_EDIT_USER=Edit user account +ADMIN_LINK_EDIT_USER_TITLE=Editing of user and contact data. +ADMIN_LINK_UNLOCK_USER=Lock/Unlock user account +ADMIN_LINK_UNLOCK_USER_TITLE=Lock and unlock of user account +ADMIN_LINK_DELETE_USER=Delete user account +ADMIN_LINK_DELETE_USER_TITLE=Deletes user account (after confirmation). +CONTENT_TITLE_ADMIN_DELETE_USER=Delete user account: +PAGE_TITLE_ADMIN_DELETE_USER=Delete user account +ADMIN_HEADER_SHOW_CELLPHONE_DATA=Data of mobile phone: +ADMIN_SHOW_CELLPHONE_ID=Id number: +ADMIN_SHOW_CELLPHONE_PROVIDER_NAME=Mobile provider: +ADMIN_SHOW_CELLPHONE_NUMBER_COMPLETE=Complete number: +ADMIN_SHOW_CELLPHONE_LINKS=Administrative links: +ERROR_PARAMETER_USER_NOT_SET=Error: Parameter 'user' not set. +ADMIN_LINK_SHOW_SHORT=Show +ADMIN_LINK_SHOW_SHORT_TITLE=Show single entry. +ADMIN_LINK_EDIT_SHORT=Edit +ADMIN_LINK_EDIT_SHORT_TITLE=Edit entry. +ADMIN_LINK_DELETE_SHORT=Delete +ADMIN_LINK_DELETE_SHORT_TITLE=Delete entry. +ADMIN_LINK_UNLINK_SHORT=Unlink +ADMIN_LINK_UNLINK_SHORT_TITLE=Removes link to entry. +PAGE_TITLE_ADMIN_DELETE_CELLPHONE=Delete contact's cellphone entry +CONTENT_TITLE_ADMIN_DELETE_CONTACT_CELLPHONE=Delete contact's cellphone entry: +PAGE_TITLE_ADMIN_EDIT_CELLPHONE=Edit contact's cellphone entry +CONTENT_TITLE_ADMIN_EDIT_CONTACT_CELLPHONE=Edit contact's cellphone entry: +PAGE_TITLE_ADMIN_LIST_CONTACT_CELLPHONE=List all cellphone entries +PAGE_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Show contact's cellphone entry +CONTENT_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE=Show contact's cellphone entry: +PAGE_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Remove link contact-cellphone +#@TODO Please fix German umlauts! +CONTENT_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE=Remove link between contact-cellphone: +ERROR_PARAMETER_PHONE_ID_NOT_SET=Error: Parameter 'phoneId' is not set. +PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Show mobile provider +CONTENT_TITLE_ADMIN_SHOW_MOBILE_PROVIDER=Show mobile provider: +TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE=A single contact's cellphone entry. +TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE_LINKS=This table shows links of of this cellphone number to all contacts. +ADMIN_HEADER_SHOW_CONTACT_CELLPHONE_LINKS=All links between contact-cellphone for id {0}: +ERROR_PARAMETER_CONTACT_ID_NOT_SET=Error: Parameter 'contactId' is not set. +ADMIN_SHOW_CELLPHONE_UNLINK=Unlink: +ADMIN_SHOW_CONTACT_ID=Contact id: +PAGE_TITLE_ADMIN_SHOW_CONTACT=Show contact data +CONTENT_TITLE_ADMIN_SHOW_CONTACT=Show contact data: diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 423709c8..04a88f12 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -118,22 +118,10 @@ admin_add_user /admin/admin_user_add.xhtml - - admin_delete_user - /admin/admin_user_delete.xhtml - admin_list_user /admin/admin_user_list.xhtml - - admin_edit_user - /admin/admin_user_edit.xhtml - - - admin_unlock_user - /admin/admin_user_unlock.xhtml - admin_list_countries /admin/admin_country_list.xhtml @@ -142,6 +130,10 @@ admin_list_mobile_provider /admin/admin_mobile_provider_list.xhtml + + admin_list_contact_cellphone + /admin/admin_contact_cellphone_list.xhtml + /user/register.xhtml @@ -200,6 +192,10 @@ login_data_saved /login/login_data_saved.xhtml + + admin_delete_product + /admin/admin_product_delete.xhtml + /login/login_change_personal_data.xhtml @@ -207,6 +203,10 @@ login_data_saved /login/login_data_saved.xhtml + + admin_delete_category + /admin/admin_category_delete.xhtml + /admin/admin_country_list.xhtml @@ -214,6 +214,117 @@ admin_edit_country /admin/admin_country_edit.xhtml + + admin_delete_country + /admin/admin_country_delete.xhtml + + + + /admin/admin_mobile_provider_list.xhtml + + admin_edit_mobile_provider + /admin/admin_mobile_provider_edit.xhtml + + + admin_delete_mobile_provider + /admin/admin_mobile_provider_delete.xhtml + + + admin_show_mobile_provider + /admin/admin_mobile_provider_show.xhtml + + + + /admin/admin_user_list.xhtml + + admin_show_user + /admin/admin_user_show.xhtml + + + admin_edit_user + /admin/admin_user_edit.xhtml + + + admin_delete_user + /admin/admin_user_delete.xhtml + + + admin_unlock_user + /admin/admin_user_unlock.xhtml + + + + /admin/admin_user_show.xhtml + + admin_show_contact_cellphone + /admin/admin_contact_cellphone_show.xhtml + + + admin_edit_contact_cellphone + /admin/admin_contact_cellphone_edit.xhtml + + + admin_unlink_contact_cellphone + /admin/admin_contact_cellphone_unlink.xhtml + + + admin_delete_contact_cellphone + /admin/admin_contact_cellphone_delete.xhtml + + + admin_edit_user + /admin/admin_user_edit.xhtml + + + admin_delete_user + /admin/admin_user_delete.xhtml + + + admin_unlock_user + /admin/admin_user_unlock.xhtml + + + admin_show_mobile_provider + /admin/admin_mobile_provider_show.xhtml + + + + /admin/admin_contact_cellphone_list.xhtml + + admin_show_contact_cellphone + /admin/admin_contact_cellphone_show.xhtml + + + admin_edit_contact_cellphone + /admin/admin_contact_cellphone_edit.xhtml + + + admin_delete_contact_cellphone + /admin/admin_contact_cellphone_delete.xhtml + + + + /admin/admin_contact_cellphone_show.xhtml + + admin_show_mobile_provider + /admin/admin_mobile_provider_show.xhtml + + + admin_edit_contact_cellphone + /admin/admin_contact_cellphone_edit.xhtml + + + admin_delete_contact_cellphone + /admin/admin_contact_cellphone_delete.xhtml + + + admin_unlink_contact_cellphone + /admin/admin_contact_cellphone_unlink.xhtml + + + admin_show_contact + /admin/admin_contact_show.xhtml + - - /admin/admin_mobile_provider_list.xhtml - - admin_edit_mobile_provider - /admin/admin_mobile_provider_edit.xhtml - - diff --git a/web/WEB-INF/templates/admin/admin_cellphone_data.tpl b/web/WEB-INF/templates/admin/admin_cellphone_data.tpl new file mode 100644 index 00000000..030d3528 --- /dev/null +++ b/web/WEB-INF/templates/admin/admin_cellphone_data.tpl @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + diff --git a/web/WEB-INF/templates/admin/admin_cellphone_links.tpl b/web/WEB-INF/templates/admin/admin_cellphone_links.tpl new file mode 100644 index 00000000..f3201442 --- /dev/null +++ b/web/WEB-INF/templates/admin/admin_cellphone_links.tpl @@ -0,0 +1,46 @@ + + + + + + +
    + + + + + + + + + + + +
+
+
diff --git a/web/WEB-INF/templates/admin/admin_form_mobile_provider.tpl b/web/WEB-INF/templates/admin/admin_form_mobile_provider.tpl index 7d2232c3..25f954eb 100644 --- a/web/WEB-INF/templates/admin/admin_form_mobile_provider.tpl +++ b/web/WEB-INF/templates/admin/admin_form_mobile_provider.tpl @@ -19,7 +19,7 @@
- +
@@ -33,7 +33,7 @@
- +
@@ -47,7 +47,7 @@
- +
@@ -59,7 +59,7 @@
- +
diff --git a/web/WEB-INF/templates/admin/admin_menu.tpl b/web/WEB-INF/templates/admin/admin_menu.tpl index 60095a66..5bae5b8b 100644 --- a/web/WEB-INF/templates/admin/admin_menu.tpl +++ b/web/WEB-INF/templates/admin/admin_menu.tpl @@ -20,9 +20,6 @@
  • -
  • -
  • -
diff --git a/web/admin/admin_mobile_provider_show.xhtml b/web/admin/admin_mobile_provider_show.xhtml new file mode 100644 index 00000000..5689de21 --- /dev/null +++ b/web/admin/admin_mobile_provider_show.xhtml @@ -0,0 +1,20 @@ + + + + + + #{msg.PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER} + + + #{msg.CONTENT_TITLE_ADMIN_SHOW_MOBILE_PROVIDER} + + + + Here goes your content. + + + diff --git a/web/admin/admin_user_list.xhtml b/web/admin/admin_user_list.xhtml index e8bc9179..01cb96dd 100644 --- a/web/admin/admin_user_list.xhtml +++ b/web/admin/admin_user_list.xhtml @@ -18,7 +18,7 @@ #{msg.ADMIN_LIST_USER_ID} - + @@ -62,7 +62,7 @@ #{msg.ADMIN_LIST_USER_CREATED} - + diff --git a/web/admin/admin_user_show.xhtml b/web/admin/admin_user_show.xhtml new file mode 100644 index 00000000..dff90801 --- /dev/null +++ b/web/admin/admin_user_show.xhtml @@ -0,0 +1,182 @@ + + + + + + + + + + #{msg.PAGE_TITLE_ADMIN_SHOW_USER} + + + #{msg.CONTENT_TITLE_ADMIN_SHOW_USER} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/resources/css/cssLayout.css b/web/resources/css/cssLayout.css index bf62f151..457a8646 100644 --- a/web/resources/css/cssLayout.css +++ b/web/resources/css/cssLayout.css @@ -122,18 +122,27 @@ table, .table, .table_medium { clear: both; } -ul.footer_nav { +ul.footer_nav, ul.mini_nav { + display: block; text-align: center; - /*width : 95%;*/ list-style: none; margin: 0px; + padding: 0px; } -ul.footer_nav li.footer_link { +ul.footer_nav li.footer_link, ul.mini_nav li.mini_link { + display: block; float: left; +} + +ul.footer_nav li.footer_link { width: 100px; } +ul.mini_nav li.mini_link { + padding: 1px; +} + ul.footer_nav li.footer_copyright { float: right; width: 300px; @@ -213,3 +222,26 @@ ul.footer_nav li.footer_copyright { .user_status_unconfirmed { color: #aa0000; } + +.data_label, .data_field { + display: block; + width: 100%; + height: 14px; + padding: 1px; + margin: 1px; + border: 1px solid #aaaaaa; + vertical-align: top; +} + +.data_label { + font-weight: bold; + background-color: #dddddd; +} + +.unlink_link { + color: #aaaa00; +} + +.delete_link { + color: #aa0000; +} -- 2.39.5