Class IVA_NUMNOZERO
java.lang.Object
org.jpos.iso.ISOFieldValidator
org.jpos.iso.IVA_NUM
org.jpos.iso.IVA_NUMNOZERO
- All Implemented Interfaces:
Configurable, ISOValidator
Validator for ASCII numeric and no-zero filled fields.
Title: jPOS
Description: Java Framework for Financial Systems
Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.
Company: www.jPOS.org
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionDefault constructor.IVA_NUMNOZERO(boolean breakOnError, int minLen, int maxLen, String Description) Constructs a validator with a custom break-on-error flag and explicit length bounds.IVA_NUMNOZERO(boolean breakOnError, int minLen, int maxLen, String Description, int radix) Constructs a validator with a custom break-on-error flag, length bounds, and radix.IVA_NUMNOZERO(boolean breakOnError, int maxLen, String Description) Constructs a validator with a custom break-on-error flag and a maximum length.IVA_NUMNOZERO(boolean breakOnError, int maxLen, String Description, int radix) Constructs a validator with a custom break-on-error flag, max length, and radix.IVA_NUMNOZERO(boolean breakOnError, String Description) Constructs a validator with a custom break-on-error flag.IVA_NUMNOZERO(boolean breakOnError, String Description, int radix) Constructs a validator with a custom break-on-error flag and numeric radix.IVA_NUMNOZERO(int minLen, int maxLen, String Description) Constructs a validator with explicit length bounds.IVA_NUMNOZERO(int minLen, int maxLen, String Description, int radix) Constructs a validator with explicit length bounds and numeric radix.IVA_NUMNOZERO(int maxLen, String Description) Constructs a validator with a maximum length.IVA_NUMNOZERO(int minLen, String Description, int radix) Constructs a validator with a minimum length and numeric radix.IVA_NUMNOZERO(String Description) Constructs a validator using only a description.IVA_NUMNOZERO(String Description, int radix) Constructs a validator using only a description and numeric radix. -
Method Summary
Modifier and TypeMethodDescriptionValidate that component is not zero-filled.Methods inherited from class IVA_NUM
setConfigurationModifier and TypeMethodDescriptionvoidConfigure the validator.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.
-
Constructor Details
-
IVA_NUMNOZERO
public IVA_NUMNOZERO()Default constructor. -
IVA_NUMNOZERO
Constructs a validator with explicit length bounds and numeric radix.- Parameters:
minLen- minimum acceptable lengthmaxLen- maximum acceptable lengthDescription- human-readable field descriptionradix- numeric radix (e.g. 10, 16)
-
IVA_NUMNOZERO
Constructs a validator with explicit length bounds.- Parameters:
minLen- minimum acceptable lengthmaxLen- maximum acceptable lengthDescription- human-readable field description
-
IVA_NUMNOZERO
Constructs a validator with a minimum length and numeric radix.- Parameters:
minLen- minimum acceptable lengthDescription- human-readable field descriptionradix- numeric radix
-
IVA_NUMNOZERO
Constructs a validator with a maximum length.- Parameters:
maxLen- maximum acceptable lengthDescription- human-readable field description
-
IVA_NUMNOZERO
Constructs a validator using only a description and numeric radix.- Parameters:
Description- human-readable field descriptionradix- numeric radix
-
IVA_NUMNOZERO
Constructs a validator using only a description.- Parameters:
Description- human-readable field description
-
IVA_NUMNOZERO
Constructs a validator with a custom break-on-error flag.- Parameters:
breakOnError- iftrue, validation throws on the first errorDescription- human-readable field description
-
IVA_NUMNOZERO
Constructs a validator with a custom break-on-error flag and numeric radix.- Parameters:
breakOnError- iftrue, validation throws on the first errorDescription- human-readable field descriptionradix- numeric radix
-
IVA_NUMNOZERO
Constructs a validator with a custom break-on-error flag and a maximum length.- Parameters:
breakOnError- iftrue, validation throws on the first errormaxLen- maximum acceptable lengthDescription- human-readable field description
-
IVA_NUMNOZERO
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- human-readable field descriptionradix- numeric radix
-
IVA_NUMNOZERO
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- human-readable field description
-
IVA_NUMNOZERO
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- human-readable field descriptionradix- numeric radix
-
-
Method Details
-
validate
Validate that component is not zero-filled.- Specified by:
validatein interfaceISOValidator- Overrides:
validatein classIVA_NUM- Parameters:
f- component to validate- Returns:
- the validated (possibly wrapped) component
- Throws:
ISOException- ifISOFieldValidator.breakOnErroris set and the field is zero-filled or fails numeric validation
-