]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Injection is not working in converters/validators as JavaEE is not so super-flexible ...
authorRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 08:45:37 +0000 (10:45 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 09:05:01 +0000 (11:05 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java
src/java/org/mxchange/pizzaapplication/validator/number/item_amount/PizzaItemAmountValidator.java
src/java/org/mxchange/pizzaapplication/validator/password/PizzaUserPasswordValidator.java
src/java/org/mxchange/pizzaapplication/validator/phone/abroad/PizzaAbroadDialValidator.java
src/java/org/mxchange/pizzaapplication/validator/phone/number/PizzaPhoneNumberValidator.java
src/java/org/mxchange/pizzaapplication/validator/privacy_terms/PizzaPrivacyTermsCheckboxValidator.java
src/java/org/mxchange/pizzaapplication/validator/user/PizzaUserIdValidator.java

index e778ebb04aca2c53b6089daa4fa8cfa92d398022..7424f8d8745432d47f8ef9354d9b5872882a9afa 100644 (file)
@@ -28,7 +28,7 @@ import org.mxchange.jcoreee.validator.string.BaseStringValidator;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "NameValidator")
+@FacesValidator ("NameValidator")
 public class PizzaNameValidator extends BaseStringValidator implements Validator {
 
        /**
index dfe3266f237e9c4b8f99c194abf50fbbd4daa155..fb857584bbe87b91a89ecd0737a1118675b887fe 100644 (file)
@@ -28,7 +28,7 @@ import org.mxchange.jcoreee.validator.number.BaseLongValidator;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "ItemAmountValidator")
+@FacesValidator ("ItemAmountValidator")
 public class PizzaItemAmountValidator extends BaseLongValidator implements Validator {
 
        /**
index 4796d05cc8e242b8c6c2db125c357a24eebdbfc3..8756a15790bda05f56a3fbf479ba128fa69a6dfa 100644 (file)
@@ -17,7 +17,6 @@
 package org.mxchange.pizzaapplication.validator.password;
 
 import java.text.MessageFormat;
-import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.validator.FacesValidator;
@@ -27,17 +26,13 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.validator.string.BaseStringValidator;
-import org.mxchange.jusercore.container.login.LoginContainer;
-import org.mxchange.jusercore.container.login.UserLoginContainer;
-import org.mxchange.jusercore.model.user.UserUtils;
-import org.mxchange.pizzaapplication.beans.login.PizzaUserLoginWebSessionController;
 
 /**
  * A validator for validating passwords (if they match with stored)
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "PizzaUserPasswordValidator")
+@FacesValidator ("UserPasswordValidator")
 public class PizzaUserPasswordValidator extends BaseStringValidator implements Validator {
 
        /**
@@ -45,11 +40,6 @@ public class PizzaUserPasswordValidator extends BaseStringValidator implements V
         */
        private static final long serialVersionUID = 48_581_795_687_317L;
 
-       /**
-        * User login controller
-        */
-       private PizzaUserLoginWebSessionController userLoginController;
-
        /**
         * Default constructor
         */
@@ -75,6 +65,8 @@ public class PizzaUserPasswordValidator extends BaseStringValidator implements V
                // Pre-validation (example: not null, not a string, empty string ...)
                super.preValidate(context, component, value, requiredFields, false);
 
+               /*
+                * @TODO injection is not working in converters. No, JavaEE is not so super-flexible.
                // value is known to be an entered password, so instance login container
                LoginContainer container = new UserLoginContainer(this.userLoginController.getLoggedInUser(), (String) value);
 
@@ -83,6 +75,7 @@ public class PizzaUserPasswordValidator extends BaseStringValidator implements V
                        // 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
                }
+                */
 
                // Trace message
                // NOISY-DEBUG: this.loggerBeanLocal.logTrace("validate: EXIT!"); //NOI18N
index 0ed2ac576f27063dd285a091cc35c6bfbb743f41..49188057f5bbe1a9554cd327d7fabf35c4c0345c 100644 (file)
@@ -30,7 +30,7 @@ import org.mxchange.jcoreee.validator.BaseObjectValidator;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "AbroadDialValidator")
+@FacesValidator ("AbroadDialValidator")
 public class PizzaAbroadDialValidator extends BaseObjectValidator implements Validator {
 
        /**
index f44ff67fe4b99cb6ed7df9412a1ffb9805e05b30..ffa74256adc1f44880bcdb911862d91f1d42878a 100644 (file)
@@ -28,7 +28,7 @@ import org.mxchange.jcoreee.validator.number.BaseLongValidator;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "PhoneNumberValidator")
+@FacesValidator ("PhoneNumberValidator")
 public class PizzaPhoneNumberValidator extends BaseLongValidator implements Validator {
 
        /**
index 60c1811f913be73fc432c8b54a47936ef9dd5261..5ad11b8e3b447c19e5880f151f29780423384d3f 100644 (file)
@@ -28,7 +28,7 @@ import org.mxchange.jcoreee.validator.bool.BaseBooleanValidator;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "PrivacyTermsCheckboxValidator")
+@FacesValidator ("PrivacyTermsCheckboxValidator")
 public class PizzaPrivacyTermsCheckboxValidator extends BaseBooleanValidator implements Validator {
 
        /**
index 89cd4abd66f42947eb2bd3efc32eb797ed6acc19..90f859b793c33a2e9bb92d01400c33dcbb4346a9 100644 (file)
@@ -40,7 +40,7 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@FacesValidator (value = "UserIdValidator")
+@FacesValidator ("UserIdValidator")
 public class PizzaUserIdValidator extends BaseLongValidator implements Validator {
 
        /**