From: Roland Häder Date: Sat, 26 Aug 2017 20:42:41 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bf6fa22874de9cc92562243977b8798017e8bb39;p=addressbook-war.git Please cherry-pick: - rewrote message-box tag to have 2 CSS classes, one for the whole (alert) box, one for the message itself - renamed a lot CSS classes/ids to more common naming covention: foo-bar and not foo_bar - renamed i18n string to ADMIN_FEATURE_UNFINISHED_WARNING as this can be generic - other small CSS rewrites Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestBean.java index 58a2f96f..896b2c4b 100644 --- a/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookAdminBusinessDataWebRequestBean.java @@ -32,8 +32,7 @@ import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemo import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData; import org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData; import org.mxchange.jcontactsbusiness.employee.Employee; -import org.mxchange.jcontactsbusiness.events.basicdata.added.BusinessBasicDataAddedEvent; -import org.mxchange.jcontactsbusiness.events.basicdata.added.ObservableBusinessBasicDataAddedEvent; +import org.mxchange.jcontactsbusiness.events.basicdata.added.AdminAddedBusinessBasicDataEvent; import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException; import org.mxchange.jcontactsbusiness.headquarters.HeadquartersData; import org.mxchange.jcountry.data.Country; @@ -42,6 +41,7 @@ import org.mxchange.jphone.phonenumbers.fax.FaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; import org.mxchange.jusercore.model.user.User; +import org.mxchange.jcontactsbusiness.events.basicdata.added.ObservableAdminAddedBusinessBasicDataEvent; /** * An administrative business contact bean (controller) @@ -67,7 +67,7 @@ public class AddressbookAdminBusinessDataWebRequestBean extends BaseAddressbookC */ @Inject @Any - private Event businessDataAddedEvent; + private Event businessDataAddedEvent; /** * Comments for this company @@ -234,7 +234,7 @@ public class AddressbookAdminBusinessDataWebRequestBean extends BaseAddressbookC BusinessBasicData updatedBasicData = this.adminBusinessDataBean.addCompanyBasicData(basicData); // Fire event - this.businessDataAddedEvent.fire(new BusinessBasicDataAddedEvent(updatedBasicData)); + this.businessDataAddedEvent.fire(new AdminAddedBusinessBasicDataEvent(updatedBasicData)); } catch (final BusinessDataAlreadyAddedException e) { // Does already exist throw new FacesException(e); diff --git a/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionBean.java index 6a6521c9..71a98bb9 100644 --- a/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/business/basicdata/AddressbookBusinessDataWebSessionBean.java @@ -16,9 +16,11 @@ */ package org.mxchange.addressbook.beans.business.basicdata; +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.Inject; import javax.inject.Named; @@ -30,6 +32,7 @@ import org.mxchange.addressbook.beans.user.login.AddressbookUserLoginWebSessionC import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemote; import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData; import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote; +import org.mxchange.jcontactsbusiness.events.basicdata.added.ObservableAdminAddedBusinessBasicDataEvent; import org.mxchange.jcountry.data.Country; /** @@ -120,6 +123,37 @@ public class AddressbookBusinessDataWebSessionBean extends BaseAddressbookContro super(); } + /** + * Observers events being fired when an administrator has added company + * basic data. + *

+ * @param event Event being fired + */ + public void afterAdminAddedBasicCompanyDataEvent (@Observes final ObservableAdminAddedBusinessBasicDataEvent event) { + // Is the parameter valid? + if (null == event) { + // Throw NPE + throw new NullPointerException("event is null"); + } else if (event.getBasicData() == null) { + // Throw NPE again + throw new NullPointerException("event.basicData is null"); + } else if (event.getBasicData().getCompanyDataId() == null) { + // Throw NPE again + throw new NullPointerException("event.basicData.companyDataId is null"); + } else if (event.getBasicData().getCompanyDataId() < 1) { + // Throw IAE + throw new IllegalArgumentException(MessageFormat.format("event.basicData.companyDataId={0} is invalid", event.getBasicData().getCompanyDataId())); + } else if (event.getBasicData().getCompanyName() == null) { + // Throw NPE again + throw new NullPointerException("event.basicData.companyName is null"); + } else if (event.getBasicData().getCompanyName().isEmpty()) { + // Throw IAE again + throw new IllegalArgumentException("event.basicData.companyName is empty"); + } + + // Add it to list + this.businessContacts.add(event.getBasicData()); + } /** * Returns a list of all business contacts diff --git a/src/java/org/mxchange/addressbook/converter/business/basicdata/AddressbookBusinessContactConverter.java b/src/java/org/mxchange/addressbook/converter/business/basicdata/AddressbookBusinessContactConverter.java index 273b6d87..549cc425 100644 --- a/src/java/org/mxchange/addressbook/converter/business/basicdata/AddressbookBusinessContactConverter.java +++ b/src/java/org/mxchange/addressbook/converter/business/basicdata/AddressbookBusinessContactConverter.java @@ -25,7 +25,6 @@ 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.jcontactsbusiness.basicdata.BusinessBasicData; import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote; import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataNotFoundException; @@ -36,12 +35,12 @@ import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataNotFoundE * @author Roland Häder */ @FacesConverter (value = "BusinessContactConverter") -public class AddressbookBusinessContactConverter implements Converter { +public class AddressbookBusinessContactConverter implements Converter { /** * Business contact EJB */ - private static BusinessDataSessionBeanRemote BUSINESS_CONTACT_BEAN; + private static BusinessDataSessionBeanRemote BASIC_DATA_BEAN; /** * Default constructor @@ -50,7 +49,7 @@ public class AddressbookBusinessContactConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public BusinessBasicData getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -62,14 +61,14 @@ public class AddressbookBusinessContactConverter implements Converter { // Is the bean there? // @TODO Requires this synchronization or is it (sync) confusing the container? - if (null == AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN) { + if (null == AddressbookBusinessContactConverter.BASIC_DATA_BEAN) { // Try to get it try { // Get initial context Context initialContext = new InitialContext(); // ... and user controller - AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN = (BusinessDataSessionBeanRemote) initialContext.lookup("java:global/addressbook-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N + AddressbookBusinessContactConverter.BASIC_DATA_BEAN = (BusinessDataSessionBeanRemote) initialContext.lookup("java:global/addressbook-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N } catch (final NamingException ex) { // Continue to throw it throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N @@ -84,7 +83,7 @@ public class AddressbookBusinessContactConverter implements Converter { Long basicDataId = Long.valueOf(submittedValue); // Try to get user instance from it - businessContact = AddressbookBusinessContactConverter.BUSINESS_CONTACT_BEAN.findBusinessDataById(basicDataId); + businessContact = AddressbookBusinessContactConverter.BASIC_DATA_BEAN.findBusinessDataById(basicDataId); } catch (final NumberFormatException ex) { // Throw again throw new ConverterException(ex); @@ -98,18 +97,15 @@ public class AddressbookBusinessContactConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final BusinessBasicData value) { // Is the object null? if ((null == value) || (String.valueOf(value).isEmpty())) { // Is null return ""; //NOI18N - } else if (!(value instanceof Contact)) { - // Not same interface - throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Contact.", value.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((BusinessBasicData) value).getCompanyDataId()); + return String.valueOf(value.getCompanyDataId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/business/company_employee/AddressbookCompanyEmployeeConverter.java b/src/java/org/mxchange/addressbook/converter/business/company_employee/AddressbookCompanyEmployeeConverter.java index 10a93662..abbc4dd1 100644 --- a/src/java/org/mxchange/addressbook/converter/business/company_employee/AddressbookCompanyEmployeeConverter.java +++ b/src/java/org/mxchange/addressbook/converter/business/company_employee/AddressbookCompanyEmployeeConverter.java @@ -35,7 +35,7 @@ import org.mxchange.jcontactsbusiness.exceptions.employee.CompanyEmployeeNotFoun * @author Roland Häder */ @FacesConverter (value = "CompanyEmployeeConverter") -public class AddressbookCompanyEmployeeConverter implements Converter { +public class AddressbookCompanyEmployeeConverter implements Converter { /** * CompanyEmployee EJB @@ -49,7 +49,7 @@ public class AddressbookCompanyEmployeeConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public Employee getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -68,7 +68,7 @@ public class AddressbookCompanyEmployeeConverter implements Converter { Context initialContext = new InitialContext(); // ... and user controller - AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initialContext.lookup("java:global/addressbook-ejb/companyEmployee!org.mxchange.jcontactsbusiness.company_employee.CompanyEmployeeSessionBeanRemote"); //NOI18N + AddressbookCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initialContext.lookup("java:global/addressbook-ejb/companyEmployee!org.mxchange.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N } catch (final NamingException ex) { // Continue to throw it throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N @@ -97,18 +97,15 @@ public class AddressbookCompanyEmployeeConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final Employee value) { // Is the object null? if ((null == value) || (String.valueOf(value).isEmpty())) { // Is null return ""; //NOI18N - } else if (!(value instanceof Employee)) { - // Not same interface - throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Employee.", value.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((Employee) value).getEmployeeId()); + return String.valueOf(value.getEmployeeId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/contact/AddressbookContactConverter.java b/src/java/org/mxchange/addressbook/converter/contact/AddressbookContactConverter.java index 6f4536f4..84ad9cda 100644 --- a/src/java/org/mxchange/addressbook/converter/contact/AddressbookContactConverter.java +++ b/src/java/org/mxchange/addressbook/converter/contact/AddressbookContactConverter.java @@ -35,7 +35,7 @@ import org.mxchange.jcontacts.exceptions.ContactNotFoundException; * @author Roland Häder */ @FacesConverter (value = "ContactConverter") -public class AddressbookContactConverter implements Converter { +public class AddressbookContactConverter implements Converter { /** * User EJB @@ -49,7 +49,7 @@ public class AddressbookContactConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public Contact getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -97,18 +97,15 @@ public class AddressbookContactConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final Contact value) { // Is the object null? if ((null == value) || (String.valueOf(value).isEmpty())) { // Is null return ""; //NOI18N - } else if (!(value instanceof Contact)) { - // Not same interface - throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Contact.", value.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((Contact) value).getContactId()); + return String.valueOf(value.getContactId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java b/src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java index 7de49611..000c87b6 100644 --- a/src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java +++ b/src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java @@ -36,7 +36,7 @@ import org.mxchange.jcountry.data.CountrySingletonBeanRemote; * @author Roland Häder */ @FacesConverter (value = "CountryConverter") -public class AddressbookCountryConverter implements Converter { +public class AddressbookCountryConverter implements Converter { /** * Country bean @@ -50,7 +50,7 @@ public class AddressbookCountryConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public Country getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -109,18 +109,15 @@ public class AddressbookCountryConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final Country value) { // Is the object null? if ((null == value) || (String.valueOf(value).isEmpty())) { // Is null return ""; //NOI18N - } else if (!(value instanceof Country)) { - // Not same interface - throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement Country.", value.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((Country) value).getCountryId()); + return String.valueOf(value.getCountryId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/fax/AddressbookFaxNumberConverter.java b/src/java/org/mxchange/addressbook/converter/fax/AddressbookFaxNumberConverter.java index 753bc47d..12999038 100644 --- a/src/java/org/mxchange/addressbook/converter/fax/AddressbookFaxNumberConverter.java +++ b/src/java/org/mxchange/addressbook/converter/fax/AddressbookFaxNumberConverter.java @@ -26,7 +26,6 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException; -import org.mxchange.jphone.phonenumbers.DialableNumber; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote; @@ -36,7 +35,7 @@ import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote; * @author Roland Häder */ @FacesConverter (value = "FaxNumberConverter") -public class AddressbookFaxNumberConverter implements Converter { +public class AddressbookFaxNumberConverter implements Converter { /** * Phone EJB @@ -50,7 +49,7 @@ public class AddressbookFaxNumberConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public DialableFaxNumber getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Log message // @TODO Not possible here: this.loggerBeanLocal.logTrace(MessageFormat.format("{0}.getAsObject: context={1},component={2},submittedValue={3} - CALLED!", this.getClass().getSimpleName(), context, component, submittedValue)); //NOI18N @@ -105,18 +104,15 @@ public class AddressbookFaxNumberConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final DialableFaxNumber 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.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((DialableNumber) value).getPhoneId()); + return String.valueOf(value.getPhoneId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/landline/AddressbookLandLineNumberConverter.java b/src/java/org/mxchange/addressbook/converter/landline/AddressbookLandLineNumberConverter.java index 91e37aa5..9705c452 100644 --- a/src/java/org/mxchange/addressbook/converter/landline/AddressbookLandLineNumberConverter.java +++ b/src/java/org/mxchange/addressbook/converter/landline/AddressbookLandLineNumberConverter.java @@ -26,7 +26,6 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException; -import org.mxchange.jphone.phonenumbers.DialableNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote; @@ -36,7 +35,7 @@ import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote; * @author Roland Häder */ @FacesConverter (value = "LandLineNumberConverter") -public class AddressbookLandLineNumberConverter implements Converter { +public class AddressbookLandLineNumberConverter implements Converter { /** * Phone EJB @@ -50,7 +49,7 @@ public class AddressbookLandLineNumberConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public DialableLandLineNumber getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -98,18 +97,15 @@ public class AddressbookLandLineNumberConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final DialableLandLineNumber 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.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((DialableNumber) value).getPhoneId()); + return String.valueOf(value.getPhoneId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/mobile/AddressbookMobileNumberConverter.java b/src/java/org/mxchange/addressbook/converter/mobile/AddressbookMobileNumberConverter.java index 8bb07d26..7561dcdd 100644 --- a/src/java/org/mxchange/addressbook/converter/mobile/AddressbookMobileNumberConverter.java +++ b/src/java/org/mxchange/addressbook/converter/mobile/AddressbookMobileNumberConverter.java @@ -26,7 +26,6 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException; -import org.mxchange.jphone.phonenumbers.DialableNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote; @@ -36,7 +35,7 @@ import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote; * @author Roland Häder */ @FacesConverter (value = "MobileNumbnerConverter") -public class AddressbookMobileNumberConverter implements Converter { +public class AddressbookMobileNumberConverter implements Converter { /** * Phone EJB @@ -50,7 +49,7 @@ public class AddressbookMobileNumberConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public DialableMobileNumber getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -98,18 +97,15 @@ public class AddressbookMobileNumberConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final DialableMobileNumber 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.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((DialableNumber) value).getPhoneId()); + return String.valueOf(value.getPhoneId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java b/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java index c9f3accd..9fa9c814 100644 --- a/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java +++ b/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java @@ -36,7 +36,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBe * @author Roland Häder */ @FacesConverter (value = "MobileProviderConverter") -public class AddressbookMobileProviderConverter implements Converter { +public class AddressbookMobileProviderConverter implements Converter { /** * Mobile provider bean @@ -50,7 +50,7 @@ public class AddressbookMobileProviderConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public MobileProvider getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -109,18 +109,15 @@ public class AddressbookMobileProviderConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final MobileProvider value) { // Is the object null? if ((null == value) || (String.valueOf(value).isEmpty())) { // Is null return ""; //NOI18N - } else if (!(value instanceof MobileProvider)) { - // Not same interface - throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement MobileProvider.", value.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((MobileProvider) value).getProviderId()); + return String.valueOf(value.getProviderId()); } } diff --git a/src/java/org/mxchange/addressbook/converter/user/AddressbookUserConverter.java b/src/java/org/mxchange/addressbook/converter/user/AddressbookUserConverter.java index c888a3d8..6864b6c7 100644 --- a/src/java/org/mxchange/addressbook/converter/user/AddressbookUserConverter.java +++ b/src/java/org/mxchange/addressbook/converter/user/AddressbookUserConverter.java @@ -35,7 +35,7 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote; * @author Roland Häder */ @FacesConverter (value = "UserConverter") -public class AddressbookUserConverter implements Converter { +public class AddressbookUserConverter implements Converter { /** * User EJB @@ -49,7 +49,7 @@ public class AddressbookUserConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public User getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -97,17 +97,15 @@ public class AddressbookUserConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final User 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.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((User) value).getUserId()); + return String.valueOf(value.getUserId()); } + } diff --git a/src/java/org/mxchange/addressbook/validator/birthday/AddressbookBirthdayValidator.java b/src/java/org/mxchange/addressbook/validator/birthday/AddressbookBirthdayValidator.java index b37dc742..ae26fc00 100644 --- a/src/java/org/mxchange/addressbook/validator/birthday/AddressbookBirthdayValidator.java +++ b/src/java/org/mxchange/addressbook/validator/birthday/AddressbookBirthdayValidator.java @@ -16,17 +16,11 @@ */ package org.mxchange.addressbook.validator.birthday; -import java.text.MessageFormat; import java.util.Date; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; -import javax.faces.convert.ConverterException; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; import org.mxchange.jcoreee.validator.date.BaseDateValidator; /** @@ -35,7 +29,7 @@ import org.mxchange.jcoreee.validator.date.BaseDateValidator; * @author Roland Häder */ @FacesValidator ("BirthdayValidator") -public class AddressbookBirthdayValidator extends BaseDateValidator implements Validator { +public class AddressbookBirthdayValidator extends BaseDateValidator { /** * Serial number @@ -44,17 +38,8 @@ public class AddressbookBirthdayValidator extends BaseDateValidator implements V /** * Default constructor - * @TODO Get rid of this */ public AddressbookBirthdayValidator () { - // Try to get it - try { - // Get initial context - Context initialContext = new InitialContext(); - } catch (final NamingException ex) { - // Continue to throw it - throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N - } } @Override diff --git a/src/java/org/mxchange/addressbook/validator/emailaddress/AddressbookEmailAddressValidator.java b/src/java/org/mxchange/addressbook/validator/emailaddress/AddressbookEmailAddressValidator.java index 39a670f0..62ac246b 100644 --- a/src/java/org/mxchange/addressbook/validator/emailaddress/AddressbookEmailAddressValidator.java +++ b/src/java/org/mxchange/addressbook/validator/emailaddress/AddressbookEmailAddressValidator.java @@ -22,7 +22,6 @@ import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; import javax.naming.Context; import javax.naming.InitialContext; @@ -36,7 +35,7 @@ import org.mxchange.jcoreee.validator.string.BaseStringValidator; * @author Roland Häder */ @FacesValidator ("EmailAddressValidator") -public class AddressbookEmailAddressValidator extends BaseStringValidator implements Validator { +public class AddressbookEmailAddressValidator extends BaseStringValidator { /** * Contact session-scoped bean @@ -113,7 +112,7 @@ public class AddressbookEmailAddressValidator extends BaseStringValidator implem String message = MessageFormat.format("Email address {0} does not match regular expression.", emailAddress); //NOI18N // Not matching - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message)); + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); } // Is the bean not yet set? diff --git a/src/java/org/mxchange/addressbook/validator/names/AddressbookNameValidator.java b/src/java/org/mxchange/addressbook/validator/names/AddressbookNameValidator.java index 3191be14..c15dd547 100644 --- a/src/java/org/mxchange/addressbook/validator/names/AddressbookNameValidator.java +++ b/src/java/org/mxchange/addressbook/validator/names/AddressbookNameValidator.java @@ -19,7 +19,6 @@ package org.mxchange.addressbook.validator.names; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; import org.mxchange.jcoreee.validator.string.BaseStringValidator; @@ -29,7 +28,7 @@ import org.mxchange.jcoreee.validator.string.BaseStringValidator; * @author Roland Häder */ @FacesValidator ("NameValidator") -public class AddressbookNameValidator extends BaseStringValidator implements Validator { +public class AddressbookNameValidator extends BaseStringValidator { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/validator/password/AddressbookUserPasswordValidator.java b/src/java/org/mxchange/addressbook/validator/password/AddressbookUserPasswordValidator.java index 20ad5b8b..dac8f671 100644 --- a/src/java/org/mxchange/addressbook/validator/password/AddressbookUserPasswordValidator.java +++ b/src/java/org/mxchange/addressbook/validator/password/AddressbookUserPasswordValidator.java @@ -19,9 +19,7 @@ package org.mxchange.addressbook.validator.password; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; -import javax.inject.Inject; import org.mxchange.jcoreee.validator.string.BaseStringValidator; /** @@ -30,7 +28,7 @@ import org.mxchange.jcoreee.validator.string.BaseStringValidator; * @author Roland Häder */ @FacesValidator ("UserPasswordValidator") -public class AddressbookUserPasswordValidator extends BaseStringValidator implements Validator { +public class AddressbookUserPasswordValidator extends BaseStringValidator { /** * Serial number @@ -53,7 +51,7 @@ public class AddressbookUserPasswordValidator extends BaseStringValidator implem // Test it here if (!UserUtils.ifPasswordMatches(container, this.userLoginController.getLoggedInUser())) { // Password mismatches - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Password mismatching.", "The password the user has entered does not match the stored password.")); //NOI18N + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, "Password mismatching.", "The password the user has entered does not match the stored password.")); //NOI18N } */ } diff --git a/src/java/org/mxchange/addressbook/validator/phone/abroad/AddressbookAbroadDialValidator.java b/src/java/org/mxchange/addressbook/validator/phone/abroad/AddressbookAbroadDialValidator.java index a5d2b82e..2587b978 100644 --- a/src/java/org/mxchange/addressbook/validator/phone/abroad/AddressbookAbroadDialValidator.java +++ b/src/java/org/mxchange/addressbook/validator/phone/abroad/AddressbookAbroadDialValidator.java @@ -21,9 +21,8 @@ import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; -import org.mxchange.jcoreee.validator.BaseObjectValidator; +import org.mxchange.jcoreee.validator.number.BaseNumberValidator; /** * A validator for phone, fax and mobile numbers @@ -31,7 +30,7 @@ import org.mxchange.jcoreee.validator.BaseObjectValidator; * @author Roland Häder */ @FacesValidator ("AbroadDialValidator") -public class AddressbookAbroadDialValidator extends BaseObjectValidator implements Validator { +public class AddressbookAbroadDialValidator extends BaseNumberValidator { /** * Serial number @@ -59,11 +58,11 @@ public class AddressbookAbroadDialValidator extends BaseObjectValidator implemen // Not valid range? (1 - 99, very rude) if (number < 1 || number > 99) { // Not allowed - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, MessageFormat.format("Number {0} is not between 1 and 99 inclusive.", number), MessageFormat.format("The entered number {0} is not in the range of 1 and 99 inclusive. This cannot be used as abroad dial prefix. Alternatively enter international '+' sign.", number))); //NOI18N + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, MessageFormat.format("Number {0} is not between 1 and 99 inclusive.", number), MessageFormat.format("The entered number {0} is not in the range of 1 and 99 inclusive. This cannot be used as abroad dial prefix. Alternatively enter international '+' sign.", number))); //NOI18N } } catch (final NumberFormatException ex) { // Didn't work - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "No number or + entered", "No number or + sign has been entered."), ex); //NOI18N + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, "No number or + entered", "No number or + sign has been entered."), ex); //NOI18N } } } diff --git a/src/java/org/mxchange/addressbook/validator/phone/number/AddressbookPhoneNumberValidator.java b/src/java/org/mxchange/addressbook/validator/phone/number/AddressbookPhoneNumberValidator.java index 1d0ce778..ed84f061 100644 --- a/src/java/org/mxchange/addressbook/validator/phone/number/AddressbookPhoneNumberValidator.java +++ b/src/java/org/mxchange/addressbook/validator/phone/number/AddressbookPhoneNumberValidator.java @@ -19,7 +19,6 @@ package org.mxchange.addressbook.validator.phone.number; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; import org.mxchange.jcoreee.validator.number.BaseNumberValidator; @@ -29,7 +28,7 @@ import org.mxchange.jcoreee.validator.number.BaseNumberValidator; * @author Roland Häder */ @FacesValidator ("PhoneNumberValidator") -public class AddressbookPhoneNumberValidator extends BaseNumberValidator implements Validator { +public class AddressbookPhoneNumberValidator extends BaseNumberValidator { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/validator/privacy_terms/AddressbookPrivacyTermsCheckboxValidator.java b/src/java/org/mxchange/addressbook/validator/privacy_terms/AddressbookPrivacyTermsCheckboxValidator.java index b4df90c7..0a813b9b 100644 --- a/src/java/org/mxchange/addressbook/validator/privacy_terms/AddressbookPrivacyTermsCheckboxValidator.java +++ b/src/java/org/mxchange/addressbook/validator/privacy_terms/AddressbookPrivacyTermsCheckboxValidator.java @@ -19,7 +19,6 @@ package org.mxchange.addressbook.validator.privacy_terms; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; import org.mxchange.jcoreee.validator.bool.BaseBooleanValidator; @@ -29,7 +28,7 @@ import org.mxchange.jcoreee.validator.bool.BaseBooleanValidator; * @author Roland Häder */ @FacesValidator ("PrivacyTermsCheckboxValidator") -public class AddressbookPrivacyTermsCheckboxValidator extends BaseBooleanValidator implements Validator { +public class AddressbookPrivacyTermsCheckboxValidator extends BaseBooleanValidator { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/validator/user/AddressbookUserIdValidator.java b/src/java/org/mxchange/addressbook/validator/user/AddressbookUserIdValidator.java index 3d7dccaa..61e6ab42 100644 --- a/src/java/org/mxchange/addressbook/validator/user/AddressbookUserIdValidator.java +++ b/src/java/org/mxchange/addressbook/validator/user/AddressbookUserIdValidator.java @@ -22,7 +22,6 @@ import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.ConverterException; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; import javax.naming.Context; import javax.naming.InitialContext; @@ -36,7 +35,7 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote; * @author Roland Häder */ @FacesValidator ("UserIdValidator") -public class AddressbookUserIdValidator extends BaseNumberValidator implements Validator { +public class AddressbookUserIdValidator extends BaseNumberValidator { /** * Remote bean diff --git a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsCompanyNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsCompanyNameValidator.java new file mode 100644 index 00000000..b67bc4d9 --- /dev/null +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsCompanyNameValidator.java @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2017 Roland Häder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jfinancials.validator.business.basicdata; + +import java.text.MessageFormat; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.ConverterException; +import javax.faces.validator.FacesValidator; +import javax.faces.validator.ValidatorException; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote; +import org.mxchange.jcoreee.validator.string.BaseStringValidator; + +/** + * A validator for company names + *

+ * @author Roland Häder + */ +@FacesValidator ("CompanyNameValidator") +public class FinancialsCompanyNameValidator extends BaseStringValidator { + + /** + * Business contact EJB + */ + private static BusinessDataSessionBeanRemote BASIC_DATA_BEAN; + + /** + * Serial number + */ + private static final long serialVersionUID = 57_283_657_476_561L; + + @Override + public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { + // All accepted, required fields + String[] requiredFields = {"companyName"}; //NOI18N + + // Pre-validation (example: not null, not a string, empty string ...) + super.preValidate(context, component, value, requiredFields, false); + + // Convert name to string (now securely checked in BaseStringValidator) + String companyName = (String) value; + + // Default is to check on existing names + Boolean checkExisting = Boolean.TRUE; + + // Is attribute "allowEmptyValue" set? + if (component.getAttributes().containsKey("checkExisting")) { //NOI18N + // Get attribute + Object attribute = component.getAttributes().get("checkExisting"); //NOI18N + + // Make sure, it is Boolean as no String is accepted anymore + if (!(attribute instanceof String)) { + // Not valid attribute, please use "true" or "false" (default) + throw new IllegalArgumentException("checkExisting must be of type String. Please use \"true\" or \"false\" for f:attribute value."); //NOI18N + } + + // Securely cast it + checkExisting = Boolean.parseBoolean((String) attribute); + } + + // Is the bean not yet set? + // @TODO Requires this synchronization or is it (sync) confusing the container? + if (null == FinancialsCompanyNameValidator.BASIC_DATA_BEAN) { + // Try to get it + try { + // Get initial context + Context initialContext = new InitialContext(); + + // ... and user controller + FinancialsCompanyNameValidator.BASIC_DATA_BEAN = (BusinessDataSessionBeanRemote) initialContext.lookup("java:global/jfinancials-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N + } catch (final NamingException ex) { + // Continue to throw it + throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N + } + } + + // Check if name is already used + Boolean nameExists = FinancialsCompanyNameValidator.BASIC_DATA_BEAN.isCompanyNameUsed(companyName); + + // Is the user id valid? + if ((!nameExists) && (checkExisting)) { + // Format message + String message = MessageFormat.format("No basic data found with comany name {0}.", companyName); + + // Name does not exist + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); //NOI18N + } else if ((nameExists) && (!checkExisting)) { + // Format message + String message = MessageFormat.format("Found basic data with comany name {0}.", companyName); + + // Name already exists + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); //NOI18N + } + } + +} diff --git a/src/java/org/mxchange/jjobs/converter/business/headquarters/JobsCompanyHeadquartersConverter.java b/src/java/org/mxchange/jjobs/converter/business/headquarters/JobsCompanyHeadquartersConverter.java index 92f2c1e1..bf3d0a52 100644 --- a/src/java/org/mxchange/jjobs/converter/business/headquarters/JobsCompanyHeadquartersConverter.java +++ b/src/java/org/mxchange/jjobs/converter/business/headquarters/JobsCompanyHeadquartersConverter.java @@ -35,7 +35,7 @@ import org.mxchange.jcontactsbusiness.headquarters.HeadquartersData; * @author Roland Häder */ @FacesConverter (value = "CompanyHeadquartersConverter") -public class JobsCompanyHeadquartersConverter implements Converter { +public class JobsCompanyHeadquartersConverter implements Converter { /** * CompanyEmployee EJB @@ -49,7 +49,7 @@ public class JobsCompanyHeadquartersConverter implements Converter { } @Override - public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { + public HeadquartersData getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) { // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Warning message @@ -97,18 +97,15 @@ public class JobsCompanyHeadquartersConverter implements Converter { } @Override - public String getAsString (final FacesContext context, final UIComponent component, final Object value) { + public String getAsString (final FacesContext context, final UIComponent component, final HeadquartersData value) { // Is the object null? if ((null == value) || (String.valueOf(value).isEmpty())) { // Is null return ""; //NOI18N - } else if (!(value instanceof HeadquartersData)) { - // Not same interface - throw new IllegalArgumentException(MessageFormat.format("value[]={0} does not implement HeadquartersData.", value.getClass().getSimpleName())); //NOI18N } // Return id number - return String.valueOf(((HeadquartersData) value).getHeadquartersId()); + return String.valueOf(value.getHeadquartersId()); } } diff --git a/src/java/org/mxchange/jjobs/validator/url/JobsUrlValidator.java b/src/java/org/mxchange/jjobs/validator/url/JobsUrlValidator.java index a9ad396b..e2be8435 100644 --- a/src/java/org/mxchange/jjobs/validator/url/JobsUrlValidator.java +++ b/src/java/org/mxchange/jjobs/validator/url/JobsUrlValidator.java @@ -22,7 +22,6 @@ import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; -import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; import org.mxchange.jcoreee.validator.string.BaseStringValidator; @@ -33,7 +32,7 @@ import org.mxchange.jcoreee.validator.string.BaseStringValidator; * @author Roland Häder */ @FacesValidator ("UrlValidator") -public class JobsUrlValidator extends BaseStringValidator implements Validator { +public class JobsUrlValidator extends BaseStringValidator { /** * Pattern matcher @@ -104,7 +103,7 @@ public class JobsUrlValidator extends BaseStringValidator implements Validator { String message = MessageFormat.format("URL {0} does not match regular expression.", url); //NOI18N // Not matching - throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message)); + throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_WARN, message, message)); } } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 05e81c39..6c5dd4a9 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -844,30 +844,25 @@ GUEST_REGISTRATION_PASSWORD_REPEAT_NOT_ENTERED=Bitte wiederholen Sie das eingege PAGE_TITLE_ADMIN_AREA=Administration #@TODO Please fix German umlauts! ADMIN_MENU_BUSINESS_BASIC_DATA_TITLE=Geschaeftliche Kontakte +LINK_ADMIN_LIST_BUSINESS_BASIC_DATA=Stammdaten auflisten +LINK_ADMIN_LIST_BUSINESS_BASIC_DATA_TITLE=Listet Stammdaten auf +LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA=Stammdaten exportieren +LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA_TITLE=Exportiert Stammdaten +PAGE_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Stammdaten auflisten #@TODO Please fix German umlauts! -LINK_ADMIN_LIST_BUSINESS_BASIC_DATA=Geschaeftskontakte auflisten +CONTENT_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Auflisten von Stammdaten #@TODO Please fix German umlauts! -LINK_ADMIN_LIST_BUSINESS_BASIC_DATA_TITLE=Listet geschaeftliche Kontakte auf +ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY=Es befinden sich keine Stammdaten in der Datenbank. #@TODO Please fix German umlauts! -LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA=Geschaeftliche Kontakte exportieren -#@TODO Please fix German umlauts! -LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA_TITLE=Exportiert geschaeftliche Kontakte -#@TODO Please fix German umlauts! -PAGE_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Geschaeftliche Kontakte auflisten -#@TODO Please fix German umlauts! -CONTENT_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Auflisten von geschaeftlichen Kontakt -#@TODO Please fix German umlauts! -ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY=Es befinden sich keine geschaeftlichen Kontakte in der Datenbank. -#@TODO Please fix German umlauts! -TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA=Tabelle listet geschaeftliche Kontakte auf. +TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA=Tabelle listet Stammdaten auf. ADMIN_BUSINESS_BASIC_DATA_ID=Id-Nummer: #@TODO Please fix German umlauts! -ADMIN_LINK_SHOW_BUSINESS_CONTACT_DATA_TITLE=Details des geschaeftlichen Kontaktes anzeigen. +ADMIN_LINK_SHOW_BUSINESS_CONTACT_DATA_TITLE=Details des Stammdatens anzeigen. ADMIN_BUSINESS_BASIC_DATA_OWNER_ID=Zugew. Benutzer: ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_OWNER_USER_TITLE=Benutzerprofil des zugewiesenen Benutzers anzeigen. ADMIN_LINK_ASSIGN=Zuweisen #@TODO Please fix German umlauts! -ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER_TITLE=Geschaeftlichen Kontakt einen Benutzeraccount zuweisen. +ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_OWNER_USER_TITLE=Stammdaten einen Benutzeraccount zuweisen. ADMIN_BUSINESS_BASIC_DATA_COMPANY_NAME=Firmenname: ADMIN_BUSINESS_BASIC_DATA_CONTACT_PERSON=Ansprechpartner: ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE=Zeigt einen Mitarbeiter an, der als Ansprechpartner eingetragen ist. @@ -901,7 +896,7 @@ BUTTON_CHANGE_LOCALE_TITLE=Aendern Sie hier in der aktuellen Sitzung die angezei ERROR_PARAMETER_LABEL_MESSAGE_NOT_SET=Fehler: Parameter "labelMessage" nicht gesetzt. #@TODO Please fix German umlauts! ADMIN_SELECT_BUSINESS_DATA_COMPANY_FOUNDER=Firmengruender auswaehlen: -ADMIN_BUSINESS_DATA_UPLOAD_LOGO_UNFINISHED=Das Hochladen des Firmenlogos ist noch nicht fertig gestellt. +ADMIN_FEATURE_UNFINISHED_WARNING=Diese Funktion ist noch nicht fertiggestellt. ADMIN_BUSINESS_DATA_COMPANY_TAX_NUMBER=Steuernummer: ADMIN_BUSINESS_DATA_COMPANY_WEBSITE_URL=Webseiten-URL: ADMIN_SELECT_BUSINESS_DATA_COMPANY_USER_OWNER=Unternehmen einem Benutzer zuweisen: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index fd2862e1..afb9bfb9 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -835,14 +835,14 @@ GUEST_REGISTRATION_PASSWORD_NOT_ENTERED=Please enter a password. This must match GUEST_REGISTRATION_PASSWORD_REPEAT_NOT_ENTERED=Please repeat the entered password. This done to confirm the password. PAGE_TITLE_ADMIN_AREA=Administration ADMIN_MENU_BUSINESS_BASIC_DATA_TITLE=Business contacts -LINK_ADMIN_LIST_BUSINESS_BASIC_DATA=List business contacts -LINK_ADMIN_LIST_BUSINESS_BASIC_DATA_TITLE=Lists business contacts -LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA=Export business contacts -LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA_TITLE=Exports business contacts -PAGE_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=List business contacts -CONTENT_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Lists business contacts -ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY=There are currently no business contacts in database. -TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA=This table lists business contacts. +LINK_ADMIN_LIST_BUSINESS_BASIC_DATA=List basic company data +LINK_ADMIN_LIST_BUSINESS_BASIC_DATA_TITLE=Lists basic company data +LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA=Export basic company data +LINK_ADMIN_EXPORT_BUSINESS_BASIC_DATA_TITLE=Exports basic company data +PAGE_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=List basic company data +CONTENT_TITLE_ADMIN_LIST_BUSINESS_BASIC_DATA=Lists basic company data +ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY=There are currently no basic company data in database. +TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA=This table lists basic company data. ADMIN_BUSINESS_BASIC_DATA_ID=Id Number: ADMIN_LINK_SHOW_BUSINESS_CONTACT_DATA_TITLE=Show details of this business contact. ADMIN_BUSINESS_BASIC_DATA_OWNER_ID=Assigned user: @@ -875,7 +875,7 @@ BUTTON_CHANGE_LOCALE=Change BUTTON_CHANGE_LOCALE_TITLE=Change here in your current session the used language for text output. ERROR_PARAMETER_LABEL_MESSAGE_NOT_SET=Error: Parameter "labelMessage" not set. ADMIN_SELECT_BUSINESS_DATA_COMPANY_FOUNDER=Choose company founder: -ADMIN_BUSINESS_DATA_UPLOAD_LOGO_UNFINISHED=The upload of the company logo is currently unfinished. +ADMIN_FEATURE_UNFINISHED_WARNING=This feature is not yet finished. ADMIN_BUSINESS_DATA_COMPANY_TAX_NUMBER=Tax number: ADMIN_BUSINESS_DATA_COMPANY_WEBSITE_URL=Website URL: ADMIN_SELECT_BUSINESS_DATA_COMPANY_USER_OWNER=Select user to assign with company: diff --git a/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns.tpl b/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns.tpl index 1bfcb98a..963e838f 100644 --- a/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns.tpl +++ b/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns.tpl @@ -7,112 +7,112 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns_mini.tpl b/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns_mini.tpl index f510a317..10ced2d5 100644 --- a/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns_mini.tpl +++ b/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns_mini.tpl @@ -7,33 +7,33 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - + - + - + - + - + - + - + - + - + diff --git a/web/WEB-INF/resources/tags/messages/message_box.tpl b/web/WEB-INF/resources/tags/messages/message_box.tpl index 6eb85ec1..95b819ab 100644 --- a/web/WEB-INF/resources/tags/messages/message_box.tpl +++ b/web/WEB-INF/resources/tags/messages/message_box.tpl @@ -5,28 +5,28 @@ xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> - -

+ +
- +
- +
- +
- +
-
- +
+
diff --git a/web/WEB-INF/resources/tags/messages/message_box_mini.tpl b/web/WEB-INF/resources/tags/messages/message_box_mini.tpl deleted file mode 100644 index 893620e2..00000000 --- a/web/WEB-INF/resources/tags/messages/message_box_mini.tpl +++ /dev/null @@ -1,33 +0,0 @@ - - - - -
- -
- - - -
- -
-
- - -
- -
-
-
- - -
- -
-
-
-
diff --git a/web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl index 3b0981e0..f4cbe83a 100644 --- a/web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl +++ b/web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl @@ -6,20 +6,20 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - + - -
+ +
-
+
- + @@ -30,7 +30,7 @@ - + diff --git a/web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl index 3609e807..c28166e7 100644 --- a/web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl +++ b/web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl @@ -6,24 +6,24 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - -
+ +
-
+
- +
- + diff --git a/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl index c94a6087..086ad4fe 100644 --- a/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl +++ b/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl @@ -6,17 +6,17 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - + - -
+ +
-
+
@@ -24,7 +24,7 @@ - + diff --git a/web/WEB-INF/templates/admin/admin_footer.tpl b/web/WEB-INF/templates/admin/admin_footer.tpl index b569c98d..eeeb4add 100644 --- a/web/WEB-INF/templates/admin/admin_footer.tpl +++ b/web/WEB-INF/templates/admin/admin_footer.tpl @@ -5,7 +5,7 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> diff --git a/web/WEB-INF/templates/admin/admin_menu.tpl b/web/WEB-INF/templates/admin/admin_menu.tpl index 92bf06fb..d4e83b00 100644 --- a/web/WEB-INF/templates/admin/admin_menu.tpl +++ b/web/WEB-INF/templates/admin/admin_menu.tpl @@ -7,7 +7,7 @@