@JSFValidator(configExcluded=true)
public class LongRangeValidator
extends javax.faces.validator.LongRangeValidator
Implementation for java.lang.Long values.
| Modifier and Type | Field and Description | 
|---|---|
| static String | CONVERT_MESSAGE_IDThe message identifier of the FacesMessage to be created if
 the value cannot be converted to an integer | 
| static String | MAXIMUM_MESSAGE_IDThe message identifier of the  FacesMessageto be created if the maximum value check fails. | 
| static String | MINIMUM_MESSAGE_IDThe message identifier of the  FacesMessageto be created if the minimum value check fails. | 
| static String | NOT_IN_RANGE_MESSAGE_IDThe message identifier of the  FacesMessageto be created if the maximum or minimum value check fails, and both
 the maximum and minimum values for this validator have been set. | 
| static String | VALIDATOR_ID | 
| Constructor and Description | 
|---|
| LongRangeValidator()Construct a  Validatorwith no preconfigured limits. | 
| LongRangeValidator(long maximum)Construct a  Validatorwith the specified preconfigured
 limit. | 
| LongRangeValidator(long maximum,
                  long minimum)Construct a  Validatorwith the specified preconfigured
 limits. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object otherObj) | 
| String | getHintMaximum()Return custom hint maximum message. | 
| String | getHintMinimum()Return custom hint minimum message. | 
| String | getHintNotInRange()Return custom hint notInRange message. | 
| long | getMaximum()Return the maximum value to be enforced by this  Validatoror null if it has not been
 set. | 
| String | getMessageDetailMaximum()Return custom detail error message that was set for creating  FacesMessage,
  for cases where input value exceeds themaximumvalue set. | 
| String | getMessageDetailMinimum()Return custom detail error message that was set for creating  FacesMessage,
 for cases where, input value is less than theminimumvalue set. | 
| String | getMessageDetailNotInRange()Return custom detail error message that was set for creating  FacesMessage,
 for cases where, input value exceeds themaximumvalue and is
 less than theminimumvalue set. | 
| long | getMinimum()Return the minimum value to be enforced by this  Validator, or null if it has not been
 set. | 
| javax.faces.el.ValueBinding | getValueBinding(String name)Deprecated.   | 
| javax.el.ValueExpression | getValueExpression(String name)Return the  ValueExpressionused to calculate the value for the
 specified attribute name, if any. | 
| int | hashCode() | 
| boolean | isDisabled()Return whether it is disabled. | 
| protected boolean | isMaximumSet() | 
| protected boolean | isMinimumSet() | 
| boolean | isTransient() | 
| void | restoreState(javax.faces.context.FacesContext context,
            Object state) | 
| Object | saveState(javax.faces.context.FacesContext context) | 
| void | setDisabled(boolean isDisabled)Return whether it is disabled. | 
| void | setHintMaximum(String hintMaximum)Custom hint maximum message. | 
| void | setHintMinimum(String hintMinimum)Custom hint minimum message. | 
| void | setHintNotInRange(String hintNotInRange)Custom hint notInRange message. | 
| void | setMaximum(long maximum)Set the maximum value to be enforced by this  Validator. | 
| void | setMessageDetailMaximum(String maximumMessageDetail)Custom error message to be used, for creating detail part of the
  FacesMessage, when input value exceeds the maximum value set. | 
| void | setMessageDetailMinimum(String minimumMessageDetail)Custom error message to be used, for creating detail part of the
  FacesMessage, when input value is less the setminimumvalue. | 
| void | setMessageDetailNotInRange(String notInRangeMessageDetail)Custom error message to be used, for creating detail part of the
  FacesMessage, when input value is not with in the range,
 whenminimumandmaximumis set. | 
| void | setMinimum(long minimum)Set the minimum value to be enforced by this  Validator. | 
| void | setTransient(boolean transientValue) | 
| void | setValueBinding(String name,
               javax.faces.el.ValueBinding binding)Deprecated.   | 
| void | setValueExpression(String name,
                  javax.el.ValueExpression expression)Set the  ValueExpressionused to calculate the value for the
 specified attribute if any. | 
| void | validate(javax.faces.context.FacesContext context,
        javax.faces.component.UIComponent component,
        Object value) | 
public static final String VALIDATOR_ID
public static final String MAXIMUM_MESSAGE_ID
The message identifier of the FacesMessage
 to be created if the maximum value check fails.  The message format
 string for this message may optionally include {0},
 {1} and {3} placeholders,
 which will be replaced by user input, component label and configured
 maximum value.
public static final String MINIMUM_MESSAGE_ID
The message identifier of the FacesMessage
 to be created if the minimum value check fails.  The message format
 string for this message may optionally include {0},
 {1} and {2} placeholders, which will be replaced
 by user input, component label and configured minimum value.
public static final String NOT_IN_RANGE_MESSAGE_ID
The message identifier of the FacesMessage
 to be created if the maximum or minimum value check fails, and both
 the maximum and minimum values for this validator have been set.
 The message format string for this message may optionally include
 {0}, {1}, {2} and {3}
 placeholders, which will be replaced by user input, component label,
 configured minimum value and configured maximum value.
public static final String CONVERT_MESSAGE_ID
The message identifier of the FacesMessage to be created if the value cannot be converted to an integer
public LongRangeValidator()
Validator with no preconfigured limits.public LongRangeValidator(long maximum)
Validator with the specified preconfigured
 limit.maximum - Maximum value to allowpublic LongRangeValidator(long maximum,
                  long minimum)
