]> git.mxchange.org Git - jcore-utils.git/blobdiff - src/org/mxchange/jcoreee/validator/BaseObjectValidator.java
Boolean is an object, boolean a primitive variable, better use objects
[jcore-utils.git] / src / org / mxchange / jcoreee / validator / BaseObjectValidator.java
index 3bf63fe85199691762173aa3ffc5894dd289644d..6fc1583f6f4d3e578652a0e4e3ea703184f99574 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Haeder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ import javax.faces.validator.ValidatorException;
  * You also may want to try out some other BaseFooValidator classes before
  * directly inheriting from this class.
  * <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
  */
 public abstract class BaseObjectValidator implements Validator, Serializable {
 
@@ -39,33 +39,21 @@ public abstract class BaseObjectValidator implements Validator, Serializable {
         */
        private static final long serialVersionUID = 48_574_878_176_939_512L;
 
-       /**
-        * Needs to be implemented as the Validator interface needs to be
-        * implemented.
-        * <p>
-        * @param context
-        * @param component
-        * @param value <p>
-        * @throws ValidatorException
-        */
-       @Override
-       abstract public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException;
-
        /**
         * The method pre-validates the given value. It makes sure that the
         * component's id is found in requiredFields and is not null. Once the
         * component's id has been found, it stops iteration on requiredFields
         * (which saves execution time).
         * <p>
-        * @param context        FacesContext instance
-        * @param component      UIComponent instance
-        * @param value          Value to check
+        * @param context FacesContext instance
+        * @param component UIComponent instance
+        * @param value Value to check
         * @param requiredFields Array of required field names (ending with)
-        * @param allowNull      Wether null or empty values are allowed
+        * @param allowNull Wether null or empty values are allowed
         * <p>
         * @throws ValidatorException If something more horrible went wrong
         */
-       protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields, boolean allowNull) throws ValidatorException {
+       protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields, Boolean allowNull) throws ValidatorException {
                // Trace message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("preValidate: context={0},component={1},value={2},requiredFields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields))); //NOI18N