Class ISOMsgFieldValidator
java.lang.Object
org.jpos.iso.ISOFieldValidator
org.jpos.iso.ISOMsgFieldValidator
- All Implemented Interfaces:
Configurable, ISOValidator
Validator for composed fields. See class comments in file
org.jpos.iso.ISOMsgFieldValidatingPackager.
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
ConstructorsConstructorDescriptionISOMsgFieldValidator(String Description, ISOValidator msgValidator) Constructs a validator with description and inner validator. -
Method Summary
Modifier and TypeMethodDescriptionValidate a field component.Methods inherited from class ISOFieldValidator
breakOnError, getDescription, getFieldId, getRejCode, setBreakOnError, setConfiguration, 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.voidDefault config params are: min-len Minimun length, max-len Max length, break-on-error break condition.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
-
msgValidator
The nested message validator.
-
-
Constructor Details
-
ISOMsgFieldValidator
Constructs a validator with description and inner validator.- Parameters:
Description- the field descriptionmsgValidator- the nested ISO message validator
-
-
Method Details
-
validate
Description copied from class:ISOFieldValidatorValidate a field component. Default for fields only consider field length validations.- Specified by:
validatein interfaceISOValidator- Overrides:
validatein classISOFieldValidator- Parameters:
m- ISOField component- Returns:
- an ISOComponent result of validation process. If there area any validation error, then an ISOV component replace original c and it's returned in case of break-on-error condition is false. If break-on-error is false, then an ISOVException containing the ISOV component is raised.
- Throws:
ISOException- if there are some errors during validation. It contains an ISOV component inside referencing the errors.
-