- 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
Signed-off-by: Roland Häder <roland@mxchange.org>
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-addressbook-war-cron.sh
+ Please note that your clone path must be 'addressbook-war' then.
2) Execute "crontab -e" as same user
PATH="/bla/foo/bin:/bar/bin"
SHELL="/bin/bash"
-*/10 * * * * cd ${HOME}/checkouts/pizzaservice-war/monitor/ && ./monitor-cron.sh
+*/10 * * * * cd ${HOME}/checkouts/addressbook-war/monitor/ && ./monitor-cron.sh
Please make sure PATH and SHELL are set (maybe prevents some problems).
<Scene Scope="Project" version="2">
<Scope Scope="Faces Configuration Only"/>
<Scope Scope="Project">
- <Node id="login/login_shared_addressbooks.xhtml" x="1150" y="600" zoom="true"/>
- <Node id="admin/admin_country_list.xhtml" x="400" y="300" zoom="true"/>
- <Node id="admin/admin_user_delete.xhtml" x="400" y="900" zoom="true"/>
- <Node id="privacy.xhtml" x="1650" y="150" zoom="true"/>
- <Node id="login/login_change_password.xhtml" x="1400" y="300" zoom="true"/>
- <Node id="admin/index.xhtml" x="900" y="300" zoom="true"/>
- <Node id="basket.xhtml" x="1150" y="300" zoom="true"/>
- <Node id="login/login_data_saved.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="admin/admin_user_delete.xhtml" x="1150" y="900" zoom="true"/>
+ <Node id="privacy.xhtml" x="400" y="600" zoom="true"/>
+ <Node id="login/login_change_password.xhtml" x="1150" y="750" zoom="true"/>
+ <Node id="admin/index.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="login/login_start_sharing_addressbook.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="admin/admin_country_delete.xhtml" x="1900" y="450" zoom="true"/>
+ <Node id="admin/admin_mobile_provider_show.xhtml" x="1150" y="600" zoom="true"/>
+ <Node id="admin/admin_mobile_provider_edit.xhtml" x="1150" y="150" zoom="true"/>
+ <Node id="user/resend_link.xhtml" x="650" y="900" zoom="true"/>
+ <Node id="admin/admin_logout.xhtml" x="900" y="1050" zoom="true"/>
+ <Node id="admin/admin_user_show.xhtml" x="150" y="300" zoom="true"/>
+ <Node id="admin/admin_user_edit.xhtml" x="1900" y="300" zoom="true"/>
+ <Node id="index.xhtml" x="650" y="600" zoom="true"/>
+ <Node id="admin/admin_contact_show.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="user/register_done.xhtml" x="2150" y="300" zoom="true"/>
+ <Node id="admin/admin_category_delete.xhtml" x="150" y="450" zoom="true"/>
+ <Node id="*" x="900" y="300" zoom="true"/>
+ <Node id="user/login_error.xhtml" x="150" y="1350" zoom="true"/>
+ <Node id="user/show_addressbook_entries.xhtml" x="1400" y="600" zoom="true"/>
+ <Node id="user/lost_passwd.xhtml" x="900" y="900" zoom="true"/>
+ <Node id="user/login.xhtml" x="150" y="750" zoom="true"/>
+ <Node id="login/login_list_sharing_addressbooks.xhtml" x="1900" y="150" zoom="true"/>
+ <Node id="login/login_edit_user_data.xhtml" x="1650" y="300" zoom="true"/>
+ <Node id="login/login_shared_addressbooks.xhtml" x="1150" y="450" zoom="true"/>
+ <Node id="admin/admin_country_list.xhtml" x="900" y="150" zoom="true"/>
+ <Node id="admin/admin_contact_cellphone_delete.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="basket.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="admin/admin_contact_cellphone_edit.xhtml" x="650" y="450" zoom="true"/>
+ <Node id="login/login_data_saved.xhtml" x="1150" y="300" zoom="true"/>
<Node id="exception.xhtml" x="400" y="1050" zoom="true"/>
- <Node id="admin/admin_country_delete.xhtml" x="150" y="300" zoom="true"/>
- <Node id="login/login_start_sharing_addressbook.xhtml" x="150" y="1200" zoom="true"/>
- <Node id="user/register.xhtml" x="400" y="150" zoom="true"/>
- <Node id="admin/admin_mobile_provider_edit.xhtml" x="150" y="450" zoom="true"/>
- <Node id="admin/admin_country_edit.xhtml" x="1400" y="150" zoom="true"/>
- <Node id="user/resend_link.xhtml" x="150" y="900" zoom="true"/>
- <Node id="login/login_index.xhtml" x="900" y="750" zoom="true"/>
- <Node id="login/login_add_addressbook.xhtml" x="900" y="900" zoom="true"/>
- <Node id="login/login_own_addressbooks.xhtml" x="650" y="750" zoom="true"/>
- <Node id="admin/admin_mobile_provider_delete.xhtml" x="1150" y="450" zoom="true"/>
- <Node id="admin/admin_user_list.xhtml" x="1400" y="600" zoom="true"/>
- <Node id="terms.xhtml" x="150" y="600" zoom="true"/>
- <Node id="admin/admin_logout.xhtml" x="400" y="600" zoom="true"/>
- <Node id="admin/admin_user_edit.xhtml" x="1150" y="750" zoom="true"/>
- <Node id="user/user_list.xhtml" x="900" y="600" zoom="true"/>
- <Node id="admin/admin_mobile_provider_list.xhtml" x="650" y="150" zoom="true"/>
- <Node id="index.xhtml" x="150" y="150" zoom="true"/>
- <Node id="logout.xhtml" x="1900" y="300" zoom="true"/>
- <Node id="user/register_done.xhtml" x="1150" y="150" zoom="true"/>
- <Node id="login/login_change_personal_data.xhtml" x="400" y="450" zoom="true"/>
- <Node id="user/user_profile.xhtml" x="1900" y="150" zoom="true"/>
- <Node id="admin/admin_user_unlock.xhtml" x="400" y="750" zoom="true"/>
- <Node id="*" x="900" y="450" zoom="true"/>
- <Node id="user/show_addressbook.xhtml" x="150" y="1050" zoom="true"/>
- <Node id="imprint.xhtml" x="650" y="900" zoom="true"/>
- <Node id="user/login_error.xhtml" x="650" y="600" zoom="true"/>
- <Node id="login/login_other_addressbooks.xhtml" x="1650" y="300" zoom="true"/>
- <Node id="user/show_addressbook_entries.xhtml" x="1650" y="450" zoom="true"/>
- <Node id="login/login_change_email_address.xhtml" x="2150" y="150" zoom="true"/>
- <Node id="user/lost_passwd.xhtml" x="150" y="750" zoom="true"/>
- <Node id="login/login_list_sharing_addressbooks.xhtml" x="900" y="150" zoom="true"/>
- <Node id="user/login.xhtml" x="650" y="450" zoom="true"/>
- <Node id="login/login_edit_user_data.xhtml" x="1400" y="450" zoom="true"/>
+ <Node id="user/register.xhtml" x="900" y="750" zoom="true"/>
+ <Node id="admin/admin_country_edit.xhtml" x="1650" y="450" zoom="true"/>
+ <Node id="login/login_add_addressbook.xhtml" x="400" y="900" zoom="true"/>
+ <Node id="login/login_index.xhtml" x="1400" y="750" zoom="true"/>
+ <Node id="login/login_own_addressbooks.xhtml" x="2400" y="150" zoom="true"/>
+ <Node id="admin/admin_mobile_provider_delete.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="admin/admin_user_list.xhtml" x="150" y="1050" zoom="true"/>
+ <Node id="terms.xhtml" x="1650" y="150" zoom="true"/>
+ <Node id="user/user_list.xhtml" x="650" y="750" zoom="true"/>
+ <Node id="admin/admin_mobile_provider_list.xhtml" x="1400" y="450" zoom="true"/>
+ <Node id="logout.xhtml" x="900" y="450" zoom="true"/>
+ <Node id="admin/admin_contact_cellphone_list.xhtml" x="2150" y="150" zoom="true"/>
+ <Node id="login/login_change_personal_data.xhtml" x="150" y="900" zoom="true"/>
+ <Node id="user/user_profile.xhtml" x="1650" y="600" zoom="true"/>
+ <Node id="admin/admin_user_unlock.xhtml" x="650" y="1050" zoom="true"/>
+ <Node id="user/show_addressbook.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="imprint.xhtml" x="1400" y="300" zoom="true"/>
+ <Node id="admin/admin_contact_cellphone_show.xhtml" x="400" y="750" zoom="true"/>
+ <Node id="login/login_other_addressbooks.xhtml" x="150" y="1200" zoom="true"/>
+ <Node id="admin/admin_product_delete.xhtml" x="400" y="1200" zoom="true"/>
+ <Node id="login/login_change_email_address.xhtml" x="900" y="600" zoom="true"/>
+ <Node id="admin/admin_contact_cellphone_unlink.xhtml" x="1400" y="150" zoom="true"/>
</Scope>
<Scope Scope="All Faces Configurations"/>
</Scene>
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.beans.mobileprovider;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcountry.data.Country;
+import org.mxchange.jphone.events.AdminAddedMobileProviderEvent;
+import org.mxchange.jphone.events.AdminMobileProviderAddedEvent;
+import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException;
+import org.mxchange.jphone.phonenumbers.mobileprovider.AdminMobileProviderSingletonBeanRemote;
+import org.mxchange.jphone.phonenumbers.mobileprovider.CellphoneProvider;
+import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+
+/**
+ * Administrative bean (controller) for mobile provider
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminMobileProviderController")
+@RequestScoped
+public class AddressbookAdminMobileProviderWebRequestBean implements AddressbookAdminMobileProviderWebRequestController {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 184_598_175_371_269_016L;
+
+ /**
+ * Remote EJB for mobile providers (administrative)
+ */
+ private AdminMobileProviderSingletonBeanRemote adminRemoteBean;
+
+ /**
+ * Regular bean
+ */
+ @Inject
+ private AddressbookMobileProviderWebRequestController mobileController;
+
+ /**
+ * Event being fired when the mobile provider was added
+ */
+ @Inject
+ @Any
+ private Event<AdminAddedMobileProviderEvent> providerAddedEvent;
+
+ /**
+ * Country instance ('s dial data)
+ */
+ private Country providerCountry;
+
+ /**
+ * Provider dial prefix (example: 0177 for German E+)
+ */
+ private Long providerDialPrefix;
+
+ /**
+ * Pattern for mail gateway
+ */
+ private String providerMailPattern;
+
+ /**
+ * Name of the provider
+ */
+ private String providerName;
+
+ /**
+ * Default constructor
+ */
+ public AddressbookAdminMobileProviderWebRequestBean () {
+ // Try it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Try to lookup the beans
+ this.adminRemoteBean = (AdminMobileProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/adminmobileprovider!org.mxchange.jphone.phonenumbers.mobileprovider.AdminMobileProviderSingletonBeanRemote"); //NOI18N
+ } catch (final NamingException e) {
+ // Throw it again
+ throw new FaceletException(e);
+ }
+ }
+
+ @Override
+ public void addMobileProvider () {
+ // Create mobile provider instance
+ MobileProvider mobileProvider = new CellphoneProvider(this.getProviderDialPrefix(), this.getProviderName(), this.getProviderCountry(), this.getProviderMailPattern());
+
+ // Is the provider already created?
+ if (this.isMobileProviderCreated(mobileProvider)) {
+ // Then throw exception
+ throw new FaceletException(new MobileProviderAlreadyAddedException(mobileProvider));
+ }
+
+ // Init variable
+ MobileProvider updatedProvider = null;
+
+ try {
+ // Call remote EJB and get back an updated instance
+ updatedProvider = this.adminRemoteBean.addMobileProvider(mobileProvider);
+ } catch (final MobileProviderAlreadyAddedException ex) {
+ // Throw again
+ throw new FaceletException(ex);
+ }
+
+ // Fire event
+ this.providerAddedEvent.fire(new AdminMobileProviderAddedEvent(updatedProvider));
+
+ // Clear this bean
+ this.clear();
+ }
+
+ @Override
+ public List<MobileProvider> allMobileProvider () {
+ return this.mobileController.allMobileProvider();
+ }
+
+ @Override
+ public Country getProviderCountry () {
+ return this.providerCountry;
+ }
+
+ @Override
+ public void setProviderCountry (final Country providerCountry) {
+ this.providerCountry = providerCountry;
+ }
+
+ @Override
+ public Long getProviderDialPrefix () {
+ return this.providerDialPrefix;
+ }
+
+ @Override
+ public void setProviderDialPrefix (final Long providerDialPrefix) {
+ this.providerDialPrefix = providerDialPrefix;
+ }
+
+ @Override
+ public String getProviderMailPattern () {
+ return this.providerMailPattern;
+ }
+
+ @Override
+ public void setProviderMailPattern (final String providerMailPattern) {
+ this.providerMailPattern = providerMailPattern;
+ }
+
+ @Override
+ public String getProviderName () {
+ return this.providerName;
+ }
+
+ @Override
+ public void setProviderName (final String providerName) {
+ this.providerName = providerName;
+ }
+
+ @Override
+ public boolean hasMobileProvider () {
+ return (!this.allMobileProvider().isEmpty());
+ }
+
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all fields
+ this.setProviderCountry(null);
+ this.setProviderDialPrefix(null);
+ this.setProviderMailPattern(null);
+ this.setProviderName(null);
+ }
+
+ /**
+ * Checks whether if the given mobile provider is already created by
+ * checking both dial prefix and country.
+ * <p>
+ * @param mobileProvider Mobile provider instance to check
+ * <p>
+ * @return Whether the given mobile provider instance is found
+ */
+ private boolean isMobileProviderCreated (final MobileProvider mobileProvider) {
+ // Default is not found
+ boolean isFound = false;
+
+ // Get list of all providers
+ List<MobileProvider> providers = this.allMobileProvider();
+
+ // Get iterator from it
+ Iterator<MobileProvider> iterator = providers.iterator();
+
+ // Loop through all
+ while (iterator.hasNext()) {
+ // Get next element
+ MobileProvider next = iterator.next();
+
+ // Is the provider's dial prefix and country the same?
+ if ((Objects.equals(mobileProvider.getProviderDialPrefix(), next.getProviderDialPrefix())) && (Objects.equals(mobileProvider.getProviderCountry(), next.getProviderCountry()))) {
+ // Is the same, abort loop
+ isFound = true;
+ break;
+ }
+ }
+
+ // Return result
+ return isFound;
+ }
+
+}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.beans.mobileprovider;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jcountry.data.Country;
+import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+
+/**
+ * An interface for a request web controller (bean) for administrative mobile
+ * provider purposes.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface AddressbookAdminMobileProviderWebRequestController extends Serializable {
+
+ /**
+ * Adds a mobile provider to database by calling the EJB. A pre-check on
+ * dial-prefix and country combination is done, if found, an exception is
+ * thrown.
+ */
+ void addMobileProvider ();
+
+ /**
+ * Returns a list of all mobile providers
+ * <p>
+ * @return A list of all mobile providers
+ */
+ List<MobileProvider> allMobileProvider ();
+
+ /**
+ * Checks whether mobile providers are registered
+ * <p>
+ * @return Whether mobile providers are registered
+ */
+ boolean hasMobileProvider ();
+
+ /**
+ * Getter for provider dial prefix
+ * <p>
+ * @return Provider dial prefix
+ */
+ Long getProviderDialPrefix ();
+
+ /**
+ * Setter for provider dial prefix
+ * <p>
+ * @param providerDialPrefix Provider dial prefix
+ */
+ void setProviderDialPrefix (final Long providerDialPrefix);
+
+ /**
+ * Getter for provider name
+ * <p>
+ * @return Provider name
+ */
+ String getProviderName ();
+
+ /**
+ * Setter for provider name
+ * <p>
+ * @param providerName Provider name
+ */
+ void setProviderName (final String providerName);
+
+ /**
+ * Getter for country instance ('s dial data)
+ * <p>
+ * @return Country instance
+ */
+ Country getProviderCountry ();
+
+ /**
+ * Setter for country instance ('s dial data)
+ * <p>
+ * @param country Country instance
+ */
+ void setProviderCountry (final Country country);
+
+ /**
+ * Getter for pattern for mail gateway
+ * <p>
+ * @return Pattern for mail gateway
+ */
+ String getProviderMailPattern ();
+
+ /**
+ * Setter for pattern for mail gateway
+ * <p>
+ * @param providerMailRegex Pattern for mail gateway
+ */
+ void setProviderMailPattern (final String providerMailRegex);
+
+}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.addressbook.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
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("cellphone")
-@ApplicationScoped
-public class AddressbookMobileProviderWebApplicationBean implements AddressbookMobileProviderWebApplicationController {
-
- /**
- * 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<MobileProvider> cellphoneList;
-
- /**
- * Default constructor
- */
- public AddressbookMobileProviderWebApplicationBean () {
- // Try this
- try {
- // Get initial context
- Context context = new InitialContext();
-
- // Try to lookup the bean
- this.cellphoneBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/mobileprovider!org.mxchange.jphone.phonenumbers.MobileProvider.MobileProviderSingletonBeanRemote"); //NOI18N
- } catch (final NamingException ex) {
- // Continue to throw
- throw new FaceletException(ex);
- }
- }
-
- @Override
- public List<MobileProvider> allMobileProvider () {
- // Return "cached" version
- return Collections.unmodifiableList(this.cellphoneList);
- }
-
- /**
- * Post-initialization of this class
- */
- @PostConstruct
- public void init () {
- this.cellphoneList = this.cellphoneBean.allMobileProvider();
- }
-}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.addressbook.beans.mobileprovider;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
-
-/**
- * An interface for country beans
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface AddressbookMobileProviderWebApplicationController extends Serializable {
-
- /**
- * A list of all countries
- * <p>
- * @return All countries
- */
- List<MobileProvider> allMobileProvider ();
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 Roland Haeder<roland@mxchange.org>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.beans.mobileprovider;
+
+import java.text.MessageFormat;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.event.Observes;
+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.events.AdminAddedMobileProviderEvent;
+import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote;
+
+/**
+ * A general bean for mobile providers
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("mobileController")
+@SessionScoped
+public class AddressbookMobileProviderWebRequestBean implements AddressbookMobileProviderWebRequestController {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 15_869_423_671_950_276L;
+
+ /**
+ * "Cached" list of mobile providers
+ */
+ private List<MobileProvider> mobileProviders;
+
+ /**
+ * Remote EJB for mobile providers (regular)
+ */
+ private MobileProviderSingletonBeanRemote mobileRemoteBean;
+
+ /**
+ * Default constructor
+ */
+ public AddressbookMobileProviderWebRequestBean () {
+ // Try it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Try to lookup the beans
+ this.mobileRemoteBean = (MobileProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/mobileprovider!org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote"); //NOI18N
+ } catch (final NamingException e) {
+ // Throw it again
+ throw new FaceletException(e);
+ }
+ }
+
+ @Override
+ public void afterAdminAddedMobileProvider (@Observes final AdminAddedMobileProviderEvent event) {
+ // Is all valid?
+ if (null == event) {
+ // Throw NPE
+ throw new NullPointerException("event is null"); //NOI18N
+ } else if (event.getAddedMobileProvider()== null) {
+ // Throw again ...
+ throw new NullPointerException("event.addedMobileProvider is null"); //NOI18N
+ } else if (event.getAddedMobileProvider().getProviderId()== null) {
+ // And again ...
+ throw new NullPointerException("event.addedMobileProvider.providerId is null"); //NOI18N
+ } else if (event.getAddedMobileProvider().getProviderId() < 1) {
+ // Id is invalid
+ throw new IllegalArgumentException(MessageFormat.format("event.addedMobileProvider.providerId={0} is not valid.", event.getAddedMobileProvider().getProviderId())); //NOI18N
+ }
+
+ // Add it to the list
+ this.mobileProviders.add(event.getAddedMobileProvider());
+ }
+
+ @Override
+ @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+ public List<MobileProvider> allMobileProvider () {
+ return this.mobileProviders;
+ }
+
+ /**
+ * Initializer method
+ */
+ @PostConstruct
+ public void init () {
+ // Init list of mobile providers
+ this.mobileProviders = this.mobileRemoteBean.allMobileProvider();
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2016 Roland Haeder<roland@mxchange.org>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.beans.mobileprovider;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jphone.events.AdminAddedMobileProviderEvent;
+import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+
+/**
+ * An interface for general mobile provider controller
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface AddressbookMobileProviderWebRequestController extends Serializable {
+
+ /**
+ * Returns a list of all mobile providers
+ * <p>
+ * @return A list of all mobile providers
+ */
+ List<MobileProvider> allMobileProvider ();
+
+ /**
+ * Observes events being fired after the administrator has added a new
+ * mobile provider
+ * <p>
+ * @param event Event being fired
+ */
+ void afterAdminAddedMobileProvider (final AdminAddedMobileProviderEvent event);
+
+}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.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
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminContactPhoneController")
+@RequestScoped
+public class AddressbookAdminContactPhoneWebRequestBean implements AddressbookAdminContactPhoneWebRequestController {
+
+ /**
+ * 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 AddressbookAdminContactPhoneWebRequestBean () {
+ // Try it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Try to lookup the beans
+ this.adminRemoteBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/addressbook-ejb/admincontactphone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N
+ } catch (final NamingException e) {
+ // Throw it again
+ throw new FaceletException(e);
+ }
+ }
+
+ @Override
+ public List<Contact> 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);
+ }
+
+}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.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.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface AddressbookAdminContactPhoneWebRequestController extends Serializable {
+
+ List<Contact> allCellphoneContacts ();
+
+ /**
+ * Getter for dialable cellphone number instance
+ * <p>
+ * @return Dialable cellphone number instance
+ */
+ DialableCellphoneNumber getCellPhone ();
+
+ /**
+ * Setter for dialable land-line number instance
+ * <p>
+ * @param landLine Dialable land-line number instance
+ */
+ void setLandLine (final DialableLandLineNumber landLine);
+
+ /**
+ * Getter for dialable land-line number instance
+ * <p>
+ * @return Dialable land-line number instance
+ */
+ DialableLandLineNumber getLandLine ();
+
+ /**
+ * Setter for dialable fax number instance
+ * <p>
+ * @param fax Dialable fax number instance
+ */
+ void setFax (final DialableFaxNumber fax);
+
+ /**
+ * Getter for dialable fax number instance
+ * <p>
+ * @return Dialable fax number instance
+ */
+ DialableFaxNumber getFax ();
+
+ /**
+ * Setter for dialable cellphone number instance
+ * <p>
+ * @param cellPhone Dialable cellphone number instance
+ */
+ void setCellPhone (final DialableCellphoneNumber cellPhone);
+
+ /**
+ * Getter for linked user account
+ * <p>
+ * @return Linked user account
+ */
+ User getUser ();
+
+ /**
+ * Setter for linked user account
+ * <p>
+ * @param user Linked user account
+ */
+ void setUser (final User user);
+
+}
this.userList = this.userBean.allUsers();
}
- /**
- * Checks if same password is entered and that they are not empty.
- * <p>
- * @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
this.setZipCode(null);
}
+ /**
+ * Checks if same password is entered and that they are not empty.
+ * <p>
+ * @return Whether the same password was entered
+ */
+ private boolean isSamePasswordEntered () {
+ return ((!this.getUserPassword().isEmpty()) && (Objects.equals(this.getUserPassword(), this.getUserPasswordRepeat())));
+ }
+
}
*/
private String street;
+ /**
+ * User instance
+ */
+ private User user;
+
/**
* Remote user bean
*/
this.addUserNameEmailAddress(registeredUser);
// Clear all data
- this.clearData();
+ this.clear();
// Set user id again
this.setUserId(registeredUser.getUserId());
// Trace message
//this.getLogger().logTrace(MessageFormat.format("createUserInstance: user={0} - EXIT!", user));
-
// Return it
return user;
}
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;
@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<User> iterator = this.visibleUserList.iterator(); iterator.hasNext();) {
// 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;
}
/**
}
/**
- * Clears all data in this bean
+ * Clears this bean
*/
- private void clearData () {
+ private void clear () {
// Clear all data
// - personal data
this.setUserId(null);
this.setUserName(null);
this.setUserPassword(null);
this.setUserPasswordRepeat(null);
+
+ // - user instance
+ this.setUser(null);
}
/**
*/
void setStreet (final String street);
+ /**
+ * Getter for user instance (e.g. from show_user)
+ * <p>
+ * @return User instance
+ */
+ User getUser ();
+
+ /**
+ * Setter for user instance (e.g. from show_user)
+ * <p>
+ * @param user User instance
+ */
+ void setUser (final User user);
+
/**
* Getter for user id
* <p>
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.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
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@FacesConverter (value = "CellphoneConverter")
+public class AddressbookCellphoneConverter implements Converter {
+
+ /**
+ * Logger instance
+ */
+ @Log
+ private LoggerBeanLocal loggerBeanLocal;
+
+ /**
+ * Phone EJB
+ */
+ private PhoneSessionBeanRemote phoneBean;
+
+ /**
+ * Initialization of this converter
+ */
+ public AddressbookCellphoneConverter () {
+ // 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/addressbook-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());
+ }
+
+}
--- /dev/null
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.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
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@FacesConverter (value = "ContactConverter")
+public class AddressbookContactConverter implements Converter {
+
+ /**
+ * Logger instance
+ */
+ @Log
+ private LoggerBeanLocal loggerBeanLocal;
+
+ /**
+ * User EJB
+ */
+ private ContactSessionBeanRemote contactBean;
+
+ /**
+ * Initialization of this converter
+ */
+ public AddressbookContactConverter () {
+ // 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/addressbook-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());
+ }
+
+}
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
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!
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:
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:
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.
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:
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.mobileprovider;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Objects;
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.events.AdminAddedMobileProviderEvent;
-import org.mxchange.jphone.events.AdminMobileProviderAddedEvent;
-import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException;
-import org.mxchange.jphone.phonenumbers.mobileprovider.AdminMobileProviderSingletonBeanRemote;
-import org.mxchange.jphone.phonenumbers.mobileprovider.CellphoneProvider;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
-
-/**
- * Administrative bean (controller) for mobile provider
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("adminMobileController")
-@RequestScoped
-public class PizzaAdminMobileProviderWebRequestBean implements PizzaAdminMobileProviderWebRequestController {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 184_598_175_371_269_016L;
-
- /**
- * Remote EJB for mobile providers (administrative)
- */
- private AdminMobileProviderSingletonBeanRemote adminRemoteBean;
-
- /**
- * Regular bean
- */
- @Inject
- private PizzaMobileProviderWebRequestController mobileController;
-
- /**
- * Event being fired when the mobile provider was added
- */
- @Inject
- @Any
- private Event<AdminAddedMobileProviderEvent> providerAddedEvent;
-
- /**
- * Country instance ('s dial data)
- */
- private Country providerCountry;
-
- /**
- * Provider dial prefix (example: 0177 for German E+)
- */
- private Long providerDialPrefix;
-
- /**
- * Pattern for mail gateway
- */
- private String providerMailPattern;
-
- /**
- * Name of the provider
- */
- private String providerName;
-
- /**
- * Default constructor
- */
- public PizzaAdminMobileProviderWebRequestBean () {
- // 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
- } catch (final NamingException e) {
- // Throw it again
- throw new FaceletException(e);
- }
- }
-
- @Override
- public void addMobileProvider () {
- // Create mobile provider instance
- MobileProvider mobileProvider = new CellphoneProvider(this.getProviderDialPrefix(), this.getProviderName(), this.getProviderCountry(), this.getProviderMailPattern());
-
- // Is the provider already created?
- if (this.isMobileProviderCreated(mobileProvider)) {
- // Then throw exception
- throw new FaceletException(new MobileProviderAlreadyAddedException(mobileProvider));
- }
-
- // Init variable
- MobileProvider updatedProvider = null;
-
- try {
- // Call remote EJB and get back an updated instance
- updatedProvider = this.adminRemoteBean.addMobileProvider(mobileProvider);
- } catch (final MobileProviderAlreadyAddedException ex) {
- // Throw again
- throw new FaceletException(ex);
- }
-
- // Fire event
- this.providerAddedEvent.fire(new AdminMobileProviderAddedEvent(updatedProvider));
-
- // Clear this bean
- this.clear();
- }
-
- @Override
- public List<MobileProvider> allMobileProvider () {
- return this.mobileController.allMobileProvider();
- }
-
- @Override
- public Country getProviderCountry () {
- return this.providerCountry;
- }
-
- @Override
- public void setProviderCountry (final Country providerCountry) {
- this.providerCountry = providerCountry;
- }
-
- @Override
- public Long getProviderDialPrefix () {
- return this.providerDialPrefix;
- }
-
- @Override
- public void setProviderDialPrefix (final Long providerDialPrefix) {
- this.providerDialPrefix = providerDialPrefix;
- }
-
- @Override
- public String getProviderMailPattern () {
- return this.providerMailPattern;
- }
-
- @Override
- public void setProviderMailPattern (final String providerMailPattern) {
- this.providerMailPattern = providerMailPattern;
- }
-
- @Override
- public String getProviderName () {
- return this.providerName;
- }
-
- @Override
- public void setProviderName (final String providerName) {
- this.providerName = providerName;
- }
-
- @Override
- public boolean hasMobileProvider () {
- return (!this.allMobileProvider().isEmpty());
- }
-
- /**
- * Clears this bean
- */
- private void clear () {
- // Clear all fields
- this.setProviderCountry(null);
- this.setProviderDialPrefix(null);
- this.setProviderMailPattern(null);
- this.setProviderName(null);
- }
-
- /**
- * Checks whether if the given mobile provider is already created by
- * checking both dial prefix and country.
- * <p>
- * @param mobileProvider Mobile provider instance to check
- * <p>
- * @return Whether the given mobile provider instance is found
- */
- private boolean isMobileProviderCreated (final MobileProvider mobileProvider) {
- // Default is not found
- boolean isFound = false;
-
- // Get list of all providers
- List<MobileProvider> providers = this.allMobileProvider();
-
- // Get iterator from it
- Iterator<MobileProvider> iterator = providers.iterator();
-
- // Loop through all
- while (iterator.hasNext()) {
- // Get next element
- MobileProvider next = iterator.next();
-
- // Is the provider's dial prefix and country the same?
- if ((Objects.equals(mobileProvider.getProviderDialPrefix(), next.getProviderDialPrefix())) && (Objects.equals(mobileProvider.getProviderCountry(), next.getProviderCountry()))) {
- // Is the same, abort loop
- isFound = true;
- break;
- }
- }
-
- // Return result
- return isFound;
- }
-
-}
+++ /dev/null
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.mobileprovider;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
-
-/**
- * An interface for a request web controller (bean) for administrative mobile
- * provider purposes.
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface PizzaAdminMobileProviderWebRequestController extends Serializable {
-
- /**
- * Adds a mobile provider to database by calling the EJB. A pre-check on
- * dial-prefix and country combination is done, if found, an exception is
- * thrown.
- */
- void addMobileProvider ();
-
- /**
- * Returns a list of all mobile providers
- * <p>
- * @return A list of all mobile providers
- */
- List<MobileProvider> allMobileProvider ();
-
- /**
- * Checks whether mobile providers are registered
- * <p>
- * @return Whether mobile providers are registered
- */
- boolean hasMobileProvider ();
-
- /**
- * Getter for provider dial prefix
- * <p>
- * @return Provider dial prefix
- */
- Long getProviderDialPrefix ();
-
- /**
- * Setter for provider dial prefix
- * <p>
- * @param providerDialPrefix Provider dial prefix
- */
- void setProviderDialPrefix (final Long providerDialPrefix);
-
- /**
- * Getter for provider name
- * <p>
- * @return Provider name
- */
- String getProviderName ();
-
- /**
- * Setter for provider name
- * <p>
- * @param providerName Provider name
- */
- void setProviderName (final String providerName);
-
- /**
- * Getter for country instance ('s dial data)
- * <p>
- * @return Country instance
- */
- Country getProviderCountry ();
-
- /**
- * Setter for country instance ('s dial data)
- * <p>
- * @param country Country instance
- */
- void setProviderCountry (final Country country);
-
- /**
- * Getter for pattern for mail gateway
- * <p>
- * @return Pattern for mail gateway
- */
- String getProviderMailPattern ();
-
- /**
- * Setter for pattern for mail gateway
- * <p>
- * @param providerMailRegex Pattern for mail gateway
- */
- void setProviderMailPattern (final String providerMailRegex);
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2016 Roland Haeder<roland@mxchange.org>
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.mobileprovider;
-
-import java.text.MessageFormat;
-import java.util.List;
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.event.Observes;
-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.events.AdminAddedMobileProviderEvent;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote;
-
-/**
- * A general bean for mobile providers
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("mobileController")
-@SessionScoped
-public class PizzaMobileProviderWebRequestBean implements PizzaMobileProviderWebRequestController {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 15_869_423_671_950_276L;
-
- /**
- * "Cached" list of mobile providers
- */
- private List<MobileProvider> mobileProviders;
-
- /**
- * Remote EJB for mobile providers (regular)
- */
- private MobileProviderSingletonBeanRemote mobileRemoteBean;
-
- /**
- * Default constructor
- */
- public PizzaMobileProviderWebRequestBean () {
- // 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
- } catch (final NamingException e) {
- // Throw it again
- throw new FaceletException(e);
- }
- }
-
- @Override
- public void afterAdminAddedMobileProvider (@Observes final AdminAddedMobileProviderEvent event) {
- // Is all valid?
- if (null == event) {
- // Throw NPE
- throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getAddedMobileProvider()== null) {
- // Throw again ...
- throw new NullPointerException("event.addedMobileProvider is null"); //NOI18N
- } else if (event.getAddedMobileProvider().getProviderId()== null) {
- // And again ...
- throw new NullPointerException("event.addedMobileProvider.providerId is null"); //NOI18N
- } else if (event.getAddedMobileProvider().getProviderId() < 1) {
- // Id is invalid
- throw new IllegalArgumentException(MessageFormat.format("event.addedMobileProvider.providerId={0} is not valid.", event.getAddedMobileProvider().getProviderId())); //NOI18N
- }
-
- // Add it to the list
- this.mobileProviders.add(event.getAddedMobileProvider());
- }
-
- @Override
- @SuppressWarnings ("ReturnOfCollectionOrArrayField")
- public List<MobileProvider> allMobileProvider () {
- return this.mobileProviders;
- }
-
- /**
- * Initializer method
- */
- @PostConstruct
- public void init () {
- // Init list of mobile providers
- this.mobileProviders = this.mobileRemoteBean.allMobileProvider();
- }
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2016 Roland Haeder<roland@mxchange.org>
- *
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.beans.mobileprovider;
-
-import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jphone.events.AdminAddedMobileProviderEvent;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
-
-/**
- * An interface for general mobile provider controller
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface PizzaMobileProviderWebRequestController extends Serializable {
-
- /**
- * Returns a list of all mobile providers
- * <p>
- * @return A list of all mobile providers
- */
- List<MobileProvider> allMobileProvider ();
-
- /**
- * Observes events being fired after the administrator has added a new
- * mobile provider
- * <p>
- * @param event Event being fired
- */
- void afterAdminAddedMobileProvider (final AdminAddedMobileProviderEvent event);
-
-}
<from-outcome>exception</from-outcome>
<to-view-id>/exception.xhtml</to-view-id>
</navigation-case>
- <navigation-case>
- <from-outcome>admin_delete_user</from-outcome>
- <to-view-id>/admin/admin_user_delete.xhtml</to-view-id>
- </navigation-case>
<navigation-case>
<from-outcome>admin_list_user</from-outcome>
<to-view-id>/admin/admin_user_list.xhtml</to-view-id>
</navigation-case>
- <navigation-case>
- <from-outcome>admin_edit_user</from-outcome>
- <to-view-id>/admin/admin_user_edit.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>admin_unlock_user</from-outcome>
- <to-view-id>/admin/admin_user_unlock.xhtml</to-view-id>
- </navigation-case>
<navigation-case>
<from-outcome>admin_list_countries</from-outcome>
<to-view-id>/admin/admin_country_list.xhtml</to-view-id>
<from-outcome>admin_list_mobile_provider</from-outcome>
<to-view-id>/admin/admin_mobile_provider_list.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>admin_list_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_list.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/user/login.xhtml</from-view-id>
<from-outcome>login_data_saved</from-outcome>
<to-view-id>/login/login_data_saved.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_product</from-outcome>
+ <to-view-id>/admin/admin_product_delete.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/login/login_change_personal_data.xhtml</from-view-id>
<from-outcome>login_data_saved</from-outcome>
<to-view-id>/login/login_data_saved.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_category</from-outcome>
+ <to-view-id>/admin/admin_category_delete.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/admin/admin_country_list.xhtml</from-view-id>
<from-outcome>admin_edit_country</from-outcome>
<to-view-id>/admin/admin_country_edit.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_country</from-outcome>
+ <to-view-id>/admin/admin_country_delete.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/admin/admin_mobile_provider_list.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>admin_edit_mobile_provider</from-outcome>
+ <to-view-id>/admin/admin_mobile_provider_edit.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_mobile_provider</from-outcome>
+ <to-view-id>/admin/admin_mobile_provider_delete.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_show_mobile_provider</from-outcome>
+ <to-view-id>/admin/admin_mobile_provider_show.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/admin/admin_user_list.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>admin_show_user</from-outcome>
+ <to-view-id>/admin/admin_user_show.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_edit_user</from-outcome>
+ <to-view-id>/admin/admin_user_edit.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_user</from-outcome>
+ <to-view-id>/admin/admin_user_delete.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_unlock_user</from-outcome>
+ <to-view-id>/admin/admin_user_unlock.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/admin/admin_user_show.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>admin_show_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_show.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_edit_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_edit.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_unlink_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_unlink.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_delete.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_edit_user</from-outcome>
+ <to-view-id>/admin/admin_user_edit.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_user</from-outcome>
+ <to-view-id>/admin/admin_user_delete.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_unlock_user</from-outcome>
+ <to-view-id>/admin/admin_user_unlock.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_show_mobile_provider</from-outcome>
+ <to-view-id>/admin/admin_mobile_provider_show.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/admin/admin_contact_cellphone_list.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>admin_show_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_show.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_edit_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_edit.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_delete.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/admin/admin_contact_cellphone_show.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>admin_show_mobile_provider</from-outcome>
+ <to-view-id>/admin/admin_mobile_provider_show.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_edit_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_edit.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_delete_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_delete.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_unlink_contact_cellphone</from-outcome>
+ <to-view-id>/admin/admin_contact_cellphone_unlink.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>admin_show_contact</from-outcome>
+ <to-view-id>/admin/admin_contact_show.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<!--
<factory>
</exception-handler-factory>
</factory>
//-->
- <navigation-rule>
- <from-view-id>/admin/admin_mobile_provider_list.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>admin_edit_mobile_provider</from-outcome>
- <to-view-id>/admin/admin_mobile_provider_edit.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
</faces-config>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <h:outputText styleClass="errors" value="#{ERROR_PARAMETER_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty cellphoneNumber}" />
+
+ <h:panelGrid id="cellphone_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CELLPHONE_DATA}" headerClass="table_header_column" styleClass="table_big" columns="2" rendered="#{not empty cellphoneNumber}">
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_HEADER_SHOW_CELLPHONE_DATA}" />
+ </f:facet>
+
+ <h:column>
+ <h:outputLabel for="cellphoneId" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_ID}" />
+
+ <h:outputText id="cellphoneId" styleClass="data_field" value="#{cellphoneNumber.phoneId}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="cellphoneProvider" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_PROVIDER_NAME}" />
+
+ <h:link outcome="admin_show_mobile_provider">
+ <f:param name="providerId" value="#{cellphoneNumber.cellphoneProvider.providerId}" />
+ <h:outputText id="cellphoneProvider" styleClass="data_field" value="#{cellphoneNumber.cellphoneProvider.providerName}" />
+ </h:link>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="cellphoneNumber" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_NUMBER_COMPLETE}" />
+
+ <h:outputText id="cellphoneNumber" styleClass="data_field" value="#{cellphoneNumber.cellphoneProvider.providerCountry.countryExternalDialPrefix}#{cellphoneNumber.cellphoneProvider.providerDialPrefix}-#{cellphoneNumber.phoneNumber}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="cellphoneLinks" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_LINKS}" />
+
+ <div id="cellphoneLinks" class="data_field">
+ <ui:include src="/WEB-INF/templates/admin/admin_cellphone_links.tpl">
+ <ui:param name="cellphoneNumber" value="#{cellphoneNumber}" />
+ <ui:param name="contact" value="#{user.userContact}" />
+ <ui:param name="isShowPage" value="#{isShowPage}" />
+ </ui:include>
+ </div>
+ </h:column>
+ </h:panelGrid>
+</ui:composition>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <h:outputText styleClass="errors" value="#{ERROR_PARAMETER_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty cellphoneNumber}" />
+
+ <ui:fragment rendered="#{not empty cellphoneNumber}">
+ <ul class="mini_nav">
+ <ui:fragment rendered="#{empty isShowPage or not isShowPage}">
+ <li class="mini_link">
+ <h:link outcome="admin_show_contact_cellphone">
+ <h:outputText value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" />
+ <f:param name="phoneId" value="#{cellphoneNumber.phoneId}" />
+ </h:link>
+ </li>
+ </ui:fragment>
+
+ <li class="mini_link">
+ <h:link outcome="admin_edit_contact_cellphone">
+ <h:outputText value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_SHORT_TITLE}" />
+ <f:param name="phoneId" value="#{cellphoneNumber.phoneId}" />
+ </h:link>
+ </li>
+
+ <ui:fragment rendered="#{not empty contact}">
+ <li class="mini_link">
+ <h:link outcome="admin_unlink_contact_cellphone">
+ <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
+ <f:param name="phoneId" value="#{cellphoneNumber.phoneId}" />
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </h:link>
+ </li>
+ </ui:fragment>
+
+ <li class="mini_link">
+ <h:link outcome="admin_delete_contact_cellphone">
+ <h:outputText styleClass="delete_link" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_SHORT_TITLE}" />
+ <f:param name="phoneId" value="#{cellphoneNumber.phoneId}" />
+ </h:link>
+ </li>
+ </ul>
+ </ui:fragment>
+</ui:composition>
</div>
<div class="table_right_medium">
- <h:inputText class="input" id="providerDialPrefix" size="5" maxlength="20" value="#{adminMobileController.providerDialPrefix}" required="true">
+ <h:inputText class="input" id="providerDialPrefix" size="5" maxlength="20" value="#{adminMobileProviderController.providerDialPrefix}" required="true">
<f:validateLongRange for="providerDialPrefix" minimum="0" maximum="9999" />
</h:inputText>
</div>
</div>
<div class="table_right_medium">
- <h:inputText class="input" id="providerMailRegex" size="10" maxlength="30" value="#{adminMobileController.providerMailPattern}" required="true" />
+ <h:inputText class="input" id="providerMailRegex" size="10" maxlength="30" value="#{adminMobileProviderController.providerMailPattern}" required="true" />
<h:outputText class="small notice" value="#{msg.ADMIN_ENTER_MOBILE_PROVIDER_PATTERN_EXAMPLE}" />
</div>
</div>
<div class="table_right_medium">
- <h:inputText class="input" id="providerName" size="20" maxlength="100" value="#{adminMobileController.providerName}" required="true" />
+ <h:inputText class="input" id="providerName" size="20" maxlength="100" value="#{adminMobileProviderController.providerName}" required="true" />
</div>
<div class="clear"></div>
</div>
<div class="table_right_medium">
- <h:selectOneMenu class="select" id="providerCountry" value="#{adminMobileController.providerCountry}" converter="country">
+ <h:selectOneMenu class="select" id="providerCountry" value="#{adminMobileProviderController.providerCountry}" converter="country">
<f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryCode} (#{msg[c.countryI18nkey]})" />
</h:selectOneMenu>
</div>
<ul>
<li><h:link title="#{msg.LINK_ADMIN_LIST_USER_TITLE}" outcome="admin_list_user" value="#{msg.LINK_ADMIN_LIST_USER}" /></li>
- <li><h:link title="#{msg.LINK_ADMIN_EDIT_USER_TITLE}" outcome="admin_edit_user" value="#{msg.LINK_ADMIN_EDIT_USER}" /></li>
- <li><h:link title="#{msg.LINK_ADMIN_DELETE_USER_TITLE}" outcome="admin_delete_user" value="#{msg.LINK_ADMIN_DELETE_USER}" /></li>
- <li><h:link title="#{msg.LINK_ADMIN_UNLOCK_USER_TITLE}" outcome="admin_unlock_user" value="#{msg.LINK_ADMIN_UNLOCK_USER}" /></li>
</ul>
<div class="menu_header">
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <h:outputText styleClass="errors" value="#{msg.ERROR_PARAMETER_USER_NOT_SET}" rendered="#{empty user}" />
+
+ <ui:fragment rendered="#{not empty user}">
+ <div class="table">
+ <div class="table_header">
+ <h:outputText value="#{msg.ADMIN_LINKS_HEADER}" />
+ </div>
+
+ <div class="table_row">
+ <ul>
+ <li>
+ <h:link outcome="admin_edit_user" value="#{msg.ADMIN_LINK_EDIT_USER}" title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}">
+ <f:param name="userId" value="#{user.userId}" />
+ </h:link>
+ </li>
+
+ <li>
+ <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}">
+ <f:param name="userId" value="#{user.userId}" />
+ </h:link>
+ </li>
+
+ <li>
+ <h:link outcome="admin_delete_user" title="#{msg.ADMIN_LINK_DELETE_USER_TITLE}">
+ <h:outputText styleClass="delete_link" value="#{msg.ADMIN_LINK_DELETE_USER}" />
+ <f:param name="userId" value="#{user.userId}" />
+ </h:link>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </ui:fragment>
+</ui:composition>
</h:selectOneMenu>
</ui:fragment>
- <ui:fragment rendered="#{empty targetController}">
- <h:outputText class="errors" value="#{msg.ERROR_TARGET_CONTROLLER_PARAMETER_NOT_SET}" />
- </ui:fragment>
+ <h:outputText styleClass="errors" value="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" rendered="#{empty targetController}" />
</ui:composition>
</h:inputText>
</ui:fragment>
- <ui:fragment rendered="#{empty targetController}">
- <h:outputText class="errors" value="#{msg.ERROR_TARGET_CONTROLLER_PARAMETER_NOT_SET}" />
- </ui:fragment>
+ <h:outputText styleClass="errors" value="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" rendered="#{empty targetController}" />
</ui:composition>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <f:metadata>
+ <f:viewParam name="phoneId" value="#{adminMobileProviderController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+ </f:metadata>
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_CELLPHONE}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_DELETE_CONTACT_CELLPHONE}
+ </ui:define>
+
+ <ui:define name="content">
+ Here goes your content.
+ </ui:define>
+ </ui:composition>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <f:metadata>
+ <f:viewParam name="phoneId" value="#{adminMobileProviderController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+ </f:metadata>
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_CELLPHONE}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_EDIT_CONTACT_CELLPHONE}
+ </ui:define>
+
+ <ui:define name="content">
+ Here goes your content.
+ </ui:define>
+ </ui:composition>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT_CELLPHONE}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT_CELLPHONE}
+ </ui:define>
+
+ <ui:define name="content">
+ Here goes your content.
+ </ui:define>
+ </ui:composition>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <f:metadata>
+ <f:viewParam name="phoneId" value="#{adminContactPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+ </f:metadata>
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT_CELLPHONE}
+ </ui:define>
+
+ <ui:define name="content">
+ <ui:include src="/WEB-INF/templates/admin/admin_cellphone_data.tpl">
+ <ui:param name="cellphoneNumber" value="#{adminContactPhoneController.cellPhone}" />
+ <ui:param name="isShowPage" value="#{true}" />
+ </ui:include>
+
+ <h:dataTable id="contact_cellphone_link" var="contact" value="#{adminContactPhoneController.allCellphoneContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_CONTACT_CELLPHONE_LINKS}" headerClass="table_header_column" styleClass="table_medium">
+ <f:facet name="header">
+ <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT_CELLPHONE_LINKS}">
+ <f:param value="#{adminContactPhoneController.cellPhone.phoneId}" />
+ </h:outputFormat>
+ </f:facet>
+
+ <h:column>
+ <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_SHOW_CONTACT_ID}" />
+
+ <h:link id="contactId" styleClass="data_field" outcome="admin_show_contact">
+ <h:outputText value="#{contact.contactId}" />
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </h:link>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_GENDER}" />
+
+ <h:outputText id="contactGender" styleClass="data_field" value="#{msg[contact.contactGender.messageKey]}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_TITLE}" />
+
+ <h:outputText id="contactTitle" styleClass="data_field" value="#{contact.contactTitle}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FIRST_NAME}" />
+
+ <h:outputText id="contactFirstName" styleClass="data_field" value="#{contact.contactFirstName}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FAMILY_NAME}" />
+
+ <h:outputText id="contactFamilyName" styleClass="data_field" value="#{contact.contactFamilyName}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_EMAIL_ADDRESS}" />
+
+ <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{contact.contactEmailAddress}">
+ <h:outputText value="#{contact.contactEmailAddress}" />
+ </h:outputLink>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="cellphoneLinks" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_UNLINK}" />
+
+ <div id="cellphoneLinks" class="data_field">
+ <ul class="mini_nav">
+ <li class="mini_link">
+ <h:link outcome="admin_unlink_contact_cellphone">
+ <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" />
+ <f:param name="phoneId" value="#{adminContactPhoneController.cellPhone.phoneId}" />
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </h:link>
+ </li>
+ </ul>
+ </div>
+ </h:column>
+ </h:dataTable>
+ </ui:define>
+ </ui:composition>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <f:metadata>
+ <f:viewParam name="phoneId" value="#{adminContactPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+ <f:viewParam name="contactId" value="#{adminContactPhoneController.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+ </f:metadata>
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_CELLPHONE}
+ </ui:define>
+
+ <ui:define name="content">
+ Here goes your content.
+ </ui:define>
+ </ui:composition>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT}
+ </ui:define>
+
+ <ui:define name="content">
+ Here goes your content.
+ </ui:define>
+ </ui:composition>
+</html>
</ui:define>
<ui:define name="content">
- <h:dataTable id="table_list_mobile" var="mobile" value="#{adminMobileController.allMobileProvider()}" styleClass="table_medium" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" rendered="#{adminMobileController.hasMobileProvider()}">
+ <h:dataTable id="table_list_mobile" var="mobile" value="#{adminMobileProviderController.allMobileProvider()}" styleClass="table_medium" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" rendered="#{adminMobileProviderController.hasMobileProvider()}">
<h:column>
<f:facet name="header">#{msg.ADMIN_LIST_MOBILE_PROVIDER_ID}</f:facet>
<div class="table_footer">
<h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileController.addMobileProvider()}" />
+ <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" />
</div>
</div>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_SHOW_MOBILE_PROVIDER}
+ </ui:define>
+
+ <ui:define name="content">
+ Here goes your content.
+ </ui:define>
+ </ui:composition>
+</html>
<h:column>
<f:facet name="header">#{msg.ADMIN_LIST_USER_ID}</f:facet>
- <h:link outcome="admin_edit_user" title="#{msg.ADMIN_LINK_EDIT_DELETE_USER_TITLE}" value="#{user.userId}">
+ <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{user.userId}">
<f:param name="userId" value="#{user.userId}" />
</h:link>
</h:column>
<h:column>
<f:facet name="header">#{msg.ADMIN_LIST_USER_CREATED}</f:facet>
- <h:outputText id="userCreated" value="#{user.userCreated.time}" title="#{msg.ADMIN_USER_CREATED_TITLE}">
+ <h:outputText id="userCreated" value="#{user.userCreated.time}">
<f:convertDateTime for="userCreated" type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</h:column>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <f:metadata>
+ <f:viewParam name="userId" value="#{userController.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+ </f:metadata>
+
+ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+ <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_ADMIN_SHOW_USER}
+ </ui:define>
+
+ <ui:define name="content">
+ <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty userController.user}" />
+
+ <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty userController.user}">
+ <f:facet name="header">
+ <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">
+ <f:param value="#{userController.user.userName}" />
+ <f:param value="#{userController.user.userId}" />
+ </h:outputFormat>
+ </f:facet>
+
+ <h:column>
+ <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ID}" />
+
+ <h:outputText id="userId" styleClass="data_field" value="#{userController.user.userId}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_NAME}" />
+
+ <h:outputText id="userName" styleClass="data_field" value="#{userController.user.userName}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CREATED}" />
+
+ <h:outputText id="userCreated" styleClass="data_field" value="#{userController.user.userCreated.time}">
+ <f:convertDateTime for="userCreated" type="both" />
+ </h:outputText>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_UPDATED}" />
+
+ <h:outputText id="userUpdated" styleClass="data_field" value="#{userController.user.userUpdated.time}">
+ <f:convertDateTime for="userUpdated" type="both" />
+ </h:outputText>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ACCOUNT_STATUS}" />
+
+ <h:outputText id="userAccountStatus" styleClass="data_field #{userController.user.userAccountStatus.styleClass}" value="#{msg[userController.user.userAccountStatus.messageKey]}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_PROFILE_MODE}" />
+
+ <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[userController.user.userProfileMode.messageKey]}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_LAST_LOCKED}" />
+
+ <h:outputText id="userLastLocked" styleClass="data_field" value="#{userController.user.userLastLocked.time}">
+ <f:convertDateTime for="userLastLocked" type="both" />
+ </h:outputText>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_LAST_LOCKED_REASON}" />
+
+ <h:outputText id="lastLockedReason" styleClass="data_field" value="#{userController.user.lastLockedReason}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CONTACT_CREATED}" />
+
+ <h:outputText id="contactCreated" styleClass="data_field" value="#{userController.user.userContact.contactCreated.time}">
+ <f:convertDateTime for="contactCreated" type="both" />
+ </h:outputText>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CONTACT_UPDATED}" />
+
+ <h:outputText id="contactUpdated" styleClass="data_field" value="#{userController.user.userContact.contactUpdated.time}">
+ <f:convertDateTime for="contactUpdated" type="both" />
+ </h:outputText>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_IS_OWN_CONTACT}" />
+
+ <h:outputText id="isOwnContact" styleClass="data_field" value="#{userController.user.userContact.isOwnContact()}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_GENDER}" />
+
+ <h:outputText id="contactGender" styleClass="data_field" value="#{msg[userController.user.userContact.contactGender.messageKey]}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_TITLE}" />
+
+ <h:outputText id="contactTitle" styleClass="data_field" value="#{userController.user.userContact.contactTitle}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FIRST_NAME}" />
+
+ <h:outputText id="contactFirstName" styleClass="data_field" value="#{userController.user.userContact.contactFirstName}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FAMILY_NAME}" />
+
+ <h:outputText id="contactFamilyName" styleClass="data_field" value="#{userController.user.userContact.contactFamilyName}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_STREET}" />
+
+ <h:outputText id="contactStreet" styleClass="data_field" value="#{userController.user.userContact.contactStreet}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_HOUSE_NUMBER}" />
+
+ <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{userController.user.userContact.contactHouseNumber}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ZIP_CODE}" />
+
+ <h:outputText id="contactZipCode" styleClass="data_field" value="#{userController.user.userContact.contactZipCode}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CITY}" />
+
+ <h:outputText id="contactCity" styleClass="data_field" value="#{userController.user.userContact.contactCity}" />
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_EMAIL_ADDRESS}" />
+
+ <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{userController.user.userContact.contactEmailAddress}">
+ <h:outputText value="#{userController.user.userContact.contactEmailAddress}" />
+ </h:outputLink>
+ </h:column>
+
+ <h:column>
+ <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_BIRTHDAY}" />
+
+ <h:outputText id="contactBirthday" styleClass="data_field" value="#{userController.user.userContact.contactBirthday.time}">
+ <f:convertDateTime for="contactBirthday" type="date" />
+ </h:outputText>
+ </h:column>
+ </h:panelGrid>
+
+ <ui:include src="/WEB-INF/templates/admin/admin_user_links.tpl">
+ <ui:param name="user" value="#{userController.user}" />
+ </ui:include>
+
+ <ui:include src="/WEB-INF/templates/admin/admin_cellphone_data.tpl">
+ <ui:param name="cellphoneNumber" value="#{userController.user.userContact.contactCellphoneNumber}" />
+ <ui:param name="user" value="#{userController.user}" />
+ </ui:include>
+ </ui:define>
+ </ui:composition>
+</html>
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;
.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;
+}