001/* 002 * jPOS Project [http://jpos.org] 003 * Copyright (C) 2000-2026 jPOS Software SRL 004 * 005 * This program is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Affero General Public License as 007 * published by the Free Software Foundation, either version 3 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Affero General Public License for more details. 014 * 015 * You should have received a copy of the GNU Affero General Public License 016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 017 */ 018 019package org.jpos.iso; 020 021/** 022 * Base validation-error class. Contains a reference to error details. 023 * Error description, Error reject code: optional code used in some 024 * financial systems to specifya field reject code. It refer to error. 025 * Error Id: A string of " " separated ids. The ids are the fields, 026 * subfields, ... ids for the component with error. 027 * For example: id="48 0 1" indicates the error was in field 48, 028 * subfield 0, subfield 1. 029 * <p>Title: jPOS</p> 030 * <p>Description: Java Framework for Financial Systems</p> 031 * <p>Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.</p> 032 * <p>Company: www.jPOS.org</p> 033 * @author Jose Eduardo Leon 034 * @version 1.0 035 */ 036public class ISOVError { 037 038 public ISOVError( String Description ) { 039 this.description = Description; 040 } 041 042 public ISOVError( String Description, String RejectCode ) { 043 this.description = Description; 044 this.rejectCode = RejectCode; 045 } 046 047 public String getRejectCode(){ 048 return rejectCode; 049 } 050 051 public String getId(){ 052 return id; 053 } 054 055 public void setId ( String ID ){ 056 id = ID; 057 } 058 059 public String getDescription() { 060 return description; 061 } 062 063 /** Used by error parsers to set field tree path **/ 064 protected String id; 065 protected String description = ""; 066 protected String rejectCode; 067 /** default error types **/ 068 public static final int ERR_INVALID_LENGTH = 1; 069 public static final int ERR_INVALID_VALUE = 2; 070}