Validator with the specified preconfigured
 limits.maximum - Maximum value to allowminimum - Minimum value to allow@JSFProperty public long getMaximum()
Validator or null if it has not been
 set.getMaximum in class javax.faces.validator.LongRangeValidatorpublic void setMaximum(long maximum)
Validator.setMaximum in class javax.faces.validator.LongRangeValidatormaximum - The new maximum value@JSFProperty public long getMinimum()
Validator, or null if it has not been
 set.getMinimum in class javax.faces.validator.LongRangeValidatorpublic void setMinimum(long minimum)
Validator.setMinimum in class javax.faces.validator.LongRangeValidatorminimum - The new minimum valuepublic void setMessageDetailMaximum(String maximumMessageDetail)
Custom error message to be used, for creating detail part of the
 FacesMessage, when input value exceeds the maximum value set.
MAXIMUM_MESSAGE_IDmaximumMessageDetail - Custom error message.@JSFProperty public String getMessageDetailMaximum()
Return custom detail error message that was set for creating FacesMessage,
  for cases where input value exceeds the maximum value set.
setMessageDetailMaximum(String)public void setMessageDetailMinimum(String minimumMessageDetail)
Custom error message to be used, for creating detail part of the
 FacesMessage, when input value is less the set
 minimum value.
MINIMUM_MESSAGE_IDminimumMessageDetail - Custom error message.@JSFProperty public String getMessageDetailMinimum()
Return custom detail error message that was set for creating FacesMessage,
 for cases where, input value is less than the minimum value set.
setMessageDetailMinimum(String)public void setMessageDetailNotInRange(String notInRangeMessageDetail)
Custom error message to be used, for creating detail part of the
 FacesMessage, when input value is not with in the range,
 when minimum and maximum is set.
NOT_IN_RANGE_MESSAGE_IDnotInRangeMessageDetail - Custom error message.@JSFProperty public String getMessageDetailNotInRange()
Return custom detail error message that was set for creating FacesMessage,
 for cases where, input value exceeds the maximum value and is
 less than the minimum value set.
setMessageDetailNotInRange(String)public void setHintMaximum(String hintMaximum)
Custom hint maximum message.
Overrides default hint messagehintMaximum - Custom hint message.@JSFProperty(tagExcluded=true) public String getHintMaximum()
Return custom hint maximum message.
setHintMaximum(String)public void setHintMinimum(String hintMinimum)
Custom hint minimum message.
Overrides default hint messagehintMinimum - Custom hint message.@JSFProperty(tagExcluded=true) public String getHintMinimum()
Return custom hint minimum message.
setHintMinimum(String)public void setHintNotInRange(String hintNotInRange)
Custom hint notInRange message.
Overrides default hint messagehintNotInRange - Custom hint message.public String getHintNotInRange()
Return custom hint notInRange message.
setHintNotInRange(java.lang.String)public void validate(javax.faces.context.FacesContext context,
            javax.faces.component.UIComponent component,
            Object value)
              throws javax.faces.validator.ValidatorException
validate in interface javax.faces.validator.Validatorvalidate in class javax.faces.validator.LongRangeValidatorjavax.faces.validator.ValidatorExceptionpublic Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class javax.faces.validator.LongRangeValidatorpublic void restoreState(javax.faces.context.FacesContext context,
                Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class javax.faces.validator.LongRangeValidatorpublic void setValueExpression(String name, javax.el.ValueExpression expression)
Set the ValueExpression used to calculate the value for the
 specified attribute if any.
name - Name of the attribute for which to set a ValueExpressionexpression - The ValueExpression to set, or null
  to remove any currently set ValueExpressionNullPointerException - if name
  is nullIllegalArgumentException - if name is not a valid
            attribute of this converterpublic javax.el.ValueExpression getValueExpression(String name)
Return the ValueExpression used to calculate the value for the
 specified attribute name, if any.
name - Name of the attribute or property for which to retrieve a
  ValueExpressionNullPointerException - if name
  is nullIllegalArgumentException - if name is not a valid
 attribute of this converterpublic void setValueBinding(String name, javax.faces.el.ValueBinding binding)
Set the ValueBinding used to calculate the value for the
 specified attribute if any.
name - Name of the attribute for which to set a ValueBindingbinding - The ValueBinding to set, or null
  to remove any currently set ValueBindingNullPointerException - if name
  is nullIllegalArgumentException - if name is not a valid
            attribute of this validatorpublic javax.faces.el.ValueBinding getValueBinding(String name)
Return the ValueBinding used to calculate the value for the
 specified attribute name, if any.
name - Name of the attribute or property for which to retrieve a
  ValueBindingNullPointerException - if name
  is nullIllegalArgumentException - if name is not a valid
 attribute of this validator@JSFProperty(istransient=true,
             tagExcluded=true)
public boolean isTransient()
isTransient in interface javax.faces.component.StateHolderisTransient in class javax.faces.validator.LongRangeValidatorpublic void setTransient(boolean transientValue)
setTransient in interface javax.faces.component.StateHoldersetTransient in class javax.faces.validator.LongRangeValidatorpublic boolean equals(Object otherObj)
equals in class javax.faces.validator.LongRangeValidatorpublic int hashCode()
hashCode in class javax.faces.validator.LongRangeValidatorpublic void setDisabled(boolean isDisabled)
public boolean isDisabled()
protected boolean isMaximumSet()
protected boolean isMinimumSet()
Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.