public class ISOFieldValidator extends java.lang.Object implements Configurable, ISOValidator
Title: jPOS
Description: Java Framework for Financial Systems
Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.
Company: www.jPOS.org
Modifier and Type | Field and Description |
---|---|
protected boolean |
breakOnError
Flag used to indicate if validat process break on first error or keep an error vector
|
protected Configuration |
cfg |
protected java.lang.String |
description
brief field description
|
protected int |
fieldId
field id
|
protected int |
maxLen
field length bounds
|
protected int |
minLen
field length bounds
|
Constructor and Description |
---|
ISOFieldValidator() |
ISOFieldValidator(boolean breakOnError)
Create a validator instance specifying breaking if any error
during validation process id found.
|
ISOFieldValidator(boolean breakOnError,
int minLen,
int maxLen,
java.lang.String Description) |
ISOFieldValidator(boolean breakOnError,
int maxLen,
java.lang.String Description) |
ISOFieldValidator(boolean breakOnError,
java.lang.String Description) |
ISOFieldValidator(int minLen,
int maxLen,
java.lang.String Description) |
ISOFieldValidator(int maxLen,
java.lang.String Description) |
ISOFieldValidator(java.lang.String Description) |
Modifier and Type | Method and Description |
---|---|
boolean |
breakOnError() |
java.lang.String |
getDescription() |
int |
getFieldId() |
java.lang.String |
getRejCode(int ErrType)
Get the reject code for an error type.
|
void |
setBreakOnError(boolean breakOnErr) |
void |
setConfiguration(Configuration cfg)
Default config params are: min-len Minimun length,
max-len Max length, break-on-error break condition.
|
void |
setDescription(java.lang.String description) |
void |
setFieldId(int f) |
void |
setMaxLength(int maxLen) |
void |
setMinLength(int minLen) |
ISOComponent |
validate(ISOComponent c)
Validate a field component.
|
protected java.lang.String description
protected int fieldId
protected int minLen
protected int maxLen
protected boolean breakOnError
protected Configuration cfg
public ISOFieldValidator()
public ISOFieldValidator(java.lang.String Description)
public ISOFieldValidator(int maxLen, java.lang.String Description)
public ISOFieldValidator(int minLen, int maxLen, java.lang.String Description)
public ISOFieldValidator(boolean breakOnError, int minLen, int maxLen, java.lang.String Description)
public ISOFieldValidator(boolean breakOnError, int maxLen, java.lang.String Description)
public ISOFieldValidator(boolean breakOnError, java.lang.String Description)
public ISOFieldValidator(boolean breakOnError)
breakOnError
- break conditionpublic void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration
in interface Configurable
cfg
- configuration instanceConfigurationException
public void setMaxLength(int maxLen)
public void setMinLength(int minLen)
public void setBreakOnError(boolean breakOnErr)
public boolean breakOnError()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public void setFieldId(int f)
public int getFieldId()
public java.lang.String getRejCode(int ErrType)
ErrType
- Key for error type.public ISOComponent validate(ISOComponent c) throws ISOException
validate
in interface ISOValidator
c
- ISOField componentISOException
- if there are some errors during validation.
It contains an ISOV component inside referencing the errors.