org.jpos.iso
Class ISOBaseValidator

java.lang.Object
  extended by org.jpos.iso.ISOBaseValidator
All Implemented Interfaces:
Configurable, ISOValidator, LogSource
Direct Known Subclasses:
MSGTEST, MSGTEST02, TEST0100

public class ISOBaseValidator
extends Object
implements ISOValidator, LogSource, Configurable

Base Validator class for jPOS composed ISOComponents (ISOMsg).

Title: jPOS

Description: Java Framework for Financial Systems

Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.

Company: www.jPOS.org

Version:
1.0
Author:
Jose Eduardo Leon

Field Summary
protected  boolean breakOnError
          Flag used to indicate if validat process break on first error or keep an error set
protected  Configuration cfg
           
protected  Logger logger
           
protected  String realm
           
 
Constructor Summary
ISOBaseValidator()
           
ISOBaseValidator(boolean breakOnError)
          Creates the validator.
 
Method Summary
 boolean breakOnError()
           
 Logger getLogger()
           
 String getRealm()
           
 void setBreakOnError(boolean breakOnErr)
           
 void setConfiguration(Configuration cfg)
           
 void setLogger(Logger logger, String realm)
           
 ISOComponent validate(ISOComponent m)
          Validate field-interdependency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger

realm

protected String realm

breakOnError

protected boolean breakOnError
Flag used to indicate if validat process break on first error or keep an error set


cfg

protected Configuration cfg
Constructor Detail

ISOBaseValidator

public ISOBaseValidator()

ISOBaseValidator

public ISOBaseValidator(boolean breakOnError)
Creates the validator.

Parameters:
breakOnError - flag indicating validation abort condition
Method Detail

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Specified by:
setConfiguration in interface Configurable
Parameters:
cfg - Configuration object
Throws:
ConfigurationException

breakOnError

public boolean breakOnError()

setBreakOnError

public void setBreakOnError(boolean breakOnErr)

validate

public ISOComponent validate(ISOComponent m)
                      throws ISOException
Validate field-interdependency.

Specified by:
validate in interface ISOValidator
Parameters:
m - Component to validate
Returns:
ISOComponent or ISOVComponent resulting of validation process.
Throws:
ISOException - if break-on-error is true and an error succedd.

setLogger

public void setLogger(Logger logger,
                      String realm)
Specified by:
setLogger in interface LogSource

getLogger

public Logger getLogger()
Specified by:
getLogger in interface LogSource

getRealm

public String getRealm()
Specified by:
getRealm in interface LogSource


Copyright © 1998-2012 jPOS.org. All Rights Reserved.