Class IVA_NUM
java.lang.Object
org.jpos.iso.ISOFieldValidator
org.jpos.iso.IVA_NUM
- All Implemented Interfaces:
Configurable, ISOValidator
- Direct Known Subclasses:
IVA_NUMNOZERO
Validator for ASCII numeric fields. By default radix is 10.
Title: jPOS
Description: Java Framework for Financial Systems
Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.
Company: www.jPOS.org
-
Field Summary
FieldsFields inherited from class ISOFieldValidator
breakOnError, cfg, description, fieldId, maxLen, minLenModifier and TypeFieldDescriptionprotected booleanFlag used to indicate if validat process break on first error or keep an error vectorprotected ConfigurationThe validator configuration.protected Stringbrief field descriptionprotected intfield idprotected intfield length boundsprotected intfield length bounds -
Constructor Summary
ConstructorsConstructorDescriptionIVA_NUM()Default constructor.Constructs a validator with a custom break-on-error flag and explicit length bounds.Constructs a validator with a custom break-on-error flag, length bounds, and radix.Constructs a validator with a custom break-on-error flag and a maximum length.Constructs a validator with a custom break-on-error flag, max length, and radix.Constructs a validator with a custom break-on-error flag and description.Constructs a validator with a custom break-on-error flag, description, and radix.Create the validator.Create the validatorConstructs a validator with a maximum length.Constructs a validator with a maximum length and numeric radix.radix = 10.Constructs a validator with the given description and numeric radix. -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure the validator.Validate numeric condition.Methods inherited from class ISOFieldValidator
breakOnError, getDescription, getFieldId, getRejCode, setBreakOnError, setDescription, setFieldId, setMaxLength, setMinLengthModifier and TypeMethodDescriptionbooleanReturns whether break-on-error is set.Returns the field description.intReturns the field ID.getRejCode(int ErrType) Get the reject code for an error type.voidsetBreakOnError(boolean breakOnErr) Sets whether to break on first error.voidsetDescription(String description) Sets the field description.voidsetFieldId(int f) Sets the field ID.voidsetMaxLength(int maxLen) Sets the maximum field length.voidsetMinLength(int minLen) Sets the minimum field length.
-
Field Details
-
radix
by default is decimal
-
-
Constructor Details
-
IVA_NUM
public IVA_NUM()Default constructor. -
IVA_NUM
-
IVA_NUM
-
IVA_NUM
-
IVA_NUM
-
IVA_NUM
-
IVA_NUM
-
IVA_NUM
-
IVA_NUM
-
IVA_NUM
-
IVA_NUM
Constructs a validator with a custom break-on-error flag, max length, and radix.- Parameters:
breakOnError- iftrue, validation throws on the first errormaxLen- maximum acceptable lengthDescription- Brief description.radix- numeric radix
-
IVA_NUM
Constructs a validator with a custom break-on-error flag and explicit length bounds.- Parameters:
breakOnError- iftrue, validation throws on the first errorminLen- minimum acceptable lengthmaxLen- maximum acceptable lengthDescription- Brief description.
-
IVA_NUM
Constructs a validator with a custom break-on-error flag, length bounds, and radix.- Parameters:
breakOnError- iftrue, validation throws on the first errorminLen- minimum acceptable lengthmaxLen- maximum acceptable lengthDescription- Brief description.radix- numeric radix
-
-
Method Details
-
setConfiguration
Configure the validator. @see ISOFieldValidator class. Take config param "radix" wich specify the numeric radix.- Specified by:
setConfigurationin interfaceConfigurable- Overrides:
setConfigurationin classISOFieldValidator- Parameters:
cfg- configuration instance- Throws:
ConfigurationException- if configuration is invalid
-
validate
Validate numeric condition. @see ISOFieldValidator class.- Specified by:
validatein interfaceISOValidator- Overrides:
validatein classISOFieldValidator- Parameters:
f- ISOField to validate- Returns:
- see validate method in ISOFieldValidator class.
- Throws:
ISOException- if any validation error.
-